TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Joint_Items.h
1/****************************************************************************
2* Copyright (c) 2024, 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 Joint_Items_included
17#define Joint_Items_included
18
19#include <TRUSTTab.h>
20
21/*! @brief Joint_Items contient les informations de distribution parallele d'un item geometrique particulier avec un domaine
22 * voisin particulier (item = sommet, element, face, etc..)
23 *
24 * Ces structures sont initialisees dans Scatter. Elles sont ensuite utilisees par exemple pour creer un
25 * tableau distribue indexe par les indices des items geometriques.
26 *
27 * @sa class Joint
28 */
29template <typename _SIZE_>
31{
32public:
33
34 using int_t = _SIZE_;
35 using ArrOfInt_t = ArrOfInt_T<_SIZE_>;
36 using IntTab_t = IntTab_T<_SIZE_>;
37
39 void reset();
40
41 // Pour utiliser ces accesseurs, il faut avoir initialise
42 // les structures au prealable avec set_xxx.
43 int nb_items_reels() const;
44 const ArrOfInt_t& items_communs() const { return items_communs_; }
45 const ArrOfInt_t& items_distants() const;
46 int nb_items_virtuels() const;
48
49 // Methodes d'initialisation des structures
50 void set_nb_items_reels(int n);
55
56private:
57 // Nombre d'items reels (permet de construire un tableau distribue)
58 // uniquement avec les infos du joint.
59 int nb_items_reels_;
60
61 // Liste des items communs avec le domaine voisin (la liste est
62 // classee dans le meme ordre sur le domaine local et sur le domaine
63 // voisin => items_communs[i] sur joint_j de domaine_k represente la meme
64 // entite geometrique que items_communs[i] sur joint_k de domaine_j)
65 ArrOfInt_t items_communs_;
66
67 // Liste des items distants a envoyer au domaine voisin
68 // (l'ordre des items dans cette liste determine l'ordre d'apparition
69 // de ces items dans l'espace virtuel du voisin)
70 ArrOfInt_t items_distants_;
71
72 // Nombre d'items virtuels recus du domaine voisin.
73 // on a "nb_items_virtuels_ sur joint_j de domaine_k"
74 // = "items_distants.size_array() sur joint_k de domaine_j"
75 int nb_items_virtuels_;
76
77 // Correspondance entre l'indice local d'un item commun et l'indice
78 // du meme item sur le domaine voisin:
79 // colonne 0 = indice sur le domaine voisin,
80 // colonne 1 = indice sur le domaine local
81 // dimension(0) est egal a items_communs.size_array()
82 // L'ordre des items dans le tableau n'est pas specifie
83 IntTab_t renum_items_communs_;
84
85 // Qu'est ce qui a ete initialise ?
86 int flags_init_;
87};
88
89using Joint_Items = Joint_Items_32_64<int>;
90using Joint_Items_64 = Joint_Items_32_64<trustIdType>;
91
92#endif
Joint_Items contient les informations de distribution parallele d'un item geometrique particulier ave...
Definition Joint_Items.h:31
const ArrOfInt_t & items_communs() const
Definition Joint_Items.h:44
const IntTab_t & renum_items_communs() const
Voir renum_items_communs_.
Joint_Items_32_64()
constructeur par defaut
IntTab_T< _SIZE_ > IntTab_t
Definition Joint_Items.h:36
IntTab_t & set_renum_items_communs()
Voir renum_items_communs_ Voir Scatter::calculer_colonne0_renum_faces_communes.
ArrOfInt_t & set_items_communs()
Renvoie le tableau items_communs_ pour le remplir.
int nb_items_virtuels() const
Voir nb_items_virtuels_.
void set_nb_items_virtuels(int n)
Voir nb_items_virtuels_ Voir Scatter::calculer_nb_items_virtuels.
const ArrOfInt_t & items_distants() const
Voir items_distants_.
ArrOfInt_t & set_items_distants()
Renvoie le tableau items_distants_ pour le remplir Voir Scatter::calculer_espace_distant,...
void reset()
remise dans l'etat initial obtenu apres constructeur par defaut
ArrOfInt_T< _SIZE_ > ArrOfInt_t
Definition Joint_Items.h:35
void set_nb_items_reels(int n)
Pas encore utilise.
int nb_items_reels() const
Pas encore utilise (prevu pour faciliter la creation des tableaux distribues, mais les joints ne sont...