TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Domaine_PolyMAC_MPFA Class Reference

#include <Domaine_PolyMAC_MPFA.h>

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

Public Member Functions

void discretiser () override
void init_stencils () const
 Initializes the face stencils for gradient computation.
void fgrad (int N, int is_p, const Conds_lim &cls, const IntTab &fcl, const DoubleTab *nu, const IntTab *som_ext, int virt, int full_stencil, IntTab &phif_d, IntTab &phif_e, DoubleTab &phif_c) const
 Computes field gradient interpolation at faces while preserving constant fields.
Public Member Functions inherited from Domaine_PolyMAC_HFV
void calculer_volumes_entrelaces () override
const DoubleTab & surf_elem_arete () const
void M1 (const DoubleTab *nu, int e, DoubleTab &m1) const
void W1 (const DoubleTab *nu, int e, DoubleTab &w1, DoubleTab &v_e, DoubleTab &v_ea) const
Public Member Functions inherited from Domaine_PolyMAC_CDO
void swap (int, int, int)
void modifier_pour_Cl (const Conds_lim &) override
void init_equiv () const override
const IntTab & arete_faces () const
void calculer_h_carre () override
double dot (const double *a, const double *b, const double *ma=nullptr, const double *mb=nullptr) const
KOKKOS_INLINE_FUNCTION double dot (const int dim, const double *a, const double *b, const double *ma=nullptr, const double *mb=nullptr) const
void init_ve () const
void init_rf () const
void ajouter_stabilisation (DoubleTab &M, DoubleTab &N) const
int W_stabiliser (DoubleTab &W, DoubleTab &R, DoubleTab &N, int *ctr, double *spectre) const
void init_m2 () const
void init_m2solv () const
void init_we () const
void init_we_2d () const
void init_we_3d () const
void init_m1 () const
void init_m1_2d () const
void init_m1_3d () const
void init_virt_ef_map () const
void M2 (const DoubleTab *nu, int e, DoubleTab &m2) const
void W2 (const DoubleTab *nu, int e, DoubleTab &w2) const
Public Member Functions inherited from Domaine_Poly_base
void typer_elem (Domaine &domaine_geom) override
void discretiser_aretes ()
void orthocentrer ()
const DoubleVect & longueur_aretes () const
const DoubleTab & ta () const
const Elem_poly_basetype_elem () const
int nb_elem_Cl () const
int nb_faces_joint () const
int nb_faces_std () const
int nb_elem_std () const
double carre_pas_du_maillage () const
double carre_pas_maille (int i) const
IntVect & rang_elem_non_std ()
const IntVect & rang_elem_non_std () const
DoubleTab & volumes_entrelaces_dir ()
const DoubleTab & volumes_entrelaces_dir () const
double nu_dot (const DoubleTab *nu, int e, int n, const double *a, const double *b, const double *ma=nullptr, const double *mb=nullptr) const
double dist_norm (int num_face) const override
double dist_norm_bord (int num_face) const override
DoubleVect & dist_norm_bord (DoubleVect &, const Nom &nom_bord) const
double dist_face_elem0 (int num_face, int n0) const override
double dist_face_elem1 (int num_face, int n1) const override
double dist_face_elem0_period (int num_face, int n0, double l) const override
double dist_face_elem1_period (int num_face, int n1, double l) const override
void detecter_faces_non_planes () const
const IntTab & equiv () const
const Static_Int_Lists & som_elem () const
const IntTab & elem_som_d () const
const IntTab & elem_arete_d () const
const DoubleTab & vol_elem_som () const
const DoubleTab & pvol_som (const DoubleVect &poro) const
void calculer_infos_aretes ()
void fill_normales ()
void recalculer_xv ()
Public Member Functions inherited from Domaine_VF
virtual double face_normales (int face, int comp) const
virtual DoubleTab & face_normales ()
virtual const DoubleTab & face_normales () const
void calculer_face_surfaces (const DoubleVect &surfaces)
virtual const DoubleVect & face_surfaces () const
virtual double face_surfaces (int i) const
virtual double surface (int i) const
void discretiser () override
 Genere les faces construits les frontieres.
void discretiser_no_face () override
void typer_discretiser_ss_domaine (int i) override
void infobord ()
void info_elem_som ()
void marquer_faces_double_contrib (const Conds_lim &)
virtual void remplir_face_voisins_fictifs (const Domaine_Cl_dis_base &)
virtual Faces * creer_faces ()
 renvoie new(Faces) ! elle est surchargee par Domaine_VDF par ex.
int nb_joints () const
int premiere_face_int () const
 une face est interne ssi elle separe deux elements.
