TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Scatter.h
1/****************************************************************************
2* Copyright (c) 2026, 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 Scatter_included
17#define Scatter_included
18
19#include <TRUSTTabs_forward.h>
20#include <Interprete.h>
21#include <TRUST_Ref.h>
22#include <Joint.h>
23#include <Domaine_forward.h>
24
25class Domaine_VF;
26
27class Scatter : public Interprete
28{
29 Declare_instanciable(Scatter);
30public:
31 Entree& interpreter(Entree&) override;
32 virtual void lire_domaine(Nom& fil);
33 Domaine& domaine();
34
35 static int Chercher_Correspondance(const DoubleTab& sommets1, const DoubleTab& sommets2, ArrOfInt& correspondance, const double epsilon);
36 static void construire_correspondance_sommets_par_coordonnees(Domaine& dom, bool allow_resize=false);
38 static void construire_correspondance_items_par_coordonnees(Joints& joints, const JOINT_ITEM type_item, const DoubleTab& coord_items, bool allow_resize=false);
39
40 static void construire_structures_paralleles(Domaine& dom);
41
42 //static void rechercher_elems_joints(Domaine & domaine);
43
44 static void calculer_espace_distant(Domaine& domaine,
45 const int nb_items_reels,
46 const ArrsOfInt& items_to_send,
47 const JOINT_ITEM type_item);
48
49 static void calculer_nb_items_virtuels(Joints& joints,
50 const JOINT_ITEM type_item);
51
52 static void calculer_renum_items_communs(Joints& joints, const JOINT_ITEM type_item);
53 static void calculer_espace_distant_faces(Domaine& domaine, const int nb_faces_reelles, const IntTab& elem_faces);
54 static void calculer_espace_distant_aretes(Domaine& domaine, const int nb_aretes_reelles, const IntTab& elem_aretes);
55
56 static void calculer_espace_distant_elements(Domaine& dom);
57 static void corriger_espace_distant_elements_perio(Domaine& dom);
58
59 static void calculer_espace_distant_sommets(Domaine& dom);
60 static void construire_espace_virtuel_traduction(const MD_Vector& md_indice, const MD_Vector& md_valeur, IntTab& tableau, const int error_is_fatal = 1);
61
62 static void reordonner_faces_de_joint(Domaine& dom);
63 static void ajouter_joints(Domaine& domaine, ArrOfInt& pe_voisins);
64
65 static void trier_les_joints(Joints& joints);
66 static void construire_md_vector(const Domaine&, int nb_items_reels, const JOINT_ITEM, MD_Vector&);
67
68 static void check_consistancy_remote_items( Domaine& dom, const ArrOfInt& mergedDomaines );
69
70 // Although Scatter is never meant to be used in 64b, those two methods are needed by both configurations:
71 template <typename _SIZE_>
73 template <typename _SIZE_>
75
76
77protected:
78 OBS_PTR(Domaine) le_domaine;
79
80 void read_domain_no_comm(Entree& fic, bool& read_perio);
81};
82
83#endif
classe Domaine_32_64 un Domaine est un maillage compose d'un ensemble d'elements geometriques de meme...
Definition Domaine.h:62
class Domaine_VF
Definition Domaine_VF.h:44
Classe de base des objets "interprete".
Definition Interprete.h:38
: Cette classe est un OWN_PTR mais l'objet pointe est partage entre plusieurs
Definition MD_Vector.h:48
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:76
static void reordonner_faces_de_joint(Domaine &dom)
Reordonne les faces de joint de sorte qu'elles apparaissent dans le meme ordre sur chaque couple de p...
Definition Scatter.cpp:1678
static int Chercher_Correspondance(const DoubleTab &sommets1, const DoubleTab &sommets2, ArrOfInt &correspondance, const double epsilon)
Construit le tableau "correspondance" tel que Pour 0 <= i < sommets2.
Definition Scatter.cpp:2370
static void ajouter_joints(Domaine &domaine, ArrOfInt &pe_voisins)
Ajoute des joints avec tous les pe de pe_voisins.
Definition Scatter.cpp:1028
static void init_sequential_domain(Domaine_32_64< _SIZE_ > &dom)
Create parallel descriptors for the vertex and element arrays of the domain (necessary because Scatte...
Definition Scatter.cpp:2742
static void construire_espace_virtuel_traduction(const MD_Vector &md_indice, const MD_Vector &md_valeur, IntTab &tableau, const int error_is_fatal=1)
Construit la structure items_communs + espaces virtuels d'un tableau contenant des indices d'items ge...
Definition Scatter.cpp:1624
static void calculer_espace_distant_sommets(Domaine &dom)
En fonction de l'espace distant des elements, calcule l'espace distant des sommets.
Definition Scatter.cpp:1157
Entree & interpreter(Entree &) override
Lit et complete un domaine parallele selon les motcles lus dans le jeu de donnees.
Definition Scatter.cpp:128
static void calculer_espace_distant_aretes(Domaine &domaine, const int nb_aretes_reelles, const IntTab &elem_aretes)
Idem que Scatter::calculer_espace_distant_sommets pour les aretes.
Definition Scatter.cpp:1201
static void calculer_espace_distant_elements(Domaine &dom)
Remplissage du tableau "espace_distant()" des elements dans les joints.
Definition Scatter.cpp:2061
static void calculer_espace_distant(Domaine &domaine, const int nb_items_reels, const ArrsOfInt &items_to_send, const JOINT_ITEM type_item)
Determination des items distants en fonction d'une liste d'items a envoyer et de listes d'items commu...
Definition Scatter.cpp:819
static void construire_correspondance_items_par_coordonnees(Joints &joints, const JOINT_ITEM type_item, const DoubleTab &coord_items, bool allow_resize=false)
Generic method to build geometrical item correspondance between the local and the remote processor ar...
Definition Scatter.cpp:2486
static void construire_structures_paralleles(Domaine &dom)
Construction des structures paralleles du domaine et du domaine (determination des elements distants ...
Definition Scatter.cpp:672
static void calculer_nb_items_virtuels(Joints &joints, const JOINT_ITEM type_item)
Pour un item geometrique "type_item", remplit le champ nb_items_virtuels_ des joints en fonction du n...
Definition Scatter.cpp:2698
OBS_PTR(Domaine) le_domaine
void read_domain_no_comm(Entree &fic, bool &read_perio)
Does the exact same thing as the readOn of the class Domaine but without collective communication.
Definition Scatter.cpp:394
static void calculer_renum_items_communs(Joints &joints, const JOINT_ITEM type_item)
On suppose que chaque joint[i].joint_item(type_item).items_communs() contient les indices locaux des ...
Definition Scatter.cpp:1222
static void construire_correspondance_sommets_par_coordonnees(Domaine &dom, bool allow_resize=false)
Construction des tableaux joint_item(JOINT_ITEM::SOMMET).items_communs de tous les joints du domaine(...
Definition Scatter.cpp:2678
static void construire_md_vector(const Domaine &, int nb_items_reels, const JOINT_ITEM, MD_Vector &)
construction d'un MD_Vector_std a partir des informations de joint du domaine pour le type d'item dem...
Definition Scatter.cpp:1279
static void check_consistancy_remote_items(Domaine &dom, const ArrOfInt &mergedDomaines)
Merged domains receive joint information from their neighbours to ensure that their common items (ver...
Definition Scatter.cpp:270
static void corriger_espace_distant_elements_perio(Domaine &dom)
Les algorithmes actuels pour le periodique (assembleur P1B, OpDivElem P1B) ont besoin que pour chaque...
Definition Scatter.cpp:1911
Domaine & domaine()
Renvoi le domaine associe.
Definition Scatter.cpp:73
static void trier_les_joints(Joints &joints)
Sort joints by increasing neighbor proc number.
Definition Scatter.cpp:712
static void calculer_espace_distant_faces(Domaine &domaine, const int nb_faces_reelles, const IntTab &elem_faces)
Idem que Scatter::calculer_espace_distant_sommets pour les faces.
Definition Scatter.cpp:1182
virtual void lire_domaine(Nom &fil)
Lit le domaine dans le fichier de nom "nomentree", de type LecFicDistribueBin ou LecFicDistribue.
Definition Scatter.cpp:468
static void uninit_sequential_domain(Domaine_32_64< _SIZE_ > &dom)
methode utilisee par les interpretes qui modifient le domaine (sequentiel), detruit les descripteurs ...
Definition Scatter.cpp:2757
static void construire_correspondance_aretes_par_coordonnees(Domaine_VF &zvf)
Construction des tableaux joint_item(JOINT_ITEM::ARETE).items_communs de tous les joints du domaine.
Definition Scatter.cpp:2686