Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::ArcaneCasePartitioner Class Reference

External mesh partitioning service. More...

Inheritance diagram for Arcane::ArcaneCasePartitioner:
Collaboration diagram for Arcane::ArcaneCasePartitioner:

Public Member Functions

 ArcaneCasePartitioner (const ServiceBuildInfo &sbi)
void build () override
 Build-level construction of the service.
void execute () override
 Executes the service operation.
void setParallelMng (IParallelMng *) override
 Positions the associated parallelism manager. This method must be called before execute().
bool isActive () const override
 True if the service is active.
Public Member Functions inherited from Arcane::ArcaneArcaneCasePartitionerObject
 ArcaneArcaneCasePartitionerObject (const Arcane::ServiceBuildInfo &sbi)
 Constructeur.
virtual ~ArcaneArcaneCasePartitionerObject ()
 Destructeur.
CaseOptionsArcaneCasePartitioneroptions () const
 Options du jeu de données du service.
Public Member Functions inherited from Arcane::BasicService
 ~BasicService () override
 Releases resources.
virtual ISubDomainsubDomain ()
Public Member Functions inherited from Arcane::AbstractService
 ~AbstractService () override
 Destructor.
IServiceInfoserviceInfo () const override
 Access to service information. See IServiceInfo for details.
IBaseserviceParent () const override
 Access to the base interface of main Arcane objects.
IServiceserviceInterface () override
 Returns the low-level IService interface of the service.
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const
Public Member Functions inherited from Arcane::IService
virtual ~IService ()
 Releases resources.
Public Member Functions inherited from Arcane::MeshAccessor
 MeshAccessor (ISubDomain *sd)
 MeshAccessor (IMesh *mesh)
 MeshAccessor (const MeshHandle &mesh_handle)
Integer nbCell () const
 Returns the number of cells in the mesh.
Integer nbFace () const
 Returns the number of faces in the mesh.
Integer nbEdge () const
 Returns the number of edges in the mesh.
Integer nbNode () const
 Returns the number of nodes in the mesh.
VariableNodeReal3nodesCoordinates () const
 Returns the coordinates of the mesh nodes.
NodeGroup allNodes () const
 Returns the group containing all nodes.
EdgeGroup allEdges () const
 Returns the group containing all edges.
FaceGroup allFaces () const
 Returns the group containing all faces.
CellGroup allCells () const
 Returns the group containing all cells.
FaceGroup outerFaces () const
 Returns the group containing all boundary faces.
NodeGroup ownNodes () const
 Returns the group containing all nodes specific to this domain.
CellGroup ownCells () const
 Returns the group containing all cells specific to this domain.
FaceGroup ownFaces () const
 Group containing all faces specific to this domain.
EdgeGroup ownEdges () const
 Group containing all edges specific to this domain.
IMeshmesh () const
const MeshHandlemeshHandle () const
Public Member Functions inherited from Arcane::CommonVariables
 CommonVariables (IModule *c)
 Constructs the references of the common variables for the module c.
 CommonVariables (IVariableMng *variable_mng)
 Constructs the references of the common variables for the manager variable_mng.
 CommonVariables (ISubDomain *sd)
 Constructs the references of the common variables for the subdomain sd.
virtual ~CommonVariables ()
 Releases resources.
Int32 globalIteration () const
 Current iteration number.
Real globalTime () const
 Current time.
Real globalOldTime () const
 Previous current time.
Real globalFinalTime () const
 Final time of the simulation.
Real globalDeltaT () const
 Current Delta T.
Real globalCPUTime () const
 CPU time used (in seconds).
Real globalOldCPUTime () const
 Previous CPU time used (in seconds).
Real globalElapsedTime () const
 Clock time (elapsed) used (in seconds).
Real globalOldElapsedTime () const
 Previous clock time (elapsed) used (in seconds).
Public Member Functions inherited from Arcane::IDirectExecution
virtual ~IDirectExecution ()
 Frees resources.

Private Member Functions

void _initCorrespondance (Int32 my_rank)
 Opens the Correspondence file (only on proc 0).
void _writeCorrespondance (Int32 rank, Int64Array &nodesUniqueId, Int64Array &cellsUniqueId)
 Writes the Correspondence file.
void _finalizeCorrespondance (Int32 my_rank)
 Closes the Correspondence file (only on proc 0).
void _partitionMesh (Int32 nb_part)
void _computeGroups (IItemFamily *current_family, IItemFamily *new_family)
 Recopy the groups of the current family into the new one.
