TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Domaine_IJK Class Reference

This class encapsulates all the information related to the eulerian mesh for TrioIJK. More...

#include <Domaine_IJK.h>

Inheritance diagram for Domaine_IJK:
[legend]
Collaboration diagram for Domaine_IJK:
[legend]

Public Types

enum  Localisation {
  ELEM , NODES , EDGES , EDGES_I ,
  EDGES_J , EDGES_K , FACES , FACES_I ,
  FACES_J , FACES_K
}
 Localisation sub class. More...
enum  grid_status { DEFAULT , INITIALIZED , DONE }
 status sub class to not compute the same structure twitce when not needed More...

Public Member Functions

 Domaine_IJK ()
void initialize_from_unstructured (const Domaine &, int direction_for_x, int direction_for_y, int direction_for_z, bool perio_x, bool perio_y, bool perio_z)
void initialize_splitting (Domaine_IJK &dom, int nproc_i, int nproc_j, int nproc_k, int process_grouping_i=1, int process_grouping_j=1, int process_grouping_k=1)
 Buils a splitting of the given deometry on the requested number of processors in each direction.
void initialize_mapping (Domaine_IJK &dom, const ArrOfInt &slice_size_i, const ArrOfInt &slice_size_j, const ArrOfInt &slice_size_k, const IntTab &processor_mapping)
 Creates a splitting of the domain by specifying the slice sizes and the processor mapping.
void initialize_origin_deltas (double x0, double y0, double z0, const ArrOfDouble &delta_x, const ArrOfDouble &delta_y, const ArrOfDouble &delta_z, bool perio_x, bool perio_y, bool perio_z)
 Initializes class elements given dataset's parameters.
void init_subregion (const Domaine_IJK &src, int ni, int nj, int nk, int offset_i, int offset_j, int offset_k, const Nom &subregion, bool perio_x=false, bool perio_y=false, bool perio_z=false)
 Builds the geometry, parallel splitting and DOF correspondance between a "father" region and a "son" region which is a subpart of the father region.
void initialize_with_mapping (const ArrOfInt &slice_size_i, const ArrOfInt &slice_size_j, const ArrOfInt &slice_size_k, const IntTab &processor_mapping)
 Creates a splitting of the domain by specifying the mapping.
Faces * creer_faces ()
 renvoie new(Faces) ! elle est surchargee par Domaine_VDF par ex.
int get_nb_elem_local (int direction) const
 Returns the number of elements owned by this processor in the given direction.
int get_nb_elem_local () const
 Returns the number of element owned by this processor.
int get_nb_nodes_local (int direction) const
 Returns the number of nodes owned by this processor (generally equal to nb_elem_local()).
int get_nb_faces_local (int compo, int direction) const
 Returns the number, in requested direction, of faces that are oriented in direction of "compo".
int get_nb_edges_local (int compo, int direction) const
 Returns the number, in requested direction, of edges of faces in direction of "compo".
int get_nb_items_local (Localisation loc, int direction) const
 Returns the number of local items (on this processor) for the given localisation in the requested direction.
int get_nb_elem_tot (int direction) const
 Returns the total (global) number of mesh cells in requested direction.
int get_nb_elem_tot () const
 Returns the total (global) number of mesh cells.
double get_domain_length (int direction) const
 Returns the length of the entire domain in requested direction.
int get_nb_items_global (Localisation loc, int direction) const
 Returns the number of local items (on this processor) for the given localisation in the requested direction.
int get_offset_local (int direction) const
 Returns the local offset in requested direction.
int get_local_slice_index (int direction) const
 Returns the position of the local subdomain in the requested direction.
int get_neighbour_processor (int previous_or_next, int direction) const
 Returns the index of the requested neighbour processor (-1 if no neighbour).
int get_nprocessor_per_direction (int direction) const
 Returns the number of slices in the given direction.
const ArrOfDouble & get_node_coordinates (int direction) const
 Returns an array with the coordinates of all nodes in the mesh in requested direction.
double get_origin (int direction) const
 Returns the coordinate of the first node (global) of the mesh in the requested direction.
const ArrOfDouble & get_delta (int direction) const
 Returns the array of mesh cell sizes in requested direction.
double get_constant_delta (int direction) const
 Returns the size of cells in a direction.
void get_local_mesh_delta (int direction, int ghost_cells, ArrOfDouble_with_ghost &delta) const
 Fills the "delta" array with the size of the cells owned by the processor in the requested direction.
void get_processor_mapping (IntTab &mapping) const
 Fills an array containing the mapping of processors.
void get_slice_offsets (int direction, ArrOfInt &tab) const
 Returns the indices of the first cell in requested direction of every slices in this direction.
void get_slice_size (int direction, Localisation loc, ArrOfInt &tab) const
 Returns the number of items of given location (elements, nodes, faces...) for all slices in the requested direction.
int get_processor_by_ijk (const FixedVector< int, 3 > &slice) const
 Return the global index of the processor according to its position.
int get_processor_by_ijk (int slice_i, int slice_j, int slice_k) const
 Return the global index of the processor according to its position.
int periodic_get_processor_by_ijk (int slice_i, int slice_j, int slice_k) const
Vecteur3 get_coords_of_dof (int i, int j, int k, Localisation loc) const
 Determines the dof of an element along a localisation.
