Grid mesh partitioner. More...
Classes | |
| class | GhostCellsBuilder |
| Information about extra ghost cells. More... | |
| class | GridInfo |
Public Member Functions | |
| SimpleGridMeshPartitioner (const ServiceBuildInfo &sbi) | |
| void | build () override |
| Build-level construction of the service. | |
| IPrimaryMesh * | primaryMesh () override |
| Associated mesh. | |
| void | partitionMesh (bool initial_partition) override |
| void | notifyEndPartition () override |
| Notification when a re-partitioning finishes (after entity exchange). | |
| void | setBoundingBox (Real3 min_val, Real3 max_val) override |
| Positions the bounding box of our subdomain. | |
| void | setPartIndex (Int32 i, Int32 j, Int32 k) override |
| Index (i,j,k) of the part. | |
| void | applyMeshPartitioning (IMesh *mesh) override |
| Applies the repartitioning to the mesh mesh. | |
| Public Member Functions inherited from Arcane::BasicService | |
| ~BasicService () override | |
| Releases resources. | |
| virtual ISubDomain * | subDomain () |
| Public Member Functions inherited from Arcane::AbstractService | |
| ~AbstractService () override | |
| Destructor. | |
| IServiceInfo * | serviceInfo () const override |
| Access to service information. See IServiceInfo for details. | |
| IBase * | serviceParent () const override |
| Access to the base interface of main Arcane objects. | |
| IService * | serviceInterface () 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. | |
| TraceAccessor & | operator= (const TraceAccessor &rhs) |
| Copy assignment operator. | |
| virtual | ~TraceAccessor () |
| Frees resources. | |
| ITraceMng * | traceMng () 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. | |
| VariableNodeReal3 & | nodesCoordinates () 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. | |
| IMesh * | mesh () const |
| const MeshHandle & | meshHandle () 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::IMeshPartitionerBase | |
| virtual | ~IMeshPartitionerBase ()=default |
| Releases resources. | |
Private Member Functions | |
| Int32 | _findPart (RealConstArrayView coords, Real center) |
| Returns the index in coords of the value immediately lower than position. | |
| void | _addGhostCell (Int32 rank, Cell cell) |
| void | _buildGridInfo () |
| void | _computeSpecificGhostLayer () |
| void | _addCellToIntersectedParts (Cell cell, std::array< Int32, 3 > min_part, std::array< Int32, 3 > nb_part) |
Private Attributes | |
| Real3 | m_min_box |
| Real3 | m_max_box |
| std::array< Int32, 3 > | m_ijk_part |
| bool | m_is_bounding_box_set = false |
| bool | m_is_ijk_set = false |
| bool | m_is_verbose = false |
| GhostCellsBuilder * | m_ghost_cells_builder = nullptr |
| ScopedPtrT< GridInfo > | m_grid_info |
Additional Inherited Members | |
| 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. | |
Grid mesh partitioner.
Definition at line 45 of file SimpleGridMeshPartitioner.cc.
|
explicit |
Definition at line 159 of file SimpleGridMeshPartitioner.cc.
|
private |
Iterates over all parts that intersect the cell cell and sends this cell as a ghost cell.
Definition at line 352 of file SimpleGridMeshPartitioner.cc.
References Arcane::Item::owner().
Definition at line 204 of file SimpleGridMeshPartitioner.cc.
|
private |
Definition at line 213 of file SimpleGridMeshPartitioner.cc.
|
private |
Definition at line 375 of file SimpleGridMeshPartitioner.cc.
|
private |
Returns the index in coords of the value immediately lower than position.
The array coords must be sorted in ascending order. // TODO: use a dichotomy.
Definition at line 177 of file SimpleGridMeshPartitioner.cc.
References Arcane::TraceAccessor::info(), Arcane::math::isNearlyEqual(), and Arcane::ConstArrayView< T >::size().
Referenced by partitionMesh().
|
overridevirtual |
Applies the repartitioning to the mesh mesh.
The setPartIndex() and setBoundingBox() methods must have been called previously. This method can only be called once per instance.
The partitioning uses a specific algorithm for calculating ghost cells to ensure that every cell in mesh that intersects the part specified in setBoundingBox() will be in this subdomain, possibly as a ghost cell.
Implements Arcane::IGridMeshPartitioner.
Definition at line 456 of file SimpleGridMeshPartitioner.cc.
References ARCANE_FATAL, and Arcane::PtrT< T >::get().
|
inlineoverridevirtual |
Build-level construction of the service.
This method is called right after the constructor.
Reimplemented from Arcane::AbstractService.
Definition at line 112 of file SimpleGridMeshPartitioner.cc.
|
inlineoverridevirtual |
Notification when a re-partitioning finishes (after entity exchange).
Implements Arcane::IMeshPartitionerBase.
Definition at line 115 of file SimpleGridMeshPartitioner.cc.
|
overridevirtual |
Re-partitions the mesh mesh
This method changes the owners of the entities and fills the IItemFamily::itemsNewOwner() variable of each entity family of the mesh mesh with the number of the new owning subdomain.
Implements Arcane::IMeshPartitionerBase.
Definition at line 289 of file SimpleGridMeshPartitioner.cc.
References _findPart(), ARCANE_FATAL, Arcane::IParallelMng::commSize(), ENUMERATE_, Arcane::IK_Cell, Arcane::TraceAccessor::info(), Arcane::ItemWithNodes::nbNode(), Arcane::ItemWithNodes::node(), Arcane::IMesh::toPrimaryMesh(), and Arcane::Item::uniqueId().
|
inlineoverridevirtual |
Associated mesh.
Implements Arcane::IMeshPartitionerBase.
Definition at line 113 of file SimpleGridMeshPartitioner.cc.
|
inlineoverridevirtual |
Positions the bounding box of our subdomain.
For the algorithm to work, there must be no overlap between the bounding boxes of the subdomains.
Implements Arcane::IGridMeshPartitioner.
Definition at line 119 of file SimpleGridMeshPartitioner.cc.
|
inlineoverridevirtual |
Index (i,j,k) of the part.
The indices start at zero. In 1D or 2D, the value of k is (-1). In 1D, the value of j is (-1)
Implements Arcane::IGridMeshPartitioner.
Definition at line 126 of file SimpleGridMeshPartitioner.cc.
|
private |
Definition at line 144 of file SimpleGridMeshPartitioner.cc.
|
private |
Definition at line 145 of file SimpleGridMeshPartitioner.cc.
|
private |
Definition at line 140 of file SimpleGridMeshPartitioner.cc.
|
private |
Definition at line 141 of file SimpleGridMeshPartitioner.cc.
|
private |
Definition at line 142 of file SimpleGridMeshPartitioner.cc.
|
private |
Definition at line 143 of file SimpleGridMeshPartitioner.cc.
|
private |
Definition at line 139 of file SimpleGridMeshPartitioner.cc.
|
private |
Definition at line 138 of file SimpleGridMeshPartitioner.cc.