void _addGhostLayers (CellGroup current_all_cells, Array< Cell > &cells_selected_for_new_mesh, Integer nb_layer, Integer maxLocalIdCell, Integer maxLocalIdNode)
 Adds to the cell array the desired number of cell layers.
void _addGhostGroups (IMesh *new_mesh, Array< Cell > &cells_selected_for_new_mesh, VariableCellInt32 &true_cells_owner, VariableNodeInt32 &true_nodes_owner, Int32Array &new_cells_local_id, Integer id_loc)
 Adds the TOUT, LOCAL, and MF_* cell groups based on neighbor groups Also adds the LOCALN node group (but not the NF_*).

Private Attributes

std::ofstream m_sortiesCorrespondance
ArcaneInitialPartitionerm_init_part = nullptr

Additional Inherited Members

Static Public Member Functions inherited from Arcane::ArcaneArcaneCasePartitionerObject
template<typename ServiceClassType>
static void fillServiceInfo (Arcane::ServiceInfo *si)
Public Attributes inherited from Arcane::CommonVariables
VariableScalarInt32 m_global_iteration
 Current iteration.
VariableScalarReal m_global_time
 Current time.
VariableScalarReal m_global_deltat
 Global Delta T.
VariableScalarReal m_global_old_time
 Time previous to the current time.
VariableScalarReal m_global_old_deltat
 Delta T at the time previous to the global time.
VariableScalarReal m_global_final_time
 Final time of the case.
VariableScalarReal m_global_old_cpu_time
 Previous CPU time used (in seconds).
VariableScalarReal m_global_cpu_time
 CPU time used (in seconds).
VariableScalarReal m_global_old_elapsed_time
 Previous clock time used (in seconds).
VariableScalarReal m_global_elapsed_time
 Clock time used (in seconds).
Protected Member Functions inherited from Arcane::BasicService
 BasicService (const ServiceBuildInfo &)
Protected Member Functions inherited from Arcane::AbstractService
 AbstractService (const ServiceBuildInfo &)
 Constructor from a ServiceBuildInfo.
Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const
Protected Member Functions inherited from Arcane::IService
 IService ()
 Constructor.

Detailed Description

External mesh partitioning service.

Definition at line 107 of file ArcaneCasePartitioner.cc.

Constructor & Destructor Documentation

◆ ArcaneCasePartitioner()

Arcane::ArcaneCasePartitioner::ArcaneCasePartitioner ( const ServiceBuildInfo & sbi)
explicit

Definition at line 315 of file ArcaneCasePartitioner.cc.

◆ ~ArcaneCasePartitioner()

Arcane::ArcaneCasePartitioner::~ArcaneCasePartitioner ( )
override

Definition at line 327 of file ArcaneCasePartitioner.cc.

Member Function Documentation

◆ _addGhostGroups()

void Arcane::ArcaneCasePartitioner::_addGhostGroups ( IMesh * new_mesh,
Array< Cell > & cells_selected_for_new_mesh,
VariableCellInt32 & true_cells_owner,
VariableNodeInt32 & true_nodes_owner,
Int32Array & new_cells_local_id,
Integer id_loc )
private

Adds the TOUT, LOCAL, and MF_* cell groups based on neighbor groups Also adds the LOCALN node group (but not the NF_*).

Definition at line 784 of file ArcaneCasePartitioner.cc.

References Arcane::Array< T >::add(), Arcane::ItemGroup::addItems(), Arcane::Array< T >::begin(), Arcane::IMeshBase::cellFamily(), Arcane::IItemFamily::findGroup(), Arcane::TraceAccessor::info(), Arcane::Item::localId(), Arcane::IItemFamily::nbItem(), Arcane::IMeshBase::nodeFamily(), Arcane::Array< T >::reserve(), and Arcane::AbstractArray< T >::size().

Here is the call graph for this function:

◆ _addGhostLayers()

void Arcane::ArcaneCasePartitioner::_addGhostLayers ( CellGroup current_all_cells,
Array< Cell > & cells_selected_for_new_mesh,
Integer nb_layer,
Integer maxLocalIdCell,
Integer maxLocalIdNode )
private

Adds to the cell array the desired number of cell layers.

Definition at line 730 of file ArcaneCasePartitioner.cc.