int nb_faces () const
 renvoie le nombre global de faces.
int nb_faces_tot () const
 renvoie le nombre total de faces.
int nb_som_face () const
 renvoie le nombre de sommets par face.
int nb_arete_face () const
 renvoie le nombre d'aretes par face.
int nb_faces_bord () const
 renvoie le nombre de faces sur lesquelles sont appliquees les conditions limites :
int nb_faces_bord_tot () const
 renvoie le nombre total de faces sur lesquelles sont appliquees les conditions limites :
int premiere_face_bord () const
 renvoie le numero de la premiere des faces sur lesquelles sont appliquees les conditions limites :
int nb_faces_internes () const
 une face est interne ssi elle separe deux elements.
double xv (int num_face, int k) const
double xp (int num_elem, int k) const
double xa (int num_arete, int k) const
int face_numero_bord (int num_face) const
IntTab & face_numero_bord ()
const IntTab & face_numero_bord () const
void remplir_face_numero_bord ()
ArrOfInt & est_face_bord ()
const ArrOfInt & est_face_bord () const
virtual const IntVect & orientation () const
virtual int orientation (int) const
virtual int orientation_si_definie (int) const
DoubleTab normalized_boundaries_outward_vector (int global_face_number, double scale_factor) const
 Compute the normalized boundary outward vector associated to the face global_face_number and eventually scaled by scale_factor.
DoubleTab & xv ()
const DoubleTab & xv () const
DoubleTab & xp ()
const DoubleTab & xp () const
DoubleTab & xa ()
const DoubleTab & xa () const
DoubleVect & volumes_entrelaces ()
const DoubleVect & volumes_entrelaces () const
double volumes_entrelaces (int num_face) const
const DoubleTab & volumes_entrelaces_dir () const
DoubleTab & volumes_entrelaces_dir ()
const Joint & joint (int i) const
Joint & joint (int i)
Frontiere_dis_basefrontiere_dis (int) override
 renvoie la ieme frontiere_discrete.
const Frontiere_dis_basefrontiere_dis (int) const override
 renvoie la ieme frontiere_discrete.
int nb_frontiere_dis () const
const Front_VFfront_VF (int i) const
double volumes (int i) const
double inverse_volumes (int i) const
int face_voisins (int num_face, int i) const
 renvoie l'element voisin de numface dans la direction i.
int elem_faces (int i, int j) const
 renvoie le numero de le ieme face de la maille num_elem la facon dont ces faces sont numerotees est
int face_sommets (int i, int j) const
 renvoie le numero du ieme sommet de la face num_face.
DoubleVect & volumes ()
DoubleVect & inverse_volumes ()
const DoubleVect & volumes () const
const DoubleVect & inverse_volumes () const
IntTab & face_voisins () override
 renvoie le tableaux des volumes des connectivites face elements cf au dessus.
const IntTab & face_voisins () const override
 cf au dessus.
const IntTab & face_voisins_fictifs () const
void face_voisins_reel_fictif (int face, int &el0, int &elf) const
 renvoie dans el0 le numero de l'elt a l'interieur renvoie dans elf le numero de l'elt fictif (-1 si il n'existe pas)
IntTab & elem_faces ()
 renvoie le tableau de connectivite element/faces
const IntTab & elem_faces () const
 cf au dessus.
ArrOfInt & faces_doubles ()
 renvoie 1 pour les faces appartenant a un bord perio ou un item commun, 0 par defaut
const ArrOfInt & faces_doubles () const
 cf au dessus
IntTab & face_sommets () override
 renvoie le tableau de connectivite faces/sommets.
const IntTab & face_sommets () const override
 cf au dessus.
IntTab & face_aretes () override
 renvoie le tableau de connectivite faces/aretes.
const IntTab & face_aretes () const override
 cf au dessus.
void modifier_pour_Cl (const Conds_lim &) override
int numero_face_local (int face, int elem) const
int numero_sommet_local (int som, int elem) const
const IntTab & get_num_fac_loc () const
int get_num_fac_loc (int, int) const
void construire_num_fac_loc ()
const ArrOfInt & ind_faces_virt_bord () const
int est_une_face_virt_bord (int) const
 renvoie 1 si face est une face virtuelle de bord, 0 sinon