double get_coord_of_dof_along_dir (int dir, int i, Localisation loc) const
int get_independent_index (int i, int j, int k) const
Int3 get_ijk_from_independent_index (int independent_index) const
int get_signed_independent_index (int phase, int i, int j, int k) const
int get_independent_index_from_signed_independent_index (int signed_independent_index) const
int get_phase_from_signed_independent_index (int signed_independent_index) const
bool within_ghost (int i, int j, int k, int negative_ghost_size, int positive_ghost_size) const
bool within_ghost_along_dir (int dir, int i, int j, int k, int negative_ghost_size, int positive_ghost_size) const
template<int _DIR_>
bool within_ghost_ (int i, int j, int k, int negative_ghost_size, int positive_ghost_size) const
int correct_perio_i_local (int direction, int i) const
int get_i_along_dir_no_perio (int direction, double coord_dir, Localisation loc) const
int get_i_along_dir_perio (int direction, double coord_dir, Localisation loc) const
Int3 get_ijk_from_coord (double coord_x, double coord_y, double coord_z, Localisation loc) const
int convert_ijk_cell_to_packed (const FixedVector< int, 3 > ijk) const
 Converts the ijk index of an element to a cell index.
int convert_ijk_cell_to_packed (int i, int j, int k) const
 With three indices, find the local index of an element.
FixedVector< int, 3 > convert_packed_to_ijk_cell (int index) const
 Convert the local index of an element to a vector with IJK indices.
void search_elem (const double &x, const double &y, const double &z, FixedVector< int, 3 > &ijk_global, FixedVector< int, 3 > &ijk_local, FixedVector< int, 3 > &ijk_me) const
 Find the element which contains the item's coodirnates.
bool get_periodic_flag (int direction) const
 Method returns true if periodic in this direction.
bool is_uniform (int direction) const
 Method returns true if uniform in this direction.
void update_volume_elem ()
 Updates volume_elem_ / ! \ If the grid changes, this needs to be called again!
const DoubleVect & get_volume_elem () const
 Returns volume_elem_.
int ft_extension () const
void set_extension_from_bulle_param (double vol_bulle, double diam_bulle)
Public Member Functions inherited from Domaine_base
const Nomle_nom () const override
 Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
void nommer (const Nom &nom) override
 Donne un nom a l'Objet_U Methode virtuelle a surcharger.