References _addGhostLayers(), Arcane::Array< T >::add(), Arcane::Node::cells(), Arcane::Array< T >::fill(), Arcane::Item::localId(), Arcane::ItemWithNodes::nodes(), Arcane::AbstractArray< T >::size(), and Arcane::ItemVectorView::size().

Referenced by _addGhostLayers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _computeGroups()

void Arcane::ArcaneCasePartitioner::_computeGroups ( IItemFamily * current_family,
IItemFamily * new_family )
private

Recopy the groups of the current family into the new one.

The principle is as follows:

  1. For each entity type, determine the list of localId() of entities of that type in the original mesh.
  2. From this list, build an array indicating for each localId() of the original mesh its localId() in the new mesh (or NULL_ITEM_LOCAL_ID if the entity is absent).
  3. Iterate through the original groups and build for each the list of entities to add to the new mesh.

Definition at line 679 of file ArcaneCasePartitioner.cc.

References Arcane::Array< T >::add(), Arcane::IItemFamily::allItems(), Arcane::Array< T >::clear(), Arcane::IItemFamily::createGroup(), ENUMERATE_ITEM, Arcane::Array< T >::fill(), Arcane::IItemFamily::groups(), Arcane::TraceAccessor::info(), Arcane::ItemGroup::isAllItems(), Arcane::ItemGroup::isOwn(), Arcane::IItemFamily::itemsUniqueIdToLocalId(), Arcane::IItemFamily::maxLocalId(), Arcane::IItemFamily::name(), Arcane::ItemGroup::name(), and Arcane::ItemGroup::size().

Here is the call graph for this function:

◆ _finalizeCorrespondance()

void Arcane::ArcaneCasePartitioner::_finalizeCorrespondance ( Int32 my_rank)
private

Closes the Correspondence file (only on proc 0).

Definition at line 655 of file ArcaneCasePartitioner.cc.

◆ _initCorrespondance()

void Arcane::ArcaneCasePartitioner::_initCorrespondance ( Int32 my_rank)
private

Opens the Correspondence file (only on proc 0).

Definition at line 606 of file ArcaneCasePartitioner.cc.

References Arcane::TraceAccessor::info(), and Arcane::TraceAccessor::pfatal().

Here is the call graph for this function:

◆ _partitionMesh()

void Arcane::ArcaneCasePartitioner::_partitionMesh ( Int32 nb_part)
private

Definition at line 352 of file ArcaneCasePartitioner.cc.

◆ _writeCorrespondance()

void Arcane::ArcaneCasePartitioner::_writeCorrespondance ( Int32 rank,
Int64Array & nodesUniqueId,
Int64Array & cellsUniqueId )
private

Writes the Correspondence file.

Definition at line 628 of file ArcaneCasePartitioner.cc.

References Arcane::TraceAccessor::info(), and Arcane::AbstractArray< T >::size().

Here is the call graph for this function:

◆ build()

void Arcane::ArcaneCasePartitioner::build ( void )
inlineoverridevirtual

Build-level construction of the service.

This method is called right after the constructor.

Reimplemented from Arcane::AbstractService.

Definition at line 118 of file ArcaneCasePartitioner.cc.

◆ execute()

void Arcane::ArcaneCasePartitioner::execute ( )
overridevirtual

Executes the service operation.

Implements Arcane::IDirectExecution.

Definition at line 335 of file ArcaneCasePartitioner.cc.

References Arcane::TraceAccessor::info(), and Arcane::ArcaneArcaneCasePartitionerObject::options().

Here is the call graph for this function:

◆ isActive()

bool Arcane::ArcaneCasePartitioner::isActive ( ) const
inlineoverridevirtual

True if the service is active.

Implements Arcane::IDirectExecution.

Definition at line 121 of file ArcaneCasePartitioner.cc.

◆ setParallelMng()

void Arcane::ArcaneCasePartitioner::setParallelMng ( IParallelMng * pm)
inlineoverridevirtual

Positions the associated parallelism manager. This method must be called before execute().

.

Implements Arcane::IDirectExecution.

Definition at line 120 of file ArcaneCasePartitioner.cc.

Member Data Documentation

◆ m_init_part

ArcaneInitialPartitioner* Arcane::ArcaneCasePartitioner::m_init_part = nullptr
private

Definition at line 138 of file ArcaneCasePartitioner.cc.

◆ m_sortiesCorrespondance

std::ofstream Arcane::ArcaneCasePartitioner::m_sortiesCorrespondance
private

Definition at line 136 of file ArcaneCasePartitioner.cc.


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