int fbord (int f) const
void construire_face_virt_pe_num ()
 Remplissage du tableau face_virt_pe_num_ (voir commentaire dans Domaine_VF.
const IntTab & face_virt_pe_num () const
void creer_tableau_faces (Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
void creer_tableau_aretes (Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
void creer_tableau_faces_bord (Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
const MD_Vectormd_vector_faces_bord () const
const MD_Vectormd_vector_faces () const
const MD_Vectormd_vector_aretes () const
virtual const DoubleTab & xv_bord () const
DoubleTab calculer_xgr () const
 calcul le tableau xgr pour le calcul des moments des forces aux bords :
virtual void get_position (DoubleTab &positions) const
virtual double compute_L1_norm (const DoubleVect &val_source, const bool basis_function, const int order) const
virtual double compute_L2_norm (const DoubleVect &val_source, const bool basis_function, const int order) const
virtual void compute_average (const DoubleVect &val_source, double &sum, double &volume, const bool basis_function, const int order) const
virtual void compute_average_porosity (const DoubleVect &val_source, const DoubleVect &porosity, double &sum, double &volume, const bool basis_function, const int order) const
virtual void get_nb_integ_points (IntTab &nelem) const
virtual void get_ind_integ_points (IntTab &nelem) const
virtual int get_max_nb_integ_points () const
double dot (const double *a, const double *b, const double *ma=nullptr, const double *mb=nullptr) const
std::array< double, 3 > cross (int dima, int dimb, const double *a, const double *b, const double *ma=nullptr, const double *mb=nullptr) const
void init_dist_paroi_globale (const Conds_lim &conds_lim) override
const DoubleTab & normale_paroi_elem () const
const DoubleTab & normale_paroi_faces () const
void build_mc_face_mesh () const
 Build the MEDCoupling face mesh. It is always made of polygons (in 3D) for simplicity purposes. Face numbers (and node numbers) are the same as in TRUST.
void build_mc_dual_mesh () const
 Build the dual mesh of the domain for post-processing of face fields.
int oriente_normale (int f, int e) const
const IntTab & get_face_voisins_dual () const
int get_face_voisins_dual (const int i, const int j) const
void build_map_mc_Cmesh (const bool with_faces) override
Public Member Functions inherited from Domaine_dis_base
const Domaine & domaine () const
Domaine & domaine ()
int nb_elem () const
int nb_elem_tot () const
int nb_som () const
int nb_som_tot () const
int nb_front_Cl () const
int nombre_de_sous_domaines_dis () const
const Sous_domaine_dis_basesous_domaine_dis (int i) const
Sous_domaine_dis_basesous_domaine_dis (int i)
void ecrire_noms_bords (Sortie &) const
 Ecriture des noms des bords sur un flot de sortie.
int rang_frontiere (const Nom &)
int rang_frontiere (const Nom &) const
 Renvoie le rang de la frontiere de Nom nom Renvoie -1 si aucune frontiere ne s'appelle nom.
const Frontiere_dis_basefrontiere_dis (const Nom &) const
 Renvoie la frontiere de Nom nom.
Frontiere_dis_basefrontiere_dis (const Nom &)
void associer_domaine (const Domaine &)
 Associe un Domaine a l'objet.
void discretiser_root (const Nom &typ)
void completer (const Discretisation_base &disc)
virtual void creer_elements_fictifs (const Domaine_Cl_dis_base &)
virtual const DoubleTab & y_elem () const
virtual const DoubleTab & y_faces () const
const Champ_Fonc_basevolume_maille () const
const Champ_Fonc_basemesh_numbering () const
void get_noms_champs_postraitables (Noms &nom, Option opt=NONE) const override
void creer_champ (const Motcle &motlu) override
void creer_champ (const Motcle &, const Probleme_base &)
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
void set_reorder (const Reorder_Mesh &r)
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 const Nomle_nom () const
 Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
virtual void nommer (const Nom &)
 Donne un nom a l'Objet_U Methode virtuelle a surcharger.
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 ()

Public Attributes

IntTab fsten_d
IntTab fsten_eb
MD_Vector mdv_ch_face
Public Attributes inherited from Domaine_PolyMAC_CDO
IntVect cyclic
std::map< std::string, int > is_init
IntTab vedeb
IntTab veji
DoubleTab veci
IntTab rfdeb
IntTab rfji
DoubleTab rfci
IntTab m2d
IntTab m2i
IntTab m2j
IntTab w2i
IntTab w2j
DoubleTab m2c
DoubleTab w2c
Matrice_Morse_Sym m2mat
SolveurSys m2solv
IntTab wedeb
IntTab weji
DoubleTab weci
IntTab m1deb
IntTab m1ji
DoubleTab m1ci
std::map< std::array< int, 2 >, int > virt_ef_map
Public Attributes inherited from Domaine_Poly_base
std::vector< std::map< int, int > > som_arete
MD_Vector mdv_elems_faces
MD_Vector mdv_faces_aretes

Protected Attributes

int first_fgrad_ = 1
Protected Attributes inherited from Domaine_Poly_base
double h_carre = DMAXFLOAT
DoubleVect h_carre_
IntTab equiv_
Static_Int_Lists som_elem_
IntTab elem_som_d_
IntTab elem_arete_d_
DoubleTab vol_elem_som_
DoubleTab pvol_som_
DoubleVect longueur_aretes_
DoubleTab ta_
Protected Attributes inherited from Domaine_VF
DoubleVect volumes_
DoubleVect inverse_volumes_
DoubleVect volumes_entrelaces_
DoubleTab volumes_entrelaces_dir_
DoubleTab face_normales_
IntTab face_voisins_
IntTab face_voisins_fictifs_
DoubleTab xp_
DoubleTab xv_
DoubleTab xv_bord_
IntTab elem_faces_
IntTab face_sommets_
IntTab face_aretes_
DoubleTab xa_
IntTab face_numero_bord_
MD_Vector md_vector_faces_
MD_Vector md_vector_faces_front_
MD_Vector md_vector_aretes_
IntTab num_fac_loc_
ArrOfInt faces_doubles_
ArrOfInt est_face_bord_
IntTab face_virt_pe_num_
DoubleTab n_y_elem_
DoubleTab n_y_faces_
int nb_elem_std_ =-10
int nb_faces_std_ =-10
IntVect rang_elem_non_std_
IntTab face_dual_
 For each face f, face_dual_(f, j) returns the element built on the left and right of the face in the dual mesh. Same sorting as face_voisins_.
Protected Attributes inherited from Domaine_dis_base
TRUST_Vector< OWN_PTR(Sous_domaine_dis_base)> les_sous_domaines_dis_
int dist_paroi_initialisee_ = 0
DoubleTab y_elem_
DoubleTab y_faces_
Champs_compris champs_compris_

Additional Inherited Members

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)
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_Poly_base
void verifier_type_elem () const
void corriger_face_voisins_sur_les_faces_virtuelles ()
 OWN_PTR (Elem_poly_base) type_elem_
Sortieecrit (Sortie &os) const
Protected Member Functions inherited from Domaine_VF
double volume_entrelace_axi (double r_face, double r_elem, double axis_length) const
 VECT (Front_VF) les_bords_
void order_faces (Faces &les_faces)
 This method (that may be overriden in various discretisations) is used to order faces according to the constraints of each discretisation. By default we identify the non-standard faces and put them at the begining of the face list. Non-standard faces are faces whose control volumes are affected by boundary conditions.
virtual void prepare_elem_non_std (Faces &les_faces)
 Identify non-standard elements (will be used later to identify non standard faces) Some discretisation (like VDF) do not need this. See override.
virtual void compute_sort_key (Faces &les_faces, IntTab &sort_key)
 Generate an IntTab (sort_key) with two columns allowing to sort the faces along a specific order. sort_key(i, 0) gives the sorting key sort_key(i, 1) gives the original face index.
void sort_along_zcurve (const Faces &les_faces, IntTab &sort_key) const
 Tweak the face sorting keys so that internal faces (=standard faces) follow a Z-curve indexing scheme. Assumption: all special faces are already at the begining of the array in sort_key (see caller of this method) See class Reorder_Mesh.
virtual void renumber_faces (Faces &les_faces, IntTab &sort_key)
 Re-index faces according to the new order given by 'sort_key'.
Protected Member Functions inherited from Domaine_dis_base
 OBS_PTR (Domaine) le_dom_
 OBS_PTR (Reorder_Mesh) reorder_
 An observer to the Reorder_Mesh option filled in the discretisation itself.
 OWN_PTR (Champ_Fonc_base) volume_maille_
 OWN_PTR (Champ_Fonc_base) mesh_numbering_
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

Detailed Description

Definition at line 21 of file Domaine_PolyMAC_MPFA.h.

Member Function Documentation

◆ discretiser()

void Domaine_PolyMAC_MPFA::discretiser ( )
overridevirtual

Reimplemented from Domaine_PolyMAC_HFV.

Definition at line 66 of file Domaine_PolyMAC_MPFA.cpp.

◆ fgrad()

void Domaine_PolyMAC_MPFA::fgrad ( int N,
int is_p,
const Conds_lim & cls,
const IntTab & fcl,
const DoubleTab * nu,
const IntTab * som_ext,
int virt,
int full_stencil,
IntTab & phif_d,
IntTab & phif_e,
DoubleTab & phif_c ) const

Computes field gradient interpolation at faces while preserving constant fields.

This method computes the interpolation [n_f.grad T]_f (if nu_grad = 0) or [n_f.nu.grad T]_f while exactly preserving fields satisfying [nu grad T]_e = constant. It uses MPFA (Multi-Point Flux Approximation) methods with three strategies:

  • Attempt 0: Standard MPFA-O
  • Attempt 1: MPFA-eta: variant of MPFA-O where auxiliary variables are not in the barycenter of the face
  • Attempt 2: Symmetric MPFA if previous attempts fail (coercive but not always consistent, especially on complex meshes)
Parameters
NNumber of field components
is_pPressure field indicator (1 for pressure, 0 otherwise) Controls Neumann/Dirichlet inversion for boundary conditions
clsDomain boundary conditions
fclBoundary condition data fcl(f, 0/1/2): (BC type, BC index, index within BC) See Champ_{P0,Face}_PolyMAC_MPFA for format
nuElement diffusivity (optional, can be nullptr) Array nu(e, n, ..) for element e and component n
som_extList of vertices to exclude from processing (optional) Example: direct treatment of Echange_Contact in Op_Diff_PolyMAC_MPFA_Elem
virtVirtual faces indicator (1 to include, 0 otherwise)
full_stencilComplete stencil indicator (1 for full dimensioning)
[out]phif_dStart/end indices in phif_{e,c} / phif_{pe,pc} phif_d(f, 0/1): flux indices at face f in interval [phif_d(f, 0/1), phif_d(f + 1, 0/1)[
[out]phif_eElement indices in stencil for each contribution phif_e(i): element index for i-th contribution
[out]phif_cStencil coefficients phif_c(i, n, c): coefficient for element i, component n, contribution c Contains local indices/coefficients (without Echange_contact) and diagonal terms (independent components)
Note
The method checks positivity of bilinear form eigenvalues to ensure scheme stability and choose the MPFA method accordingly
The method returns also a percentage of which MPFA method is used. Be careful of the validity of the solution if the percentage of MPFA-sym is high
Special handling for different boundary condition types:
  • Dirichlet/Neumann
  • Imposed global/external friction
  • Imposed global/external exchange

Definition at line 213 of file Domaine_PolyMAC_MPFA.cpp.

◆ init_stencils()

void Domaine_PolyMAC_MPFA::init_stencils ( ) const

Initializes the face stencils for gradient computation.

This method builds the connectivity stencils required for face-based gradient calculations in the PolyMAC_MPFA discretization scheme. It establishes the relationship between faces and all elements/boundary faces that are connected through shared vertices.

The stencil for each face includes:

  • All elements connected to the face through any of its vertices
  • All boundary faces connected to the face through shared vertices
  • The face's direct neighboring elements
Note
This method is called lazily - it only performs initialization if stencils haven't been built yet (checked via fsten_d.size())
The method populates two main data structures:
  • fsten_d: Index array for stencil boundaries
  • fsten_eb: Flat array containing all stencil elements/boundary faces

Algorithm overview:

  1. Build vertex-to-element connectivity (som_eb)
  2. Add boundary faces to vertex connectivity
  3. For each face, collect all elements/boundary faces connected via vertices
  4. Store results in compressed sparse format
Postcondition
After execution:
  • fsten_d(f) gives the starting index in fsten_eb for face f's stencil
  • fsten_d(f+1) gives the ending index (exclusive) for face f's stencil
  • fsten_eb contains the actual element/boundary face indices
  • Boundary faces are represented as (ne_tot + face_index)
Note
Memory is optimized using CRIMP() to reduce storage overhead
Only processes faces that have at least one valid neighbor:
  • Internal faces: both neighbors must be valid
  • Boundary faces: at least one neighbor must be valid
See also
fgrad() which uses these stencils for gradient computation

Definition at line 116 of file Domaine_PolyMAC_MPFA.cpp.

Member Data Documentation

◆ first_fgrad_

int Domaine_PolyMAC_MPFA::first_fgrad_ = 1
mutableprotected

Definition at line 50 of file Domaine_PolyMAC_MPFA.h.

◆ fsten_d

IntTab Domaine_PolyMAC_MPFA::fsten_d
mutable

Definition at line 29 of file Domaine_PolyMAC_MPFA.h.

◆ fsten_eb

IntTab Domaine_PolyMAC_MPFA::fsten_eb

Definition at line 29 of file Domaine_PolyMAC_MPFA.h.

◆ mdv_ch_face

MD_Vector Domaine_PolyMAC_MPFA::mdv_ch_face

Definition at line 47 of file Domaine_PolyMAC_MPFA.h.


The documentation for this class was generated from the following files: