Construction of ghost layers. More...
Classes | |
| class | BoundaryNodeInfo |
| Structure containing boundary node information. More... | |
| class | BoundaryNodeBitonicSortTraits |
| Functor for sorting BoundaryNodeInfo via bitonic sort. More... | |
| class | BoundaryNodeToSendInfo |
Public Types | |
| using | ItemInternalMap = DynamicMeshKindInfos::ItemInternalMap |
| using | SubDomainItemMap = HashTableMapT<Int32, SharedArray<Int32>> |
Public Member Functions | |
| GhostLayerBuilder2 (DynamicMeshIncrementalBuilder *mesh_builder, bool is_allocate, Int32 version) | |
| Constructs an instance for the mesh mesh. | |
| void | addGhostLayers () |
| Adds ghost cell layers. | |
| 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 | _printItem (ItemInternal *ii, std::ostream &o) |
| void | _markBoundaryItems (ArrayView< Int32 > node_layer) |
| Marks the entities at the edge of the sub-domain. | |
| void | _sendAndReceiveCells (SubDomainItemMap &cells_to_send) |
| void | _sortBoundaryNodeList (Array< BoundaryNodeInfo > &boundary_node_list) |
| Parallel sorting of the list of boundary node information. | |
| void | _addGhostLayer (Integer current_layer, Int32ConstArrayView node_layer) |
| void | _markBoundaryNodes (ArrayView< Int32 > node_layer) |
| Determines the boundary nodes. | |
| void | _markBoundaryNodesFromEdges (ArrayView< Int32 > node_layer) |
Private Attributes | |
| DynamicMesh * | m_mesh = nullptr |
| DynamicMeshIncrementalBuilder * | m_mesh_builder = nullptr |
| IParallelMng * | m_parallel_mng = nullptr |
| bool | m_is_verbose = false |
| bool | m_is_allocate = false |
| Int32 | m_version = -1 |
| bool | m_use_optimized_node_layer = true |
| bool | m_use_only_minimal_cell_uid = true |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Construction of ghost layers.
Definition at line 49 of file GhostLayerBuilder2.cc.
| using Arcane::mesh::GhostLayerBuilder2::ItemInternalMap = DynamicMeshKindInfos::ItemInternalMap |
Definition at line 58 of file GhostLayerBuilder2.cc.
| using Arcane::mesh::GhostLayerBuilder2::SubDomainItemMap = HashTableMapT<Int32, SharedArray<Int32>> |
Definition at line 59 of file GhostLayerBuilder2.cc.
| Arcane::mesh::GhostLayerBuilder2::GhostLayerBuilder2 | ( | DynamicMeshIncrementalBuilder * | mesh_builder, |
| bool | is_allocate, | ||
| Int32 | version ) |
Constructs an instance for the mesh mesh.
Definition at line 95 of file GhostLayerBuilder2.cc.
References Arcane::TraceAccessor::TraceAccessor(), and Arcane::TraceAccessor::traceMng().
|
private |
Definition at line 466 of file GhostLayerBuilder2.cc.
Marks the entities at the edge of the sub-domain.
This assumes that the faces have already been marked with the II_Boundary flag and that their owner is correctly positioned (i.e.: the same for all sub-domains).
Definition at line 963 of file GhostLayerBuilder2.cc.
References Arcane::MutableItemBase::addFlags(), Arcane::Face::cell(), Arcane::IParallelMng::commRank(), Arcane::mesh::ItemInternalMap::eachItem(), Arcane::Face::edges(), Arcane::ItemBase::flags(), Arcane::ItemFlags::II_Boundary, Arcane::ItemFlags::II_Shared, Arcane::ItemFlags::II_SubDomainBoundary, Arcane::Item::itemBase(), Arcane::Item::mutableItemBase(), Arcane::Face::nbCell(), Arcane::ItemWithNodes::nodes(), and Arcane::Item::owner().
Referenced by addGhostLayers().
Determines the boundary nodes.
This algorithm works even if there are already ghost cells. To determine the boundary nodes, you must first determine the boundary faces. A face is boundary if it falls into one of two cases:
Definition at line 435 of file GhostLayerBuilder2.cc.
References Arcane::MutableItemBase::addFlags(), Arcane::Face::cell(), Arcane::IParallelMng::commRank(), Arcane::mesh::ItemInternalMap::eachItem(), Arcane::Face::edges(), Arcane::ItemFlags::II_Shared, Arcane::ItemFlags::II_SubDomainBoundary, Arcane::Item::mutableItemBase(), Arcane::Face::nbCell(), Arcane::ItemWithNodes::nodes(), and Arcane::Item::owner().
Referenced by addGhostLayers().
|
private |
Definition at line 996 of file GhostLayerBuilder2.cc.
|
private |
Definition at line 117 of file GhostLayerBuilder2.cc.
|
private |
Definition at line 912 of file GhostLayerBuilder2.cc.
|
private |
Parallel sorting of the list of boundary node information.
Takes as input a list of boundary nodes and sorts it in parallel ensuring that after sorting the information for the same node is on the same process.
Definition at line 812 of file GhostLayerBuilder2.cc.
References Arcane::Array< T >::add(), Arcane::Array< T >::addRange(), Arcane::Array< T >::clear(), Arcane::IParallelMng::commRank(), Arcane::IParallelMng::commSize(), Arcane::TraceAccessor::info(), Arcane::Parallel::BitonicSort< KeyType, KeyTypeTraits >::keys(), 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::TraceAccessor::traceMng(), and Arcane::IParallelMng::waitAllRequests().
| void Arcane::mesh::GhostLayerBuilder2::addGhostLayers | ( | ) |
Adds ghost cell layers.
This version uses sorting to determine the info
Before calling this function, there should be no ghost cells: all cells in the mesh must belong to this sub-domain. (TODO: add test for this).
If multiple ghost cell layers are requested, we proceed in multiple steps for the same algorithm. First, we send the first layer, then the first and the second, then three layers, and so on. This is probably not optimal in terms of communication but allows processing all cases, especially the case where multiple sub-domains must be crossed to add ghost cell layers.
: implement the optimizations specified in the comments in this function.
: ensure that we only work with the cell/node connectivity.
Definition at line 297 of file GhostLayerBuilder2.cc.
References _markBoundaryItems(), _markBoundaryNodes(), ARCANE_FATAL, Arcane::IParallelMng::commRank(), Arcane::mesh::ItemInternalMap::eachItem(), Arcane::ItemBase::flags(), Arcane::ItemFlags::II_Shared, Arcane::TraceAccessor::info(), Arcane::Item::isOwn(), Arcane::IParallelMng::isParallel(), Arcane::Item::itemBase(), Arcane::Item::localId(), Arcane::ItemWithNodes::nodeIds(), Arcane::Item::owner(), and Arcane::TraceAccessor::warning().
|
private |
Definition at line 76 of file GhostLayerBuilder2.cc.
|
private |
Definition at line 75 of file GhostLayerBuilder2.cc.
|
private |
Definition at line 72 of file GhostLayerBuilder2.cc.
|
private |
Definition at line 73 of file GhostLayerBuilder2.cc.
|
private |
Definition at line 74 of file GhostLayerBuilder2.cc.
|
private |
Definition at line 79 of file GhostLayerBuilder2.cc.
|
private |
Definition at line 78 of file GhostLayerBuilder2.cc.
|
private |
Definition at line 77 of file GhostLayerBuilder2.cc.