|
TRUST 1.9.8
HPC thermohydraulic platform
|
This class encapsulates all the information related to the eulerian mesh for TrioIJK. More...
#include <Domaine_IJK.h>
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 Nom & | le_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_base & | get_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) |
| Entree & | lire_bords_a_imprimer (Entree &s) |
| Entree & | lire_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 Nom & | get_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_data > | data_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 Sortie & | printOn (Sortie &) const |
| Ecriture de l'objet sur un flot de sortie Methode a surcharger. | |
| virtual Entree & | readOn (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_info * | get_info () const |
| Donne des informations sur le type de l'Objet_U. | |
| const Nom & | que_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 Interprete & | interprete () const |
| Interprete & | interprete () |
| 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 Nom & | nom_du_cas () |
| Renvoie une reference constante vers le nom du cas. | |
| static Nom & | get_set_nom_du_cas () |
| Renvoie une reference non constante vers le nom du cas (pour pouvoir le modifier). | |
| static const Type_info * | info () |
| Donne des informations sur le type de l'Objet_U. | |
| static const Objet_U & | self_cast (const Objet_U &) |
| methode ajoutee pour caster en python | |
| static Objet_U & | self_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 Sortie & | Journal (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_U & | operator= (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 |
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.
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 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.
| Domaine_IJK::Domaine_IJK | ( | ) |
Definition at line 36 of file Domaine_IJK.cpp.
|
inline |
Converts the ijk index of an element to a cell index.
Adapted from Maillage_FT_IJK.h
| ijk | Vector with the x, y, and z coordinates. |
Definition at line 531 of file Domaine_IJK.h.
| 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.
| i | Local index of an element along x axis. |
| j | Local index of an element along y axis. |
| k | Local index of an element along z axis. |
Definition at line 1155 of file Domaine_IJK.cpp.
| 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
| index | Local index of the element. |
Definition at line 1173 of file Domaine_IJK.cpp.
| int Domaine_IJK::correct_perio_i_local | ( | int | direction, |
| int | i ) const |
Definition at line 1540 of file Domaine_IJK.cpp.
| 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.
|
inlinestatic |
Definition at line 70 of file Domaine_IJK.h.
|
inlinestatic |
Returns the face according to the direction.
| direction | In IJK, x(0), y(1) or z(2). |
Definition at line 63 of file Domaine_IJK.h.
|
inline |
Definition at line 606 of file Domaine_IJK.h.
|
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.
| direction | In IJK, x(0), y(1) or z(2). |
Definition at line 387 of file Domaine_IJK.h.
|
inline |
Definition at line 674 of file Domaine_IJK.h.
| 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?
| i | Local index of an element along x axis. |
| j | Local index of an element along y axis. |
| k | Local index of an element along z axis. |
| In | IJK, ELEM, NODES, EDGES_I, EDGES_J, EDGES_K, FACES_I, FACES_J or FACES_K. |
Definition at line 1127 of file Domaine_IJK.cpp.
|
inline |
Returns the array of mesh cell sizes in requested direction.
| direction | In IJK, x(0), y(1) or z(2). |
Definition at line 373 of file Domaine_IJK.h.
| double Domaine_IJK::get_domain_length | ( | int | direction | ) | const |
Returns the length of the entire domain in requested direction.
| direction | In IJK, x(0), y(1) or z(2). |
Definition at line 952 of file Domaine_IJK.cpp.
| 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.
| 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.
| 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.
| Int3 Domaine_IJK::get_ijk_from_independent_index | ( | int | independent_index | ) | const |
Definition at line 1466 of file Domaine_IJK.cpp.
| 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.
| int Domaine_IJK::get_independent_index_from_signed_independent_index | ( | int | signed_independent_index | ) | const |
Definition at line 1496 of file Domaine_IJK.cpp.
| 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.
| direction | In IJK, x(0), y(1) or z(2). |
| ghost_cells | Size of the ghost cells |
| delta | Size of cells in each direction |
Definition at line 972 of file Domaine_IJK.cpp.
|
inline |
Returns the position of the local subdomain in the requested direction.
| direction | In IJK, x(0), y(1) or z(2) |
Definition at line 315 of file Domaine_IJK.h.
|
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.
| compo | direction In IJK, horizontal(0), vertical(1) or z-axis depth(2) |
| direction | In IJK, x(0), y(1) or z(2) |
Definition at line 250 of file Domaine_IJK.h.
|
inline |
Returns the number of element owned by this processor.
Definition at line 205 of file Domaine_IJK.h.
|
inline |
Returns the number of elements owned by this processor in the given direction.
| direction | In IJK, x(0), y(1) or z(2) |
Definition at line 197 of file Domaine_IJK.h.
|
inline |
Returns the total (global) number of mesh cells.
Definition at line 277 of file Domaine_IJK.h.
|
inline |
Returns the total (global) number of mesh cells in requested direction.
| direction | In IJK, x(0), y(1) or z(2). |
Definition at line 269 of file Domaine_IJK.h.
|
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.
| compo | direction In IJK, horizontal(0), vertical(1) or z-axis depth(2) |
| direction | In IJK, x(0), y(1) or z(2) |
Definition at line 235 of file Domaine_IJK.h.
| 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.
| loc | In IJK, ELEM, NODES, EDGES_I, EDGES_J, EDGES_K, FACES_I, FACES_J or FACES_K |
| direction | In IJK, x(0), y(1) or z(2) |
If periodic along requested direction, need to add the last item for nodes and faces.
| loc | In IJK, ELEM, NODES, FACES_I, FACES_J, FACES_K, EDGES_I, EDGES_J or EDGES_K |
| direction | In IJK, x(0), y(1) or z(2) |
Definition at line 1021 of file Domaine_IJK.cpp.
| 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.
| loc | In IJK, ELEM, NODES, EDGES_I, EDGES_J, EDGES_K, FACES_I, FACES_J or FACES_K |
| direction | In IJK, x(0), y(1) or z(2) |
| loc | In IJK, ELEM, NODES, FACES_I, FACES_J, FACES_K, ELEM_I, ELEM_J or ELEM_K |
| direction | In IJK, x(0), y(1) or z(2) |
Definition at line 917 of file Domaine_IJK.cpp.
|
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.
| direction | In IJK, x(0), y(1) or z(2) |
Definition at line 221 of file Domaine_IJK.h.
|
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).
| preivous_or_next | 0 or 1, previous or next one respectively. |
| direction | In IJK, x(0), y(1) or z(2). |
Definition at line 331 of file Domaine_IJK.h.
|
inline |
Returns an array with the coordinates of all nodes in the mesh in requested direction.
| direction | In IJK, x(0), y(1) or z(2). |
Definition at line 353 of file Domaine_IJK.h.
|
inline |
Returns the number of slices in the given direction.
| direction | In IJK, x(0), y(1) or z(2). |
Definition at line 343 of file Domaine_IJK.h.
|
inline |
Returns the local offset in requested direction.
| direction | In IJK, x(0), y(1) or z(2) |
Definition at line 304 of file Domaine_IJK.h.
|
inline |
Returns the coordinate of the first node (global) of the mesh in the requested direction.
| direction | In IJK, x(0), y(1) or z(2). |
Definition at line 363 of file Domaine_IJK.h.
|
inline |
Method returns true if periodic in this direction.
| direction | In IJK, x(0), y(1) or z(2). |
Definition at line 575 of file Domaine_IJK.h.
| int Domaine_IJK::get_phase_from_signed_independent_index | ( | int | signed_independent_index | ) | const |
Definition at line 1502 of file Domaine_IJK.cpp.
|
inline |
Return the global index of the processor according to its position.
| slice | Vector with the x, y, and z coordinate of the processor. |
Definition at line 448 of file Domaine_IJK.h.
|
inline |
Return the global index of the processor according to its position.
| slice_i | First index of the processor in the global mapping |
| slice_j | Second index of the processor in the global mapping |
| slice_k | Third index of the processor in the global mapping |
Definition at line 460 of file Domaine_IJK.h.
|
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).
| mapping | Table in which we'll copy the mapping |
Definition at line 420 of file Domaine_IJK.h.
| 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.
|
inline |
Returns the indices of the first cell in requested direction of every slices in this direction.
| direction | In IJK, x(0), y(1) or z(2). |
| tab | Array in which we'll store the offsets in that direction |
Definition at line 428 of file Domaine_IJK.h.
| 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.
| direction | In IJK, x(0), y(1) or z(2). |
| loc | In IJK, ELEM, NODES, EDGES_I, EDGES_J, EDGES_K, FACES_I, FACES_J or FACES_K |
| tab | Array in which we'll store the number of slices in given direction |
Definition at line 1076 of file Domaine_IJK.cpp.
|
inline |
Returns volume_elem_.
Definition at line 598 of file Domaine_IJK.h.
| 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".
| ni | Number of elements in direction(0) |
| nj | Number of elements in direction(1) |
| nk | Number of elements in direction(2) |
| offset_i | Offset along x axis for the "son" subregion |
| offset_j | Offset along x axis for the "son" subregion |
| offset_k | Offset along x axis for the "son" subregion |
| subregion_name | Name of the "son" subregion |
| perio_x | Whether if domain is periodic along x axis |
| perio_y | Whether if domain is periodic along y axis |
| perio_z | Whether 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".
| ni | Number of elements in direction(0) |
| nj | Number of elements in direction(1) |
| nk | Number of elements in direction(2) |
| offset_i | Offset along x axis for the "son" subregion |
| offset_j | Offset along x axis for the "son" subregion |
| offset_k | Offset along x axis for the "son" subregion |
| subregion_name | Name of the "son" subregion |
| perio_x | Whether if domain is periodic along x axis |
| perio_y | Whether if domain is periodic along y axis |
| perio_z | Whether if domain is periodic along z axis |
Definition at line 715 of file Domaine_IJK.cpp.
| 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.
| 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!
| slice_size_i | Contains for each slice in the i direction, the number of cells this slice. |
| slice_size_j | Contains for each slice in the j direction, the number of cells this slice. |
| slice_size_k | Contains for each slice in the k direction, the number of cells this slice. |
| processor_mapping | Provides 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!
| slice_size_i | Contains for each slice in the i direction, the number of cells this slice. |
| slice_size_j | Contains for each slice in the j direction, the number of cells this slice. |
| slice_size_k | Contains for each slice in the k direction, the number of cells this slice. |
| processor_mapping | Provides the rank of the mpi process that will own this subdomain. |
Definition at line 504 of file Domaine_IJK.cpp.
| 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.
| x0 | Origin of the whole domain on the x axis. |
| y0 | Origin of the whole domain on the y axis. |
| z0 | Origin of the whole domain on the z axis. |
| delta_x | Array with the sizes of the elements on the x axis. |
| delta_y | Array with the sizes of the elements on the y axis. |
| delta_z | Array with the sizes of the elements on the z axis. |
| perio_x | Periodic flag along x axis. |
| perio_y | Periodic flag along y axis. |
| perio_z | Periodic flag along z axis. |
Definition at line 655 of file Domaine_IJK.cpp.
| 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.
| nproc_i | Number of processors in i direction. |
| nproc_j | Number of processors in j direction. |
| nproc_k | Number of processors in k direction. |
| process_grouping_i | 1 by default. Number of processors per subdomain in i direction. |
| process_grouping_j | 1 by default. Number of processors per subdomain in j direction. |
| process_grouping_k | 1 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.
| geom | another domaine |
| nproc_i | Number of processors in i direction. |
| nproc_j | Number of processors in j direction. |
| nproc_k | Number of processors in k direction. |
| process_grouping_i | 1 by default. Number of processors per subdomain in i direction. |
| process_grouping_j | 1 by default. Number of processors per subdomain in j direction. |
| process_grouping_k | 1 by default. Number of processors per subdomain in k direction. |
Definition at line 377 of file Domaine_IJK.cpp.
| 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.
| slice_size_i | Contains, for each slice in the x direction, the number of cells in this slice. |
| slice_size_j | Contains, for each slice in the y direction, the number of cells in this slice. |
| slice_size_k | Contains, for each slice in the z direction, the number of cells in this slice. |
| processor_mapping | Provides the rank of the mpi process that will have this subdomain. |
Definition at line 766 of file Domaine_IJK.cpp.
|
inline |
Method returns true if uniform in this direction.
| direction | In IJK, x(0), y(1) or z(2). |
Definition at line 585 of file Domaine_IJK.h.
| 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.
| 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.
| x | First coordinate of an item in the mesh. |
| y | Second coordinate of an item in the mesh. |
| z | Third coordinate of an item in the mesh. |
| ijk_global | The global coordinates of the cell. |
| ijk_local | The local coordinates of the cell. |
| ijk_me | A sort of 3D flag. Will be [1,1,1] if the element belongs to me. |
Definition at line 1205 of file Domaine_IJK.cpp.
| void Domaine_IJK::set_extension_from_bulle_param | ( | double | vol_bulle, |
| double | diam_bulle ) |
Definition at line 1391 of file Domaine_IJK.cpp.
| 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.
| 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.
|
inline |
Definition at line 512 of file Domaine_IJK.h.
| 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.