12#ifndef ARCANE_FILES_SPLITSDMESHPARTITIONER_H
13#define ARCANE_FILES_SPLITSDMESHPARTITIONER_H
19#include "arcane/std/MeshPartitionerBase.h"
21#include "arcane/std/SplitSDMeshPartitioner_axl.h"
23#define MPICH_SKIP_MPICXX
24#define OMPI_SKIP_MPICXX
35#define TAG_MAILLAGEMAITRE 1
37#define CHECK_MPI_PACK_ERR(ier) \
38 if (ier != MPI_SUCCESS) { \
41 InfoProc->m_service->pfatal() << "error on MPI_Pack of type MPI_ERR_COMM"; \
44 InfoProc->m_service->pfatal() << "error on MPI_Pack of type MPI_ERR_TYPE"; \
47 InfoProc->m_service->pfatal() << "error on MPI_Pack of type MPI_ERR_COUNT"; \
50 InfoProc->m_service->pfatal() << "error on MPI_Pack of type MPI_ERR_ARG"; \
53 InfoProc->m_service->pfatal() << "error on MPI_Pack of unknown type !"; \
57#ifndef CHECK_IF_NOT_NULL
71#define CHECK_IF_NOT_NULL(Ptr) \
73 InfoProc->m_service->pfatal() << "Pointer is null, (Perhaps we lack memory !!! )"; \
78#define MAX(a, b) ((a) < (b) ? (b) : (a))
81#define MIN(a, b) ((a) > (b) ? (b) : (a))
88typedef struct T_InfoProc
119typedef struct T_INTERFACE
132typedef struct T_BLOC_ETENDU
157typedef struct T_ListeVoisMail
175typedef struct T_ListeDomMail
199typedef struct T_Maillage
227class SplitSDMeshPartitioner
244 ARCANE_UNUSED(initial_partition);
245 ARCANE_UNUSED(nb_part);
281 void Equil2Dom(
int* MasqueDesNoeuds,
int* MasqueDesElements,
int marqueVu,
int marqueNonVu,
283 int indDomCharge,
int indDomVois,
double Delta);
286 void SelectElements(
int* MasqueDesNoeuds,
int* MasqueDesElements,
int marqueVu,
int marqueNonVu,
292 int marqueVu,
int marqueNonVu,
294 int* pNbFronts,
int NbFrontsMax,
303 int marqueVu,
int marqueNonVu,
343 void PackEquil(
StrucInfoProc* InfoProc,
int indDomCharge,
int indDomVois,
double Delta,
void* TabTMP,
int TailleTMP, MPI_Comm comm);
345 void UnpackEquil(
void* TabTMP,
int TailleTMP, MPI_Comm comm,
int* indDomCharge,
int* indDomVois,
double* Delta);
ArcaneSplitSDMeshPartitionerObject(const Arcane::ServiceBuildInfo &sbi)
Constructeur.
Base class for 1D data vectors.
Exception when a function is not implemented.
Structure containing the information to create a service.
void Equil2Dom(int *MasqueDesNoeuds, int *MasqueDesElements, int marqueVu, int marqueNonVu, StrucInfoProc *InfoProc, StructureBlocEtendu *Domaine, StrucMaillage *Maillage, int indDomCharge, int indDomVois, double Delta)
transfer phase between 2 domains, MAJ of domains
void ConnexifieDomaine(StrucInfoProc *InfoProc, StructureBlocEtendu *Domaine, StrucMaillage *Maillage, double tolConnexite)
makes the domain connected when parts are too small and not connected
double CalculDeltaMin(StrucMaillage *Maillage, double deltaMin, int iterEquilibrage, int NbMaxIterEquil)
calculates a deltaMin based on local transfers
void PackEquil(StrucInfoProc *InfoProc, int indDomCharge, int indDomVois, double Delta, void *TabTMP, int TailleTMP, MPI_Comm comm)
int * GetMasqueDesElements(StrucInfoProc *InfoProc)
creation of an array that serves as a mask on the LocalId of elements
int getDomVoisMaxFace(Arcane::Array< Arcane::Cell > &ListeElements, int me)
searches for the neighboring domain having the max number of shared Faces with the set of cells
void UnpackDom(void *TabTMP, int TailleTMP, MPI_Comm comm, StrucListeDomMail *DomMail)
void MAJDelta(double don, int iDOmTmpPrec, int iDomTmp, StrucListeDomMail *ListeDomaines)
function to shift the Delta associated with a searched interface for a pair, domain,...
int ParcoursFrontalDelta(int *MasqueDesNoeuds, int *MasqueDesElements, int marqueVu, int marqueNonVu, double Delta, int *pNbFronts, int NbFrontsMax, Arcane::Array< Arcane::Node > &FrontsNoeuds, int *IndFrontsNoeuds, Arcane::Array< Arcane::Cell > &FrontsElements, int *IndFrontsElements)
limited front-tracking following the Delta (cumulative weight of elements taken in the fronts),...
void initPoids(bool initial_partition)
initialization of weights (m_cells_weight => m_poids_aux_mailles)
void * RecoitMessage(StrucInfoProc *InfoProc, int FromProc, int Tag, int *pTailleTMP)
void MAJDomaine(StructureBlocEtendu *Domaine)
update of the local structure (nodes on interfaces with neighboring subdomains)
void EnvoieMessage(StrucInfoProc *InfoProc, int ToProc, int Tag, void *TabTMP, int TailleTMP)
void PackDom(StrucInfoProc *InfoProc, StructureBlocEtendu *Domaine, void *TabTMP, int TailleTMP, MPI_Comm comm)
void SelectElements(int *MasqueDesNoeuds, int *MasqueDesElements, int marqueVu, int marqueNonVu, StrucInfoProc *InfoProc, StructureBlocEtendu *Domaine, double Delta, int indDomVois, Arcane::Array< Arcane::Cell > &ListeElements)
selection of elements in a domain for balancing between 2 domains, by performing a front-tracking fro...
void * DiffuseMessage(StrucInfoProc *InfoProc, int FromProc, void *TabTMP, int TailleTMP)
int TailleDom(StructureBlocEtendu *Domaine)
Gives the size in bytes required for the memory storage of a domain (without the list of interface no...
void verifMaillageMaitre(StrucMaillage *Maillage)
consistency check (reciprocity) of the interfaces
void UnpackEquil(void *TabTMP, int TailleTMP, MPI_Comm comm, int *indDomCharge, int *indDomVois, double *Delta)
void LissageDuFront(int *MasqueDesNoeuds, int *MasqueDesElements, int marqueVu, int marqueNonVu, int NbFronts, Arcane::Array< Arcane::Node > &FrontsNoeuds, int *IndFrontsNoeuds, Arcane::Array< Arcane::Cell > &FrontsElements, int *IndFrontsElements)
void fin(StrucInfoProc *&InfoProc, StructureBlocEtendu *&Domaine, StrucMaillage *&Maillage)
memory freeing of structures
void MAJMaillageMaitre(StrucInfoProc *InfoProc, StructureBlocEtendu *Domaine, StrucMaillage *Maillage)
update of the structure on processor 0
virtual void partitionMesh(bool initial_partition)
void MAJDeltaGlobal(StrucInfoProc *InfoProc, StrucMaillage *Maillage, double tolerance)
We use a front-tracking method to go from an overloaded node to other nodes by memorizing the path to...
int * GetMasqueDesNoeuds(StrucInfoProc *InfoProc)
creation of an array that serves as a mask on the LocalId of nodes
void Equilibrage(StrucInfoProc *InfoProc, StructureBlocEtendu *Domaine, StrucMaillage *Maillage)
iterative phase to balance the load
void init(bool initial_partition, StrucInfoProc *&InfoProc, StructureBlocEtendu *&Domaine, StrucMaillage *&Maillage)
initialization of structures
virtual void build()
Build-level construction of the service.
1D data vector with value semantics (STL style).
MeshVariableScalarRefT< Cell, Real > VariableCellReal
Real type quantity at cell center.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.
Arcane::AbstractService * m_service
For trace management (messages, errors, fatal ...).
StrucListeVoisMail * ListeVoisins
StrucListeDomMail * ListeDomaines
StructureInterface * Intf
Arcane::UniqueArray< Arcane::Node > ListeNoeuds