double epsilon () const
void creer_champ (const Motcle &motlu) override
virtual void creer_champ (const Motcle &, const Probleme_base &)
void get_noms_champs_postraitables (Noms &nom, Option opt=NONE) const override
const Champ_baseget_champ (const Motcle &) const override
bool has_champ (const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
bool has_champ (const Motcle &nom) const override
virtual void initialiser (double temps, Domaine_dis_base &, Probleme_base &)
virtual void set_dt (double &dt_)
virtual void mettre_a_jour (double temps, Domaine_dis_base &, Probleme_base &)
virtual void update_after_post (double temps)
virtual bool getUpdateTheGrid ()
virtual void setUpdateTheGrid (bool)
virtual bool getCouplingMethod () const
int mesh_update_required () const
virtual void validateTimeStep ()
void associer_bords_a_imprimer (LIST(Nom) liste)
void associer_bords_a_imprimer_sum (LIST(Nom) liste)
Entreelire_bords_a_imprimer (Entree &s)
Entreelire_bords_a_imprimer_sum (Entree &s)
const LIST (Nom) &bords_a_imprimer() const
const LIST (Nom) &bords_a_imprimer_sum() const
int moments_a_imprimer () const
int & moments_a_imprimer ()
bool axi1d () const
void fixer_epsilon (double eps)
bool deformable () const
bool & deformable ()
void set_fichier_lu (Nom &nom)
const Nomget_fichier_lu () const
virtual const DoubleVect & old_volumes_entrelaces () const
virtual const DoubleVect & old_volumes () const
virtual void apply_old_to_new_volume_scaling (DoubleTab &tab, const Domaine_dis_base &dvf) const
virtual void ajouter_correctif_volumique (const DoubleTab &, const DoubleTab &, double, DoubleTab &) const
virtual int save_additional_state (Sortie &, const Probleme_base &) const
virtual int restore_additional_state (Entree &, Probleme_base &)
virtual std::vector< YAML_datadata_a_sauvegarder (const Probleme_base &pb) const
Public Member Functions inherited from Champs_compris_interface
virtual ~Champs_compris_interface ()
virtual bool has_champ (const Motcle &nom, OBS_PTR(Champ_base)&ref_champ) const =0
Public Member Functions inherited from Objet_U
 ~Objet_U () override
 Destructeur, supprime l'objet de la liste d'objets enregistres dans "memoire".
int numero () const
 Renvoie l'indice de l'objet dans Memoire::data.
virtual int duplique () const =0
virtual SortieprintOn (Sortie &) const
 Ecriture de l'objet sur un flot de sortie Methode a surcharger.
virtual EntreereadOn (Entree &)
 Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
virtual unsigned taille_memoire () const =0
virtual int est_egal_a (const Objet_U &) const
 Renvoie 1 si l'objet x et *this sont une seule et meme instance (meme adresse en memoire).
virtual int reprendre (Entree &)
 Reprise d'un Objet_U sur un flot d'entree Methode a surcharger.
virtual int sauvegarder (Sortie &) const
 Sauvegarde d'un Objet_U sur un flot de sortie Methode a surcharger.
int get_object_id () const
 Renvoie l'identifiant unique de l'objet object_id_.
virtual const Type_infoget_info () const
 Donne des informations sur le type de l'Objet_U.
const Nomque_suis_je () const
 renvoie la chaine identifiant la classe.
const char * le_type () const
 Donne le nom du type de l'Objet_U.
virtual int change_num (const int *const)
 Change le numero interne de l'Objet_U.
virtual int lire_motcle_non_standard (const Motcle &motlu, Entree &is)
 Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
virtual int associer_ (Objet_U &)
 Associe l'Objet_U a un autre Objet_U Methode virtuelle a surcharger.
const Interpreteinterprete () const
Interpreteinterprete ()
Public Member Functions inherited from Process
virtual ~Process ()

Static Public Member Functions

static Localisation Faces_Dir_To_Localisation (int direction)
 Returns the face according to the direction.
static Localisation Edges_Dir_To_Localisation (int direction)
Static Public Member Functions inherited from Objet_U
static const Nomnom_du_cas ()
 Renvoie une reference constante vers le nom du cas.
static Nomget_set_nom_du_cas ()
 Renvoie une reference non constante vers le nom du cas (pour pouvoir le modifier).
static const Type_infoinfo ()
 Donne des informations sur le type de l'Objet_U.
static const Objet_Uself_cast (const Objet_U &)
 methode ajoutee pour caster en python
static Objet_Uself_cast (Objet_U &)
Static Public Member Functions inherited from Process
static int me ()
 renvoie mon rang dans le groupe de communication courant.
static int nproc ()
 renvoie le nombre de processeurs dans le groupe courant Voir Comm_Group::nproc() et PE_Groups::current_group()
static bool is_parallel ()
static void exit (int exit_code=-1)
 Routine de sortie de TRUST dans une region Kokkos.
static double mp_sum (double)
 Calcule la somme de x sur tous les processeurs du groupe courant.
static float mp_sum (float)
static trustIdType mp_sum (trustIdType)
 Calcule la somme de x sur tous les processeurs du groupe courant.
static double mp_max (double)
static double mp_min (double)
static int mp_max (int)
 renvoie le plus grand int i sur l'ensemble des processeurs du groupe courant.
static int mp_min (int)
 renvoie le plus petit int i sur l'ensemble des processeurs du groupe courant.
static double mp_sum_as_double (int v)
static trustIdType mppartial_sum (trustIdType i)
 Calul de la somme partielle de i sur les processeurs 0 a me()-1 (renvoie 0 sur le processeur 0).
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2)
 C++14 compatible mp_sum_for_each: combine multiple mp_sum calls into one collective operation Usage: mp_sum_for_each(a, b); mp_sum_for_each(a, b, c); mp_sum_for_each(a, b, c, d); mp_sum_for_each(a, b, c, d, e); All arguments must be of the same type (double or int) and are modified in place. Supports 2-5 parameters.
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2)
 C++14 compatible mp_max_for_each: combine multiple mp_max calls into one collective operation.
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2)
 C++14 compatible mp_min_for_each: combine multiple mp_min calls into one collective operation.
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename _TYPE_>
static void mp_sum_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
template<typename _TYPE_>
static void mp_max_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
template<typename _TYPE_>
static void mp_min_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
static bool mp_and (bool)
 Calcule le 'et' logique de b sur tous les processeurs du groupe courant.
static bool mp_or (bool)
static int check_int_overflow (trustIdType)
static int je_suis_maitre ()
 renvoie 1 si on est sur le processeur maitre du groupe courant (c'est a dire me() == 0), 0 sinon.
static KOKKOS_INLINE_FUNCTION void Kokkos_exit (const char *)
 Routine de sortie de TRUST dans une region Kokkos.
static int node_master ()
 renvoie 1 si on est sur le processeur maitre du noeud numa, 0 sinon.
static void exit (const Nom &message, int exit_code=-1)
static bool is_sequential ()
static void barrier ()
 Synchronise tous les processeurs du groupe courant (attend que tous les processeurs soient arrives a la barriere).
static void abort ()
 Routine de sortie de Trio-U sur une erreur abort().
static SortieJournal (int message_level=0)
 Renvoie un objet statique de type Sortie qui sert de journal d'evenements.
static double ram_processeur ()
static void imprimer_ram_totale (int all_process=0)
static bool force_single_file (const int ranks, const Nom &filename)

Additional Inherited Members

Static Public Attributes inherited from Objet_U
static double precision_geom = 1e-10
static constexpr bool HAS_POINTER = false
static int dimension =0
static int format_precision_geom =11
static int axi =0
static int bidim_axi =0
static int DEACTIVATE_SIGINT_CATCH =0
static Type_info info_obj
static bool disable_TU =false
 Flag to disable or not the writing of the .TU files.
static bool stat_per_proc_perf_log =false
 Flag to enable the writing of the statistics detailed per processor in _csv.TU file.
Static Public Attributes inherited from Process
static int exception_sur_exit =0
static int multiple_files =5120
Protected Member Functions inherited from Domaine_base
 LIST (Nom) bords_a_imprimer_
 LIST (Nom) bords_a_imprimer_sum_
void duplique_bords_internes ()
Protected Member Functions inherited from Objet_U
 Objet_U ()
 Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_), et enregistre l'objet en "memoire".
 Objet_U (const Objet_U &)
 Constructeur par copie.
