TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Champ_Fonc_Tabule_Morceaux.h
1/****************************************************************************
2* Copyright (c) 2025, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef Champ_Fonc_Tabule_Morceaux_included
17#define Champ_Fonc_Tabule_Morceaux_included
18
19#include <TRUSTChamp_Morceaux_generique.h>
20#include <TRUST_Vector.h>
21#include <TRUST_Ref.h>
22#include <Table.h>
23
24class Champ_base;
25
26/*! @brief class Champ_Fonc_Tabule_Morceaux
27 *
28 * @brief This class represents a piecewise field whose values are functions
29 * of space and of another scalar field passed as parameter.
30 *
31 * @sa TRUSTChamp_Morceaux_generique
32 */
33class Champ_Fonc_Tabule_Morceaux : public TRUSTChamp_Morceaux_generique<Champ_Morceaux_Type::FONC_TABULE>
34{
35 Declare_instanciable(Champ_Fonc_Tabule_Morceaux);
36public :
37 void mettre_a_jour(double temps) override;
38 int initialiser(const double temps) override;
39
40protected :
41 bool is_interp_ = false;
42 using ArrStr = std::array<std::string, 3>;
43
44 std::set<ArrStr> s_pb_ch; // pairs { problem, field, nature } used by at least one problem
45 std::vector<std::vector<ArrStr>> m_pb_ch; //m_pb_ch[i][j] : { problem, field, nature } of parameter j of piece i
46 std::vector<const Champ_base *> ch_param; /* list of parameter fields */
47
48 /* a piece of the field */
49 typedef struct
50 {
51 std::vector<int> i_ch; /* indices of the parameter fields used for this piece */
53 } CHTAB;
54 std::vector<CHTAB> morceaux; /* the pieces */
55 IntVect i_mor; //i_mor[e] : piece index of element e
56 OWN_PTR(Champ_base) espace_stockage_;
57};
58
59#endif /* Champ_Fonc_Tabule_Morceaux_included */
class Champ_Fonc_Tabule_Morceaux
int initialiser(const double temps) override
DOES NOTHING.
std::array< std::string, 3 > ArrStr
void mettre_a_jour(double temps) override
Time update.
std::vector< const Champ_base * > ch_param
std::vector< std::vector< ArrStr > > m_pb_ch
OWN_PTR(Champ_base) espace_stockage_
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
Champ_base()
Default constructor of a Champ_base.
double temps() const
Returns the time of the field.
Definition Table.h:29