TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Sous_Domaine.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 Sous_Domaine_included
17#define Sous_Domaine_included
18
19#include <TRUST_List.h>
20#include <TRUSTVect.h>
21#include <TRUST_Ref.h>
22#include <Domaine_forward.h>
23
24/*! @brief Sous_Domaine represents a volumic sub-domain i.e. a sub set of elements of a Domaine
25 *
26 * It bears a reference to the Domaine it subdivides
27 *
28 * @sa Domaine Sous_Domaines
29 */
30template <typename _SIZE_>
32{
33
34 Declare_instanciable_32_64(Sous_Domaine_32_64);
35
36public :
37 void build(Entree& is);
38
39 using int_t = _SIZE_;
40 using ArrOfInt_t = ArrOfInt_T<_SIZE_>;
41 using IntVect_t = IntVect_T<_SIZE_>;
42 using IntTab_t = IntTab_T<_SIZE_>;
43 using SmallArrOfTID_t = SmallArrOfTID_T<_SIZE_>;
44 using ArrOfDouble_t= ArrOfDouble_T<_SIZE_>;
45 using DoubleVect_t = DoubleVect_T<_SIZE_>;
46 using DoubleTab_t = DoubleTab_T<_SIZE_>;
47 using DoubleTabs_t = DoubleTabs_T<_SIZE_>;
48
50
51 int lire_motcle_non_standard(const Motcle&, Entree&) override { return 0; }
52 inline const Nom& le_nom() const override { return nom_; }
53 inline int_t operator()(int_t i) const { return les_elems_[i]; }
54 inline int_t operator[](int_t i) const { return les_elems_[i]; }
55 // Returns the subdomaine number of elements (real+virtual elements in parallel)
56 inline int_t nb_elem_tot() const { return les_elems_.size(); }
57 void associer_domaine(const Domaine_t& d) { le_dom_=d; }
58 int associer_(Objet_U&) override;
59 void nommer(const Nom& nom) override { nom_=nom; }
60 void add_elem(const int_t poly);
61 inline const IntVect_t& les_elems() const { return les_elems_; }
62 inline IntVect_t& les_elems() { return les_elems_; }
63
64 Domaine_t& domaine() { return le_dom_.valeur(); }
65 const Domaine_t& domaine() const { return le_dom_.valeur(); }
66
67protected :
68
72};
73
74using Sous_Domaine = Sous_Domaine_32_64<int>;
75using Sous_Domaine_64 = Sous_Domaine_32_64<trustIdType>;
76
77#endif
78
classe Domaine_32_64 un Domaine est un maillage compose d'un ensemble d'elements geometriques de meme...
Definition Domaine.h:62
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:76
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
Definition Objet_U.cpp:55
Sous_Domaine represents a volumic sub-domain i.e. a sub set of elements of a Domaine.
IntTab_T< int > IntTab_t
const Domaine_t & domaine() const
void nommer(const Nom &nom) override
Donne un nom a l'Objet_U Methode virtuelle a surcharger.
int_t operator[](int_t i) const
void add_elem(const int_t poly)
Ajoute un polyedre au sous-domaine.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
ArrOfDouble_T< int > ArrOfDouble_t
void associer_domaine(const Domaine_t &d)
int_t operator()(int_t i) const
DoubleTab_T< int > DoubleTab_t
IntVect_t & les_elems()
const Nom & le_nom() const override
Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
ArrOfInt_T< int > ArrOfInt_t
DoubleTabs_T< int > DoubleTabs_t
OBS_PTR(Domaine_t) le_dom_
int_t nb_elem_tot() const
Domaine_32_64< int > Domaine_t
Domaine_t & domaine()
int associer_(Objet_U &) override
Associe un Objet_U au sous-domaine.
SmallArrOfTID_T< int > SmallArrOfTID_t
const IntVect_t & les_elems() const
IntVect_T< int > IntVect_t
void build(Entree &is)
DoubleVect_T< int > DoubleVect_t