TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
TRUSTChamp_Morceaux_generique.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 TRUSTChamp_Morceaux_generique_included
17#define TRUSTChamp_Morceaux_generique_included
18
19#include <Champ_Uniforme.h>
20#include <Champ_Don_base.h>
21#include <Probleme_base.h>
22#include <TRUST_Vector.h>
23#include <TRUST_List.h>
24#include <TRUST_Ref.h>
25#include <Parser_U.h>
26#include <Domaine_forward.h>
27
28enum class Champ_Morceaux_Type { FONC , FONC_TXYZ , FONC_TABULE , UNIFORME };
29
30template <Champ_Morceaux_Type _TYPE_>
32{
33public:
34
35 Champ_base& affecter_(const Champ_base& ch) override;
36
37 DoubleVect& valeur_a(const DoubleVect& position, DoubleVect& valeurs) const override;
38
39 DoubleVect& valeur_a_elem(const DoubleVect& position, DoubleVect& valeurs, int le_poly) const override;
40
41 double valeur_a_elem_compo(const DoubleVect& position, int le_poly, int ncomp) const override;
42
43 DoubleTab& valeur_aux(const DoubleTab& positions, DoubleTab& valeurs) const override;
44
45 DoubleVect& valeur_aux_compo(const DoubleTab& positions, DoubleVect& valeurs, int ncomp) const override;
46
47 DoubleTab& valeur_aux_elems(const DoubleTab& positions, const IntVect& les_polys, DoubleTab& valeurs) const override;
48
49 DoubleVect& valeur_aux_elems_compo(const DoubleTab& positions, const IntVect& les_polys, DoubleVect& valeurs, int ncomp) const override;
50
51 void mettre_a_jour(double temps) override;
52
53 int initialiser(const double temps) override;
54
55 const OBS_PTR(Domaine)& domaine() const { return mon_domaine; }
56 OBS_PTR(Domaine)& domaine() { return mon_domaine; }
57 const LIST(OBS_PTR(Sous_Domaine))& sous_domaines() const { return les_sous_domaines; }
58 LIST(OBS_PTR(Sous_Domaine))& sous_domaines() { return les_sous_domaines; }
59
60protected:
61 LIST(OBS_PTR(Sous_Domaine)) les_sous_domaines;
62 OBS_PTR(Domaine) mon_domaine;
64 VECT(Parser_U) parser; /* vecteur de tous les parsers */
65 Nom nom_champ_parametre_; /* nom du champ dont les fonctions ont parametres */
66 IntTab parser_idx_; /* parser_idx(i, j) : parser a appeller pour calculer la composante j du champ a la maille i */
68 void interprete_get_domaine(const Nom& nom);
69
70 void creer_tabs(const int);
71 Entree& complete_readOn(const int dim, const Nom& qsj, Entree& is, Nom& nom);
72
73};
74
75#include <TRUSTChamp_Morceaux_generique.tpp>
76
77#endif /* TRUSTChamp_Morceaux_generique_included */
classe Champ_Don_base classe de base des Champs donnes (non calcules)
DoubleTab & valeurs() override
Surcharge Champ_base::valeurs() Renvoie le tableau des valeurs.
Champ_base()
Constructeur par defaut d'un Champ_base.
double temps() const
Renvoie le temps du champ.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
classe Parser_U Version de la classe Parser, derivant de Objet_U.
Definition Parser_U.h:32
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
Entree & complete_readOn(const int dim, const Nom &qsj, Entree &is, Nom &nom)
DoubleVect & valeur_aux_elems_compo(const DoubleTab &positions, const IntVect &les_polys, DoubleVect &valeurs, int ncomp) const override
Renvoie les valeurs d'une composante du champ aux points specifies par leurs coordonnees,...
DoubleVect & valeur_a_elem(const DoubleVect &position, DoubleVect &valeurs, int le_poly) const override
Renvoie la valeur du champ au point specifie par ses coordonnees, en indiquant que ce point est situe...
DoubleTab & valeur_aux(const DoubleTab &positions, DoubleTab &valeurs) const override
Renvoie les valeurs du champ aux points specifies par leurs coordonnees.
const OBS_PTR(Domaine) &domaine() const
OBS_PTR(Domaine) mon_domaine
LIST(OBS_PTR(Sous_Domaine)) les_sous_domaines
const LIST(OBS_PTR(Sous_Domaine)) &sous_domaines() const
void mettre_a_jour(double temps) override
Mise a jour en temps.
OBS_PTR(Probleme_base) ref_pb
DoubleTab & valeur_aux_elems(const DoubleTab &positions, const IntVect &les_polys, DoubleTab &valeurs) const override
Renvoie les valeurs du champ aux points specifies par leurs coordonnees, en indiquant que les points ...
Champ_base & affecter_(const Champ_base &ch) override
Provoque une erreur ! A surcharger par les classes derivees ! non virtuelle pure par commoditees de d...
DoubleVect & valeur_aux_compo(const DoubleTab &positions, DoubleVect &valeurs, int ncomp) const override
Renvoie les valeurs d'une composante du champ aux points specifies par leurs coordonnees.
int initialiser(const double temps) override
NE FAIT RIEN.
LIST(OBS_PTR(Sous_Domaine)) &sous_domaines()
DoubleVect & valeur_a(const DoubleVect &position, DoubleVect &valeurs) const override
Renvoie la valeur du champ au point specifie par ses coordonnees.
double valeur_a_elem_compo(const DoubleVect &position, int le_poly, int ncomp) const override
Renvoie la valeur d'une composante du champ au point specifie par ses coordonnees,...