TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Joint_Items.cpp
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#include <Joint_Items.h>
17
18// **********************************************************
19// Implementation de la classe Joint_Items_32_64
20// **********************************************************
21
22/*! @brief constructeur par defaut
23 *
24 */
25template <typename _SIZE_>
27{
28 nb_items_virtuels_ = -1;
29 nb_items_reels_ = -1;
30 flags_init_ = 0;
31}
32
33/*! @brief remise dans l'etat initial obtenu apres constructeur par defaut
34 *
35 */
36template <typename _SIZE_>
38{
39 nb_items_virtuels_ = -1;
40 nb_items_reels_ = -1;
41 flags_init_ = 0;
42 items_communs_.reset();
43 items_distants_.reset();
44 renum_items_communs_.reset();
45}
46
47
48/*! @brief Renvoie le tableau items_communs_ pour le remplir.
49 *
50 * (BM: ce tableau n'est pas encore rempli)
51 *
52 */
53template <typename _SIZE_>
55{
56 flags_init_ |= 1;
57 return items_communs_;
58}
59
60/*! @brief Voir items_distants_
61 *
62 */
63template <typename _SIZE_>
65{
66 assert(flags_init_ & 2);
67 return items_distants_;
68}
69
70/*! @brief Renvoie le tableau items_distants_ pour le remplir Voir Scatter::calculer_espace_distant,
71 *
72 * Scatter::calculer_espace_distant_faces_frontieres,
73 * Scatter::calculer_espace_distant_elements
74 *
75 */
76template <typename _SIZE_>
78{
79 flags_init_ |= 2;
80 return items_distants_;
81}
82
83/*! @brief Voir nb_items_virtuels_ Voir Scatter::calculer_nb_items_virtuels
84 *
85 */
86template <typename _SIZE_>
88{
89 flags_init_ |= 4;
90 nb_items_virtuels_ = n;
91}
92
93/*! @brief Voir nb_items_virtuels_
94 *
95 */
96template <typename _SIZE_>
98{
99 assert(flags_init_ & 4);
100 return nb_items_virtuels_;
101}
102
103/*! @brief Voir renum_items_communs_ Voir Scatter::calculer_colonne0_renum_faces_communes
104 *
105 * Scatter::construire_correspondance_sommets_par_coordonnees
106 *
107 */
108template <typename _SIZE_>
110{
111 flags_init_ |= 8;
112 return renum_items_communs_;
113}
114
115/*! @brief Voir renum_items_communs_
116 *
117 */
118template <typename _SIZE_>
120{
121 assert(flags_init_ & 8);
122 return renum_items_communs_;
123}
124
125/*! @brief Pas encore utilise
126 *
127 */
128template <typename _SIZE_>
130{
131 assert(n >= 0);
132 flags_init_ |= 16;
133 nb_items_reels_ = n;
134}
135
136/*! @brief Pas encore utilise (prevu pour faciliter la creation des tableaux distribues, mais les joints ne sont pas le bon endroit
137 *
138 * pour stocker cette valeur: il faut pouvoir la stocker meme s'il n'y
139 * a aucun processeur voisin).
140 *
141 */
142template <typename _SIZE_>
144{
145 assert(flags_init_ & 16);
146 return nb_items_reels_;
147}
148
149
150template class Joint_Items_32_64<int>;
151#if INT_is_64_ == 2
152template class Joint_Items_32_64<trustIdType>;
153#endif
154
155
Joint_Items contient les informations de distribution parallele d'un item geometrique particulier ave...
Definition Joint_Items.h:31
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...