Construction of the uniqueId() for faces. More...
Classes | |
| class | NarrowCellFaceInfo |
| Stores info about a face of a cell. More... | |
| class | WideCellFaceInfo |
| Stores info about a face of a cell. More... | |
| class | BoundaryFaceInfo |
| Info for managing boundary faces of sub-domains. More... | |
| class | AnyFaceInfo |
| Info for managing faces of sub-domains. More... | |
| class | ResendCellInfo |
| class | BoundaryFaceBitonicSortTraits |
| Functor for sorting BoundaryFaceInfo via bitonic sort. More... | |
| class | AnyFaceBitonicSortTraits |
| Functor for sorting AnyFaceInfo using bitonic sort. More... | |
| class | UniqueIdSorter |
Public Types | |
| typedef NarrowCellFaceInfo | CellFaceInfo |
Public Member Functions | |
| FaceUniqueIdBuilder2 (DynamicMesh *mesh) | |
| Constructs an instance for the mesh mesh. | |
| void | computeFacesUniqueIdAndOwnerVersion3 () |
| Calculates the unique IDs of each face in parallel. | |
| void | computeFacesUniqueIdAndOwnerVersion5 () |
| Calculates uniqueId() via a hash generated by the uniqueId() of the nodes. | |
| 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 |
Private Member Functions | |
| void | _resendCellsAndComputeFacesUniqueId (ConstArrayView< AnyFaceInfo > all_csi) |
| void | _checkFacesUniqueId () |
| Checks that all faces have a valid uid. | |
| void | _unsetFacesUniqueId () |
| Invalidates the uids to ensure they are all positioned. | |
| void | _computeAndSortBoundaryFaces (Array< BoundaryFaceInfo > &boundary_faces_info) |
| Determines the list of boundary faces for each subdomain and sorts them across all procs. | |
| void | _computeParallel () |
| Calculates the unique IDs of each face in parallel. | |
| void | _computeSequential () |
| Calculates the unique IDs of each face sequentially. | |
Private Attributes | |
| DynamicMesh * | m_mesh = nullptr |
| IParallelMng * | m_parallel_mng = nullptr |
| bool | m_is_verbose = false |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Construction of the uniqueId() for faces.
This class allows calculating the uniqueId() for faces. After calling computeFacesUniqueId(), the uniqueId() and owner() fields of each face are set.
This algorithm guarantees that the numbering is the same regardless of the decomposition and the number of processors. In sequential mode, the algorithm can be written as follows:
The sequential algorithm assumes that cells are traversed in increasing order of uniqueIds. For a given face, therefore, the cell with the smallest uniqueId() will provide the face's uniqueId() and thus the face's owner.
This version uses a parallel sort to ensure that the number of messages increases by log2(N), where N is the number of processors. This avoids potentially having a large number of messages, which is not supported by certain MPI implementations (for example MPC).
Definition at line 68 of file FaceUniqueIdBuilder2.cc.
| typedef NarrowCellFaceInfo Arcane::mesh::FaceUniqueIdBuilder2::CellFaceInfo |
Definition at line 83 of file FaceUniqueIdBuilder2.cc.
|
explicit |
Constructs an instance for the mesh mesh.
Definition at line 495 of file FaceUniqueIdBuilder2.cc.
References Arcane::TraceAccessor::TraceAccessor(), and Arcane::TraceAccessor::traceMng().
|
private |
Checks that all faces have a valid uid.
Definition at line 1085 of file FaceUniqueIdBuilder2.cc.
References ARCANE_FATAL, Arcane::Face::cell(), Arcane::mesh::ItemInternalMap::eachItem(), Arcane::TraceAccessor::info(), and Arcane::Item::uniqueId().
|
private |
Determines the list of boundary faces for each subdomain and sorts them across all procs.
Definition at line 691 of file FaceUniqueIdBuilder2.cc.
References Arcane::Array< T >::add(), Arcane::Array< T >::addRange(), Arcane::Face::cell(), Arcane::Array< T >::clear(), Arcane::IParallelMng::commRank(), Arcane::IParallelMng::commSize(), Arcane::mesh::ItemInternalMap::eachItem(), Arcane::Cell::face(), Arcane::platform::getRealTime(), Arcane::TraceAccessor::info(), Arcane::Parallel::BitonicSort< KeyType, KeyTypeTraits >::keys(), Arcane::Face::nbCell(), Arcane::Cell::nbFace(), Arcane::IParallelMng::recv(), Arcane::Array< T >::resize(), Arcane::AbstractArray< T >::size(), Arcane::ConstArrayView< T >::size(), Arcane::Parallel::BitonicSort< KeyType, KeyTypeTraits >::sort(), Arcane::ConstArrayView< T >::subConstView(), Arcane::Item::uniqueId(), and Arcane::IParallelMng::waitAllRequests().
Referenced by _computeParallel().
|
private |
Calculates the unique IDs of each face in parallel.
Definition at line 563 of file FaceUniqueIdBuilder2.cc.
References _computeAndSortBoundaryFaces(), Arcane::Array< T >::add(), Arcane::Face::cell(), Arcane::IParallelMng::commRank(), Arcane::mesh::ItemInternalMap::eachItem(), Arcane::Cell::face(), Arcane::platform::getRealTime(), Arcane::TraceAccessor::info(), Arcane::Parallel::BitonicSort< KeyType, KeyTypeTraits >::keys(), Arcane::Face::nbCell(), Arcane::Cell::nbFace(), Arcane::AbstractArray< T >::size(), Arcane::ConstArrayView< T >::size(), Arcane::Parallel::BitonicSort< KeyType, KeyTypeTraits >::sort(), and Arcane::Item::uniqueId().
Referenced by computeFacesUniqueIdAndOwnerVersion3().
|
private |
Calculates the unique IDs of each face sequentially.
Definition at line 525 of file FaceUniqueIdBuilder2.cc.
References _unsetFacesUniqueId(), Arcane::Array< T >::add(), Arcane::mesh::ItemInternalMap::count(), Arcane::mesh::ItemInternalMap::eachItem(), Arcane::Cell::faces(), Arcane::TraceAccessor::info(), and Arcane::Array< T >::reserve().
Referenced by computeFacesUniqueIdAndOwnerVersion3().
|
private |
Definition at line 825 of file FaceUniqueIdBuilder2.cc.
|
private |
Invalidates the uids to ensure they are all positioned.
Definition at line 1071 of file FaceUniqueIdBuilder2.cc.
References Arcane::mesh::ItemInternalMap::eachItem(), Arcane::Item::mutableItemBase(), and Arcane::MutableItemBase::unsetUniqueId().
Referenced by _computeSequential().
| void Arcane::mesh::FaceUniqueIdBuilder2::computeFacesUniqueIdAndOwnerVersion3 | ( | ) |
Calculates the unique IDs of each face in parallel.
Definition at line 511 of file FaceUniqueIdBuilder2.cc.
References _computeParallel(), and _computeSequential().
| void Arcane::mesh::FaceUniqueIdBuilder2::computeFacesUniqueIdAndOwnerVersion5 | ( | ) |
Calculates uniqueId() via a hash generated by the uniqueId() of the nodes.
Definition at line 1034 of file FaceUniqueIdBuilder2.cc.
References Arcane::IParallelMng::commRank(), Arcane::mesh::ItemInternalMap::eachItem(), Arcane::TraceAccessor::info(), Arcane::IParallelMng::isParallel(), Arcane::Item::mutableItemBase(), Arcane::Face::nbCell(), Arcane::ItemWithNodes::nbNode(), Arcane::ItemWithNodes::nodes(), Arcane::Array< T >::resize(), and Arcane::MutableItemBase::setOwner().
|
private |
Definition at line 99 of file FaceUniqueIdBuilder2.cc.
|
private |
Definition at line 97 of file FaceUniqueIdBuilder2.cc.
|
private |
Definition at line 98 of file FaceUniqueIdBuilder2.cc.