const Objet_Uoperator= (const Objet_U &)
 Operateur= : ne fait rien (on conserve le numero et l'identifiant).
virtual void set_param (Param &) const
Protected Attributes inherited from Domaine_base
Nom nom_
 Domaine name.
int moments_a_imprimer_
double epsilon_
bool deformable_ = false
Nom fichier_lu_
double volume_total_
 Volume total du domaine (somme sur tous les processeurs).
Champs_compris champs_compris_
bool mesh_update_required_ = false

Detailed Description

This class encapsulates all the information related to the eulerian mesh for TrioIJK.

Multiples methods regarding how to navigates through it, volume of the each cells, etc...

Definition at line 46 of file Domaine_IJK.h.

Member Enumeration Documentation

◆ grid_status

status sub class to not compute the same structure twitce when not needed

Enumerator
DEFAULT 
INITIALIZED 
DONE 

Definition at line 57 of file Domaine_IJK.h.

◆ Localisation

Localisation sub class.

Enumerator
ELEM 
NODES 
EDGES 
EDGES_I 
EDGES_J 
EDGES_K 
FACES 
FACES_I 
FACES_J 
FACES_K 

Definition at line 53 of file Domaine_IJK.h.

Constructor & Destructor Documentation

◆ Domaine_IJK()

Domaine_IJK::Domaine_IJK ( )

Definition at line 36 of file Domaine_IJK.cpp.

Member Function Documentation

◆ convert_ijk_cell_to_packed() [1/2]

int Domaine_IJK::convert_ijk_cell_to_packed ( const FixedVector< int, 3 > ijk) const
inline

Converts the ijk index of an element to a cell index.

Adapted from Maillage_FT_IJK.h

Parameters
ijkVector with the x, y, and z coordinates.
Returns
The LOCAL index of an element.

Definition at line 531 of file Domaine_IJK.h.

◆ convert_ijk_cell_to_packed() [2/2]

int Domaine_IJK::convert_ijk_cell_to_packed ( int i,
int j,
int k ) const

With three indices, find the local index of an element.

Parameters
iLocal index of an element along x axis.
jLocal index of an element along y axis.
kLocal index of an element along z axis.
Returns
The LOCAL index of an element.

Definition at line 1155 of file Domaine_IJK.cpp.

◆ convert_packed_to_ijk_cell()

FixedVector< int, 3 > Domaine_IJK::convert_packed_to_ijk_cell ( int index) const

Convert the local index of an element to a vector with IJK indices.

Adapted from Maillage_FT_IJK.h

Parameters
indexLocal index of the element.
Returns
Vector with IJK coordinates.

Definition at line 1173 of file Domaine_IJK.cpp.

◆ correct_perio_i_local()

int Domaine_IJK::correct_perio_i_local ( int direction,
int i ) const

Definition at line 1540 of file Domaine_IJK.cpp.

◆ creer_faces()

Faces * Domaine_IJK::creer_faces ( )

renvoie new(Faces) ! elle est surchargee par Domaine_VDF par ex.

Definition at line 904 of file Domaine_IJK.cpp.

◆ Edges_Dir_To_Localisation()

Localisation Domaine_IJK::Edges_Dir_To_Localisation ( int direction)
inlinestatic

Definition at line 70 of file Domaine_IJK.h.

◆ Faces_Dir_To_Localisation()

Localisation Domaine_IJK::Faces_Dir_To_Localisation ( int direction)
inlinestatic

Returns the face according to the direction.

Parameters
directionIn IJK, x(0), y(1) or z(2).
Returns
A face

Definition at line 63 of file Domaine_IJK.h.

◆ ft_extension()

int Domaine_IJK::ft_extension ( ) const
inline

Definition at line 606 of file Domaine_IJK.h.

◆ get_constant_delta()

double Domaine_IJK::get_constant_delta ( int direction) const
inline

Returns the size of cells in a direction.

This requires the size of all cells in this direction to be the same, Which means is_uniform(direction) has to be true.

Parameters
directionIn IJK, x(0), y(1) or z(2).
Returns
length of cells in this direction.

Definition at line 387 of file Domaine_IJK.h.

◆ get_coord_of_dof_along_dir()

double Domaine_IJK::get_coord_of_dof_along_dir ( int dir,
int i,
Localisation loc ) const
inline

Definition at line 674 of file Domaine_IJK.h.

◆ get_coords_of_dof()

Vecteur3 Domaine_IJK::get_coords_of_dof ( int i,
int j,
int k,
Localisation loc ) const

Determines the dof of an element along a localisation.

TODO: Not sure about the brief?

Parameters
iLocal index of an element along x axis.
jLocal index of an element along y axis.
kLocal index of an element along z axis.
InIJK, ELEM, NODES, EDGES_I, EDGES_J, EDGES_K, FACES_I, FACES_J or FACES_K.
Returns
A vector with the coordinates of dof

Definition at line 1127 of file Domaine_IJK.cpp.

◆ get_delta()

const ArrOfDouble & Domaine_IJK::get_delta ( int direction) const
inline

Returns the array of mesh cell sizes in requested direction.

Parameters
directionIn IJK, x(0), y(1) or z(2).
Returns
Array with the sizes.

Definition at line 373 of file Domaine_IJK.h.

◆ get_domain_length()

double Domaine_IJK::get_domain_length ( int direction) const

Returns the length of the entire domain in requested direction.

Parameters
directionIn IJK, x(0), y(1) or z(2).
Returns
Global length of the domain

Definition at line 952 of file Domaine_IJK.cpp.

◆ get_i_along_dir_no_perio()

int Domaine_IJK::get_i_along_dir_no_perio ( int direction,
double coord_dir,
Domaine_IJK::Localisation loc ) const

Definition at line 1571 of file Domaine_IJK.cpp.

◆ get_i_along_dir_perio()

int Domaine_IJK::get_i_along_dir_perio ( int direction,
double coord_dir,
Domaine_IJK::Localisation loc ) const

Definition at line 1594 of file Domaine_IJK.cpp.

◆ get_ijk_from_coord()

Int3 Domaine_IJK::get_ijk_from_coord ( double coord_x,
double coord_y,
double coord_z,
Domaine_IJK::Localisation loc ) const

Definition at line 1601 of file Domaine_IJK.cpp.

◆ get_ijk_from_independent_index()

Int3 Domaine_IJK::get_ijk_from_independent_index ( int independent_index) const

Definition at line 1466 of file Domaine_IJK.cpp.

◆ get_independent_index()

int Domaine_IJK::get_independent_index ( int i,
int j,
int k ) const

independent_index adds a ghost_size to the packed index. It is similar to the linear_index defined in IJK_Field_local_template, but with a universal, predefined ghost_size of 256 instead of a field-dependent ghost_size. Since the ghost_size_ value is larger than any ghost_size expected to be used in practice, any virtual cell can be represented by the independent index.

Definition at line 1454 of file Domaine_IJK.cpp.

◆ get_independent_index_from_signed_independent_index()

int Domaine_IJK::get_independent_index_from_signed_independent_index ( int signed_independent_index) const

Definition at line 1496 of file Domaine_IJK.cpp.

◆ get_local_mesh_delta()

void Domaine_IJK::get_local_mesh_delta ( int direction,
int ghost_cells,
ArrOfDouble_with_ghost & delta ) const

Fills the "delta" array with the size of the cells owned by the processor in the requested direction.

"delta" is redimensionned with the specified number of ghost cells and filled. If domain is periodic, takes periodic mesh size in ghost cells on first and last subdomain, if domain is not periodic, copy the size of the first and last cell into ghost cells in the walls.

Parameters
directionIn IJK, x(0), y(1) or z(2).
ghost_cellsSize of the ghost cells
deltaSize of cells in each direction

Definition at line 972 of file Domaine_IJK.cpp.

◆ get_local_slice_index()

int Domaine_IJK::get_local_slice_index ( int direction) const
inline

Returns the position of the local subdomain in the requested direction.

Parameters
directionIn IJK, x(0), y(1) or z(2)
Returns
processor_position_[direction]

Definition at line 315 of file Domaine_IJK.h.

◆ get_nb_edges_local()

int Domaine_IJK::get_nb_edges_local ( int compo,
int direction ) const
inline

Returns the number, in requested direction, of edges of faces in direction of "compo".

The last face of the last element is owned by the next processor.

Parameters
compodirection In IJK, horizontal(0), vertical(1) or z-axis depth(2)
directionIn IJK, x(0), y(1) or z(2)
Returns
nb_faces_local_[compo][direction]

Definition at line 250 of file Domaine_IJK.h.

◆ get_nb_elem_local() [1/2]

int Domaine_IJK::get_nb_elem_local ( ) const
inline

Returns the number of element owned by this processor.

Definition at line 205 of file Domaine_IJK.h.

◆ get_nb_elem_local() [2/2]

int Domaine_IJK::get_nb_elem_local ( int direction) const
inline

Returns the number of elements owned by this processor in the given direction.

Parameters
directionIn IJK, x(0), y(1) or z(2)
Returns
nb_elem_local_[direction]

Definition at line 197 of file Domaine_IJK.h.

◆ get_nb_elem_tot() [1/2]

int Domaine_IJK::get_nb_elem_tot ( ) const
inline

Returns the total (global) number of mesh cells.

Definition at line 277 of file Domaine_IJK.h.

◆ get_nb_elem_tot() [2/2]

int Domaine_IJK::get_nb_elem_tot ( int direction) const
inline

Returns the total (global) number of mesh cells in requested direction.

Parameters
directionIn IJK, x(0), y(1) or z(2).
Returns
Number of elements

Definition at line 269 of file Domaine_IJK.h.

◆ get_nb_faces_local()

int Domaine_IJK::get_nb_faces_local ( int compo,
int direction ) const
inline

Returns the number, in requested direction, of faces that are oriented in direction of "compo".

The last face of the last element is owned by the next processor.

Parameters
compodirection In IJK, horizontal(0), vertical(1) or z-axis depth(2)
directionIn IJK, x(0), y(1) or z(2)
Returns
nb_faces_local_[compo][direction]

Definition at line 235 of file Domaine_IJK.h.

◆ get_nb_items_global()

int Domaine_IJK::get_nb_items_global ( Localisation loc,
int direction ) const

Returns the number of local items (on this processor) for the given localisation in the requested direction.

If periodic along requested direction, need to add the last item for nodes and faces.

Parameters
locIn IJK, ELEM, NODES, EDGES_I, EDGES_J, EDGES_K, FACES_I, FACES_J or FACES_K
directionIn IJK, x(0), y(1) or z(2)
Returns
Number of requested items

If periodic along requested direction, need to add the last item for nodes and faces.

Parameters
locIn IJK, ELEM, NODES, FACES_I, FACES_J, FACES_K, EDGES_I, EDGES_J or EDGES_K
directionIn IJK, x(0), y(1) or z(2)
Returns
Number of requested items

Definition at line 1021 of file Domaine_IJK.cpp.

◆ get_nb_items_local()

int Domaine_IJK::get_nb_items_local ( Localisation loc,
int direction ) const

Returns the number of local items (on this processor) for the given localisation in the requested direction.

Parameters
locIn IJK, ELEM, NODES, EDGES_I, EDGES_J, EDGES_K, FACES_I, FACES_J or FACES_K
directionIn IJK, x(0), y(1) or z(2)
Returns
Number of requested items
Parameters
locIn IJK, ELEM, NODES, FACES_I, FACES_J, FACES_K, ELEM_I, ELEM_J or ELEM_K
directionIn IJK, x(0), y(1) or z(2)
Returns
Number of requested items

Definition at line 917 of file Domaine_IJK.cpp.

◆ get_nb_nodes_local()

int Domaine_IJK::get_nb_nodes_local ( int direction) const
inline

Returns the number of nodes owned by this processor (generally equal to nb_elem_local()).

The last node of the last element is owned by the next processor.

Parameters
directionIn IJK, x(0), y(1) or z(2)
Returns
nb_nodes_local_[dir]

Definition at line 221 of file Domaine_IJK.h.

◆ get_neighbour_processor()

int Domaine_IJK::get_neighbour_processor ( int previous_or_next,
int direction ) const
inline

Returns the index of the requested neighbour processor (-1 if no neighbour).

previous_or_next = 0 => get processor at left (in the direction of smaller indices). previous_or_next = 1 => get processor at right (in the direction of the larger indices).

Parameters
preivous_or_next0 or 1, previous or next one respectively.
directionIn IJK, x(0), y(1) or z(2).
Returns
neighbour_processors_[previous_or_next][dir]

Definition at line 331 of file Domaine_IJK.h.

◆ get_node_coordinates()

const ArrOfDouble & Domaine_IJK::get_node_coordinates ( int direction) const
inline

Returns an array with the coordinates of all nodes in the mesh in requested direction.

Parameters
directionIn IJK, x(0), y(1) or z(2).
Returns
node_coordinates_xyz_[direction]

Definition at line 353 of file Domaine_IJK.h.

◆ get_nprocessor_per_direction()

int Domaine_IJK::get_nprocessor_per_direction ( int direction) const
inline

Returns the number of slices in the given direction.

Parameters
directionIn IJK, x(0), y(1) or z(2).
Returns
nproc_per_direction_[direction]

Definition at line 343 of file Domaine_IJK.h.

◆ get_offset_local()

int Domaine_IJK::get_offset_local ( int direction) const
inline

Returns the local offset in requested direction.

Parameters
directionIn IJK, x(0), y(1) or z(2)
Returns
offset_[direction]

Definition at line 304 of file Domaine_IJK.h.

◆ get_origin()

double Domaine_IJK::get_origin ( int direction) const
inline

Returns the coordinate of the first node (global) of the mesh in the requested direction.

Parameters
directionIn IJK, x(0), y(1) or z(2).
Returns
coordinate.

Definition at line 363 of file Domaine_IJK.h.

◆ get_periodic_flag()

bool Domaine_IJK::get_periodic_flag ( int direction) const
inline

Method returns true if periodic in this direction.

Parameters
directionIn IJK, x(0), y(1) or z(2).
Returns
true or false

Definition at line 575 of file Domaine_IJK.h.

◆ get_phase_from_signed_independent_index()

int Domaine_IJK::get_phase_from_signed_independent_index ( int signed_independent_index) const

Definition at line 1502 of file Domaine_IJK.cpp.

◆ get_processor_by_ijk() [1/2]

int Domaine_IJK::get_processor_by_ijk ( const FixedVector< int, 3 > & slice) const
inline

Return the global index of the processor according to its position.

Parameters
sliceVector with the x, y, and z coordinate of the processor.
Returns
mapping_(slice[0], slice[1], slice[2])

Definition at line 448 of file Domaine_IJK.h.

◆ get_processor_by_ijk() [2/2]

int Domaine_IJK::get_processor_by_ijk ( int slice_i,
int slice_j,
int slice_k ) const
inline

Return the global index of the processor according to its position.

Parameters
slice_iFirst index of the processor in the global mapping
slice_jSecond index of the processor in the global mapping
slice_kThird index of the processor in the global mapping
Returns
return mapping_(slice_i, slice_j, slice_k)

Definition at line 460 of file Domaine_IJK.h.

◆ get_processor_mapping()

void Domaine_IJK::get_processor_mapping ( IntTab & mapping) const
inline

Fills an array containing the mapping of processors.

For 3 slices indices i,j,k, the processor that owns the intersection of these slices is mapping(i,j,k).

Parameters
mappingTable in which we'll copy the mapping

Definition at line 420 of file Domaine_IJK.h.

◆ get_signed_independent_index()

int Domaine_IJK::get_signed_independent_index ( int phase,
int i,
int j,
int k ) const

signed_independent_index: encodes in the sign the phase of the cell in a two-phase flow: positive sign for phase 0, and negative sign for phase 1. With a cut-cell method, this can be used to disambiguate the sub-cell.

Definition at line 1490 of file Domaine_IJK.cpp.

◆ get_slice_offsets()

void Domaine_IJK::get_slice_offsets ( int direction,
ArrOfInt & tab ) const
inline

Returns the indices of the first cell in requested direction of every slices in this direction.

Parameters
directionIn IJK, x(0), y(1) or z(2).
tabArray in which we'll store the offsets in that direction

Definition at line 428 of file Domaine_IJK.h.

◆ get_slice_size()

void Domaine_IJK::get_slice_size ( int direction,
Localisation loc,
ArrOfInt & tab ) const

Returns the number of items of given location (elements, nodes, faces...) for all slices in the requested direction.

Parameters
directionIn IJK, x(0), y(1) or z(2).
locIn IJK, ELEM, NODES, EDGES_I, EDGES_J, EDGES_K, FACES_I, FACES_J or FACES_K
tabArray in which we'll store the number of slices in given direction

Definition at line 1076 of file Domaine_IJK.cpp.

◆ get_volume_elem()

const DoubleVect & Domaine_IJK::get_volume_elem ( ) const
inline

Returns volume_elem_.

Definition at line 598 of file Domaine_IJK.h.

◆ init_subregion()

void Domaine_IJK::init_subregion ( const Domaine_IJK & src,
int ni,
int nj,
int nk,
int offset_i,
int offset_j,
int offset_k,
const Nom & subregion_name,
bool perio_x = false,
bool perio_y = false,
bool perio_z = false )

Builds the geometry, parallel splitting and DOF correspondance between a "father" region and a "son" region which is a subpart of the father region.

Only conformal subregion is supported for now, with ELEMENT types. Missing features: be able to build a subregion which is the boundary of another, eg: father is "3D elements", son is "2D faces".

Parameters
niNumber of elements in direction(0)
njNumber of elements in direction(1)
nkNumber of elements in direction(2)
offset_iOffset along x axis for the "son" subregion
offset_jOffset along x axis for the "son" subregion
offset_kOffset along x axis for the "son" subregion
subregion_nameName of the "son" subregion
perio_xWhether if domain is periodic along x axis
perio_yWhether if domain is periodic along y axis
perio_zWhether if domain is periodic along z axis
   Only conformal subregion is supported for now, with ELEMENT types.
   Missing features: be able to build a subregion which is the boundary
   of another, eg: father is "3D elements", son is "2D faces".
Parameters
niNumber of elements in direction(0)
njNumber of elements in direction(1)
nkNumber of elements in direction(2)
offset_iOffset along x axis for the "son" subregion
offset_jOffset along x axis for the "son" subregion
offset_kOffset along x axis for the "son" subregion
subregion_nameName of the "son" subregion
perio_xWhether if domain is periodic along x axis
perio_yWhether if domain is periodic along y axis
perio_zWhether if domain is periodic along z axis

Definition at line 715 of file Domaine_IJK.cpp.

◆ initialize_from_unstructured()

void Domaine_IJK::initialize_from_unstructured ( const Domaine & domaine,
int direction_for_x,
int direction_for_y,
int direction_for_z,
bool perio_x,
bool perio_y,
bool perio_z )

Definition at line 300 of file Domaine_IJK.cpp.

◆ initialize_mapping()

void Domaine_IJK::initialize_mapping ( Domaine_IJK & geom,
const ArrOfInt & slice_size_i,
const ArrOfInt & slice_size_j,
const ArrOfInt & slice_size_k,
const IntTab & processor_mapping )

Creates a splitting of the domain by specifying the slice sizes and the processor mapping.

The total cell number in directions i, j, and k must match the total number of cells in the whole geometry for each direction. The number of slices in each direction must match each corresponding dimensions of the mapping array. All processors do not have to be used!

Parameters
slice_size_iContains for each slice in the i direction, the number of cells this slice.
slice_size_jContains for each slice in the j direction, the number of cells this slice.
slice_size_kContains for each slice in the k direction, the number of cells this slice.
processor_mappingProvides the rank of the mpi process that will own this subdomain.
   The total cell number in directions i, j, and k must match the
   total number of cells in the whole geometry for each direction.
   The number of slices in each direction must match each corresponding
   dimensions of the mapping array.
   All processors do not have to be used!
Parameters
slice_size_iContains for each slice in the i direction, the number of cells this slice.
slice_size_jContains for each slice in the j direction, the number of cells this slice.
slice_size_kContains for each slice in the k direction, the number of cells this slice.
processor_mappingProvides the rank of the mpi process that will own this subdomain.

Definition at line 504 of file Domaine_IJK.cpp.

◆ initialize_origin_deltas()

void Domaine_IJK::initialize_origin_deltas ( double x0,
double y0,
double z0,
const ArrOfDouble & delta_x,
const ArrOfDouble & delta_y,
const ArrOfDouble & delta_z,
bool perio_x,
bool perio_y,
bool perio_z )

Initializes class elements given dataset's parameters.

Parameters
x0Origin of the whole domain on the x axis.
y0Origin of the whole domain on the y axis.
z0Origin of the whole domain on the z axis.
delta_xArray with the sizes of the elements on the x axis.
delta_yArray with the sizes of the elements on the y axis.
delta_zArray with the sizes of the elements on the z axis.
perio_xPeriodic flag along x axis.
perio_yPeriodic flag along y axis.
perio_zPeriodic flag along z axis.

Definition at line 655 of file Domaine_IJK.cpp.

◆ initialize_splitting()

void Domaine_IJK::initialize_splitting ( Domaine_IJK & geom,
int nproc_i,
int nproc_j,
int nproc_k,
int process_grouping_i = 1,
int process_grouping_j = 1,
int process_grouping_k = 1 )

Buils a splitting of the given deometry on the requested number of processors in each direction.

Process_grouping allows to rearrange process ranks by packets of ni*nj*nk processes to matc the topology of the cluster/node. ex: 8 cores node/machine => use groups of size 2x2x2 to minimize extra-node messages.

Parameters
nproc_iNumber of processors in i direction.
nproc_jNumber of processors in j direction.
nproc_kNumber of processors in k direction.
process_grouping_i1 by default. Number of processors per subdomain in i direction.
process_grouping_j1 by default. Number of processors per subdomain in j direction.
process_grouping_k1 by default. Number of processors per subdomain in k direction.
   Process_grouping allows to rearrange process ranks by packets of ni*nj*nk processes
   to matc the topology of the cluster/node. ex: 8 cores node/machine => use groups
   of size 2x2x2 to minimize extra-node messages.
Parameters
geomanother domaine
nproc_iNumber of processors in i direction.
nproc_jNumber of processors in j direction.
nproc_kNumber of processors in k direction.
process_grouping_i1 by default. Number of processors per subdomain in i direction.
process_grouping_j1 by default. Number of processors per subdomain in j direction.
process_grouping_k1 by default. Number of processors per subdomain in k direction.

Definition at line 377 of file Domaine_IJK.cpp.

◆ initialize_with_mapping()

void Domaine_IJK::initialize_with_mapping ( const ArrOfInt & slice_size_i,
const ArrOfInt & slice_size_j,
const ArrOfInt & slice_size_k,
const IntTab & processor_mapping )

Creates a splitting of the domain by specifying the mapping.

   The total cell number in directions i,j,k must match the total
   number of cells in each direction.
   The number of slices in direction i, j , k must match dimensions
   0,1 and 2 of the processor_mapping() array.
Parameters
slice_size_iContains, for each slice in the x direction, the number of cells in this slice.
slice_size_jContains, for each slice in the y direction, the number of cells in this slice.
slice_size_kContains, for each slice in the z direction, the number of cells in this slice.
processor_mappingProvides the rank of the mpi process that will have this subdomain.

Definition at line 766 of file Domaine_IJK.cpp.

◆ is_uniform()

bool Domaine_IJK::is_uniform ( int direction) const
inline

Method returns true if uniform in this direction.

Parameters
directionIn IJK, x(0), y(1) or z(2).
Returns
true or false

Definition at line 585 of file Domaine_IJK.h.

◆ periodic_get_processor_by_ijk()

int Domaine_IJK::periodic_get_processor_by_ijk ( int slice_i,
int slice_j,
int slice_k ) const

Returns the processor associated with slice indices i,j,k accounting for periodicity e.g. a slice index -1 can refer to the last slice along a periodic direction.

Definition at line 1404 of file Domaine_IJK.cpp.

◆ search_elem()

void Domaine_IJK::search_elem ( const double & x,
const double & y,
const double & z,
FixedVector< int, 3 > & ijk_global,
FixedVector< int, 3 > & ijk_local,
FixedVector< int, 3 > & ijk_me ) const

Find the element which contains the item's coodirnates.

The element's coordinates can be outside of this processor's subdomain.

Parameters
xFirst coordinate of an item in the mesh.
ySecond coordinate of an item in the mesh.
zThird coordinate of an item in the mesh.
ijk_globalThe global coordinates of the cell.
ijk_localThe local coordinates of the cell.
ijk_meA sort of 3D flag. Will be [1,1,1] if the element belongs to me.

Definition at line 1205 of file Domaine_IJK.cpp.

◆ set_extension_from_bulle_param()

void Domaine_IJK::set_extension_from_bulle_param ( double vol_bulle,
double diam_bulle )

Definition at line 1391 of file Domaine_IJK.cpp.

◆ update_volume_elem()

void Domaine_IJK::update_volume_elem ( )

Updates volume_elem_ / ! \ If the grid changes, this needs to be called again!

Definition at line 1234 of file Domaine_IJK.cpp.

◆ within_ghost()

bool Domaine_IJK::within_ghost ( int i,
int j,
int k,
int negative_ghost_size,
int positive_ghost_size ) const

Check whether the cell (i,j,k) is contained within the specified ghost along any direction.

Definition at line 1510 of file Domaine_IJK.cpp.

◆ within_ghost_()

template<int _DIR_>
bool Domaine_IJK::within_ghost_ ( int i,
int j,
int k,
int negative_ghost_size,
int positive_ghost_size ) const
inline

Definition at line 512 of file Domaine_IJK.h.

◆ within_ghost_along_dir()

bool Domaine_IJK::within_ghost_along_dir ( int dir,
int i,
int j,
int k,
int negative_ghost_size,
int positive_ghost_size ) const

Check whether the cell (i,j,k) is contained within the specified ghost along a specific direction.

Definition at line 1521 of file Domaine_IJK.cpp.


The documentation for this class was generated from the following files:
  • /home/docs/checkouts/readthedocs.org/user_builds/cea-trust-platform/checkouts/master/src/Kernel/IJK/Framework/Domaine_IJK.h
  • /home/docs/checkouts/readthedocs.org/user_builds/cea-trust-platform/checkouts/master/src/Kernel/IJK/Framework/Domaine_IJK.cpp