16#ifndef Domaine_32_64_included
17#define Domaine_32_64_included
19#include <Domaine_base.h>
21#include <TRUST_Deriv.h>
25#include <medcoupling++.h>
28#include <MEDCouplingFieldTemplate.hxx>
29#include <MEDCouplingUMesh.hxx>
30#include <MEDCouplingRemapper.hxx>
31using MEDCoupling::MEDCouplingRemapper;
32using MEDCoupling::MEDCouplingUMesh;
33using MEDCoupling::MCAuto;
34using MEDCoupling::MEDCouplingFieldDouble;
36#include <OverlapDEC.hxx>
37using MEDCoupling::OverlapDEC;
60template<
typename _SIZE_>
64 Declare_instanciable_sans_constructeur_32_64(
Domaine_32_64 );
241 inline const LIST(OBS_PTR(
Domaine_32_64))& domaines_frontieres()
const {
return domaines_frontieres_; }
345 inline const MEDCouplingUMesh* get_mc_mesh(
bool virt =
false)
const;
346 inline void set_mc_mesh(MCAuto<MEDCouplingUMesh> m)
const { mc_mesh_ = m; }
348 MEDCouplingRemapper* get_remapper(
const Domaine_32_64& other_dom,
bool virt=
false)
const;
351 OverlapDEC* get_dec(
const Domaine_32_64& other_dom, MEDCouplingFieldDouble *dist, MEDCouplingFieldDouble *loc)
const;
429 mutable MCAuto<MEDCouplingUMesh> mc_mesh_, mc_mesh_virt_;
431 mutable std::map<const Domaine_32_64*, MEDCoupling::MEDCouplingRemapper> rmps;
434 mutable std::map<std::pair<const Domaine_32_64*, MEDCoupling::NatureOfField>, OverlapDEC> decs;
436 mutable bool mc_mesh_ready_ =
false, mc_mesh_virt_ready_ =
false;
440 void prepare_rmp_with(
const Domaine_32_64& other_dom,
bool virt)
const;
441 void prepare_dec_with(
const Domaine_32_64& other_dom, MEDCouplingFieldDouble *dist, MEDCouplingFieldDouble *loc)
const;
443 template<
typename _BORD_TYP_>
444 void correct_type_single_border_type(std::list<_BORD_TYP_>& list);
447 mutable DoubleTabs cached_positions_;
456template<
typename _SIZE_>
459 const std::string suff = !std::is_same<_SIZE_, int>::value ?
"_64" :
"";
460 Nom typ_32_64 = typ + suff;
461 elem_.typer(typ_32_64);
462 elem_->associer_domaine(*
this);
473template<
typename _SIZE_>
483template<
typename _SIZE_>
487template<
typename _SIZE_>
495template<
typename _SIZE_>
502template<
typename _SIZE_>
512template<
typename _SIZE_>
528template<
typename _SIZE_>
538template<
typename _SIZE_>
562template<
typename _SIZE_>
585template<
typename _SIZE_>
595template<
typename _SIZE_>
607template<
typename _SIZE_>
610 if (virt ? !mc_mesh_virt_ready_ : !mc_mesh_ready_)
612 return virt ? mc_mesh_virt_ : mc_mesh_;
Empty class used as a base for all the arrays.
Class Bord This class represents a boundary of a domain, it is a type of frontier.
Class Bord_Interne The class serves to represent a set of faces that are internal.
Class Bords This class represents a list of objects of type Bord.
int_t nb_faces() const
Returns the total number of faces of all boundaries in the list.
Class Bords_Internes This class represents a list of objects of type Bords_Interne.
int_t nb_faces() const
Returns the total number of faces contained in the list of Bord_Interne, i.
class Conds_lim This class represents a vector of boundary conditions.
class Domaine_32_64 A Domain is a mesh composed of a set of geometric elements of the same type.
int_t nb_faces_bords_int() const
Bord_Interne_32_64< _SIZE_ > Bord_Interne_t
IntVect_T< _SIZE_ > IntVect_t
void calculer_mon_centre_de_gravite(ArrOfDouble &c)
Computes the center of gravity of the domain.
double volume_total() const
void construire_elem_virt_pe_num()
Sous_Domaine_t & ss_domaine(int i)
SmallArrOfTID_t & chercher_elements(const DoubleVect &pos, SmallArrOfTID_t &elem, int reel=0) const
Searches for the elements containing the points whose coordinates are specified.
Bords_Internes_t mes_bords_int_
Domaine_32_64 & domaine_frontiere(int i)
virtual void clear()
Reset the Domaine completely except for its name.
ArrOfInt_t renum_som_perio_
int_t nb_faces_groupes_faces(Type_Face type) const
const Sous_Domaine_t & ss_domaine(int i) const
ArrOfDouble & cg_moments()
const Joint_t & joint(const Nom &nom) const
void rang_elems_sommet(SmallArrOfTID_t &elems, double x, double y=0, double z=0) const
int_t nb_faces_raccord(Type_Face type) const
const OWN_PTR(Elem_geom_base_32_64< _SIZE_ >) &type_elem() const
const Joints_t & faces_joint() const
Groupe_Faces_t & groupe_faces(int i)
const Frontiere_t & frontiere(const Nom &) const
int_t nb_aretes_tot() const
returns the total number of edges (real+virtual).
Frontiere_32_64< _SIZE_ > Frontiere_t
int_t nb_faces_bord(int num_bord) const
const Raccord_t & raccord(const Nom &nom) const
virtual const MD_Vector & md_vector_sommets() const
int_t chercher_elements(double x, double y=0, double z=0, int reel=0) const
Returns the index of the element containing the point whose coordinates are specified.
ArrsOfInt_T< _SIZE_ > ArrsOfInt_t
Bord_t & bord(const Nom &nom)
Joints_t mes_faces_joint_
int nb_som_elem() const
Returns the number of vertices of the geometric elements that make up the domain.
void construire_elem_virt_pe_num(IntTab_t &elem_virt_pe_num_cpy) const
int_t nb_elem_tot() const
int_t nb_faces_specifiques() const
Returns the number of special faces of the domain.
OWN_PTR(Raccord_base_32_64< _SIZE_ >) Raccord_t
Bord_Interne_t & bords_interne(int i)
int_t nb_faces_bord() const
Frontiere_t & frontiere(int i)
const Groupes_Faces_t & groupes_faces() const
SmallArrOfTID_t & chercher_elements(const DoubleTab &pos, SmallArrOfTID_t &elem, int reel=0) const
Searches for the elements containing the points whose coordinates are specified.
int_t nb_faces_raccord(int num_rac) const
SmallArrOfTID_T< _SIZE_ > SmallArrOfTID_t
LIST(OBS_PTR(Domaine_32_64)) domaines_frontieres_
OWN_PTR(OctreeRoot_t) deriv_octree_
Sous_Domaine_t & ss_domaine(const Nom &nom)
const IntTab_t & aretes_som() const
returns the connectivity array edges/vertices.
DoubleTab_T< _SIZE_ > DoubleTab_t
const OctreeRoot_t & construit_octree() const
virtual void creer_tableau_elements(Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
Creates a parallel array of values at elements.
LIST(OBS_PTR(Sous_Domaine_t)) les_ss_domaines_
void creer_mes_domaines_frontieres(const Domaine_VF &domaine_vf)
SmallArrOfTID_t & chercher_aretes(const DoubleTab &pos, SmallArrOfTID_t &arr, int reel=0) const
Raccord_t & raccord(int i)
void calculer_centres_gravite(DoubleTab_t &xp) const
Calculates the centers of gravity of the domain elements.
int_t nb_faces_frontiere() const
Returns the number of boundary faces of the domain (sum of boundaries, connections,...
int_t nb_faces_bords_int(Type_Face type) const
Raccords_t mes_faces_raccord_
static int identifie_item_unique(IntList &item_possible, DoubleTab &coord_possible, const DoubleVect &coord_ref)
Bord_32_64< _SIZE_ > Bord_t
virtual void calculer_volumes(DoubleVect_t &volumes, DoubleVect_t &inv_volumes) const
Computes the volumes of the domain elements.
void init_faces_virt_bord(const MD_Vector &md_vect_faces, MD_Vector &md_vect_faces_bord)
DoubleTab_t & les_sommets()
const ArrOfInt_t & ind_faces_virt_bord() const
int_t nb_faces_bord(Type_Face type) const
void set_mc_mesh_ready(bool flag) const
void set_renum_som_perio(IntTab_t &renum)
int rang_frontiere(const Nom &) const
int_t nb_faces_bords_int(int num_bord) const
const Raccords_t & faces_raccord() const
void fill_from_list(std::list< Domaine_32_64 * > &lst)
Fills the Domaine from a list of Domaine objects by aggregating them.
Joint_32_64< _SIZE_ > Joint_t
Entree & readOn_has_perio(Entree &s, bool &has_perio)
Reads the objects constituting a Domain from an input stream.
int_t get_renum_som_perio(int_t i) const
ArrOfInt_T< _SIZE_ > ArrOfInt_t
const LIST(OBS_PTR(Sous_Domaine_t)) &ss_domaines() const
int associer_(Objet_U &) override
Associates a Sous_Domaine to the Domain.
int_t nb_faces_raccord() const
double & coord(int_t i, int j)
int_t nb_faces_groupes_faces() const
const Frontiere_t & frontiere(int i) const
const DoubleTab_t & les_sommets() const
int nb_frontieres_internes() const
ArrOfInt_t ind_faces_virt_bord_
int nb_ss_domaines() const
const Groupe_Faces_t & groupe_faces(const Nom &nom) const
int_t nb_faces_joint() const
IntTab_t & set_aretes_som()
int_t nb_faces_groupes_faces(int num_g) const
Bord_Interne_t & bords_interne(const Nom &nom)
void add(const Sous_Domaine_t &sd)
DoubleTab getBoundingBox() const
Frontiere_t & frontiere(const Nom &)
int_t chercher_sommets(double x, double y=0, double z=0, int reel=0) const
Raccords_t & faces_raccord()
IntTab_t & set_elem_aretes()
const Joint_t & joint(int i) const
void resetSommetsCoordinates()
const IntTab_t & les_elems() const
void fixer_premieres_faces_frontiere()
void init_renum_perio()
Initialize the renumerotation array for periodicity.
int_t nb_faces_joint(int num_joint) const
Sous_Domaine_32_64< _SIZE_ > Sous_Domaine_t
const Sous_Domaine_t & ss_domaine(const Nom &nom) const
void merge_wo_vertices_with(Domaine_32_64 &z)
Merge another Domaine into this, without considering vertices which are handled separately.
const OctreeRoot_t & construit_octree(int &) const
Build the octree if not already done.
void construire_renum_som_perio(const Conds_lim &, const Domaine_dis_base &)
const Bord_Interne_t & bords_interne(const Nom &nom) const
const Bords_Internes_t & bords_int() const
Joint_t & joint(const Nom &nom)
void renum(const IntVect_t &nums)
Bords_Internes_32_64< _SIZE_ > Bords_Internes_t
Joints_32_64< _SIZE_ > Joints_t
int_t nb_faces_joint(Type_Face type) const
Bords_32_64< _SIZE_ > Bords_t
int nb_faces_elem(int=0) const
Returns the number of faces of type i of the geometric elements that make up the domain.
void read_former_domaine(Entree &s, bool &read_perio)
read what was (before TRUST 1.9.2) the "domaine" part from the input stream i.e. (roughly) the elemen...
DoubleTabs_T< _SIZE_ > DoubleTabs_t
Bords_Internes_t & bords_int()
void read_vertices(Entree &s)
only read vertices from the stream s
int_t nb_faces_frontiere(Type_Face type) const
Returns the number of boundary faces of the domain of the specified type.
Groupes_Faces_t mes_groupes_faces_
OWN_PTR(Elem_geom_base_32_64< _SIZE_ >) &type_elem()
const ArrOfInt_t & get_renum_som_perio() const
int_t nb_faces_specifiques(Type_Face type) const
Returns the number of specific faces of the domain of the specified type.
OctreeRoot_32_64< _SIZE_ > OctreeRoot_t
int_t nb_aretes() const
Returns the number of real edges.
Groupes_Faces_32_64< _SIZE_ > Groupes_Faces_t
void typer(const Nom &)
Sets the element type of the domain using the name passed as parameter.
SmallArrOfTID_t & chercher_sommets(const DoubleTab &pos, SmallArrOfTID_t &som, int reel=0) const
void calculer_centres_gravite_aretes(DoubleTab_t &xa) const
Computes the centers of gravity of the domain edges.
const Raccord_t & raccord(int i) const
Raccord_t & raccord(const Nom &nom)
const DoubleTab_t & coord_sommets() const
const ArrOfDouble & cg_moments() const
void check_domaine()
associate the read objects to the domaine and check that the reading objects are coherent
DoubleVect_T< _SIZE_ > DoubleVect_t
Joint_t & joint_of_pe(int)
void exporter_mon_centre_de_gravite(ArrOfDouble c)
IntTab_t elem_virt_pe_num_
const Bord_Interne_t & bords_interne(int i) const
void correct_type_of_borders_after_merge()
Correcting type of borders if they were empty before merge (ie equal to vide_0D).
void ajouter(const DoubleTab_t &soms, IntVect_t &nums)
Adds nodes to the domain with elimination of duplicate nodes. On return, nums contains the new indice...
void saveSommetsCoordinates()
ArrOfDouble_T< _SIZE_ > ArrOfDouble_t
void build_mc_mesh(bool virt=false) const
Build the MEDCoupling mesh corresponding to the TRUST mesh.
int_t arete_sommets(int_t i, int j) const
returns the number of the j-th vertex of the i-th edge.
void renum_joint_common_items(const IntVect_t &nums, const int_t elem_offset)
Renumbers the nodes and elements present in the common items of joints.
int_t face_bords_interne_conjuguee(int_t face) const
Returns -1 if face is not an internal boundary face, or the index of the duplicated face otherwise.
SmallArrOfTID_t & indice_elements(const IntTab &som, SmallArrOfTID_t &elem, int reel=0) const
Searches the indices of elements containing the vertices specified by the "sommets" parameter.
OWN_PTR(Elem_geom_base_32_64< _SIZE_ >) elem_
virtual void creer_tableau_sommets(Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
Creates an array with one "row" per mesh vertex.
const LIST(OBS_PTR(Domaine_32_64)) &domaines_frontieres() const
virtual const MD_Vector & md_vector_elements() const
Returns the parallel descriptor of element arrays of the domain.
bool is_mc_mesh_ready() const
int_t elem_aretes(int_t i, int j) const
returns the number of the j-th edge of the i-th element.
int_t nb_som_tot() const
Returns the total number of vertices of the domain i.e. the number of real and virtual vertices on th...
Raccords_32_64< _SIZE_ > Raccords_t
double coord(int_t i, int j) const
int_t nb_som() const
Returns the number of vertices of the domain.
void ajouter(const DoubleTab_t &soms)
Adds nodes (or vertices) to the domain (without checking for duplicates).
int nb_groupes_faces() const
const IntTab_t & elem_aretes() const
returns the connectivity array elements/edges.
const Bords_t & faces_bord() const
const Bord_t & bord(int i) const
void ecrire_noms_bords(Sortie &) const
Writes the boundary names to an output stream.
const IntTab_t & elem_virt_pe_num() const
const Joint_t & joint_of_pe(int) const
Groupes_Faces_t & groupes_faces()
Groupe_Faces_32_64< _SIZE_ > Groupe_Faces_t
IntTab_T< _SIZE_ > IntTab_t
int comprimer()
Merges boundaries with the same name for: boundaries, periodic boundaries, internal boundaries and fa...
const Bord_t & bord(const Nom &nom) const
const Noms & bords_perio() const
const Groupe_Faces_t & groupe_faces(int i) const
int_t sommet_elem(int_t i, int j) const
Returns the (global) number of the j-th vertex of the i-th element.
int comprimer_joints()
Merges joints with the same name.
Base class for domains description. This class holds all the data shared by all domains and not sensi...
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Class Elem_geom_base This class is the base class for the definition of elements.
Class defining operators and methods for all reading operation in an input flow (file,...
Groupe_Face class — represents a selection of faces read from a med file.
Groupes_Faces class — represents a list of Groupe_Faces objects.
int_t nb_faces() const
Returns the total number of faces contained in the list of Groupe_Faces, i.
The Joint class is a Frontiere that contains the joint faces and vertices with the neighboring domain...
Joints class — represents a list of Joint objects.
int_t nb_faces() const
Returns the total number of faces in all Joints_32_64 in the list.
: This class is an OWN_PTR but the pointed object is shared among multiple
class Nom: a character string for naming TRUST objects.
An array of character strings (VECT(Nom)).
Base class for TRUST objects (Objet_U).
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Class Raccord_base This class is simply a boundary; it is the base class of the.
Class Raccords This represents a list of Raccord type objects.
int_t nb_faces() const
Returns the total number of faces of all Raccords_32_64 in the list.
Reorder_Mesh allows the user to trigger the renumbering of the mesh entities.
Base class for output streams.
Sous_Domaine represents a volumic sub-domain i.e. a sub set of elements of a Domaine.