Construction of semi-conformal interface information. More...
Public Types | |
| typedef HashTableMapT< ItemUniqueId, TiedInterfaceNodeInfo > | NodeInfoList |
| typedef HashTableMapT< ItemUniqueId, TiedInterfaceFace > | TiedInterfaceFaceMap |
| typedef HashTableMapEnumeratorT< ItemUniqueId, TiedInterfaceNodeInfo > | NodeInfoListEnumerator |
| typedef HashTableMapEnumeratorT< ItemUniqueId, TiedInterfaceFace > | TiedInterfaceFaceMapEnumerator |
| typedef std::set< TiedInterfaceSortedNodeInfo > | SortedNodeInfoSet |
| typedef HashTableMapT< ItemUniqueId, TiedInterfaceStructurationInfo > | StructurationMap |
| typedef HashTableMapEnumeratorT< ItemUniqueId, TiedInterfaceStructurationInfo > | StructurationMapEnumerator |
Public Member Functions | |
| TiedInterfaceBuilder (IMesh *mesh, const FaceGroup &slave_interface, bool use_own, bool is_debug) | |
| void | setPlanarTolerance (Real tolerance) |
| void | computeInterfaceConnections (bool allow_communication) |
| Builds the info for a linked interface. | |
| void | computeInterfaceInfos (TiedInterfaceBuilderInfos &infos, bool is_structured) |
| Migrates the meshes on the links. | |
| void | changeOwners (Int64Array &linked_cells, Int32Array &linked_owers) |
| Positions the links between cells. | |
| void | changeOwnersOld () |
| Migrates the cells on the links. | |
| const FaceGroup & | masterInterface () const |
| 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 | |
| GeometricUtilities::ProjectionInfo | _findProjection (const TiedInterfaceFace &face, Real3 point) |
| Calculates the projection of a point onto a face. | |
| void | _searchMasterFaces (Array< ItemUniqueId > &slave_faces_to_process, Array< ItemUniqueId > &remaining_slave_faces) |
| bool | _isInsideFace (const TiedInterfaceFace &face, Real3 point) |
| Real3 | _computeNormale (const TiedInterfaceFace &face) |
| void | _computeMasterInterface () |
| Determines the master surface of the interface. | |
| void | _gatherFaces (ConstArrayView< ItemUniqueId > faces_to_send, TiedInterfaceFaceMap &face_map) |
| void | _gatherAllNodesInfo () |
| envoie et récupère les informations sur les noeuds de l'interface. | |
| void | _printFaces (std::ostream &o, TiedInterfaceFaceMap &face_map) |
| void | _computeProjectionInfos (TiedInterfaceBuilderInfos &infos, bool is_structured) |
| void | _addFaceToList (const Face &face, TiedInterfaceFaceMap &face_map) |
| void | _detectStructuration (const TiedInterfaceMasterFace &master_face, StructurationMap &nodes) |
| void | _detectStructurationRecursive (Array< ItemUniqueId > &slave_faces_to_process, Array< ItemUniqueId > &remaining_slave_faces, StructurationMap &slave_nodes) |
| void | _removeMasterFacesWithNoSlave () |
| Removes from the group of master faces those that are connected to any slave face. | |
Private Attributes | |
| bool | m_is_debug |
| IMesh * | m_mesh |
| VariableNodeReal3 | m_nodes_coord |
| TiedInterfaceFaceInfoMng | m_face_info_mng |
| NodeInfoList | m_nodes_info |
| TiedInterfaceFaceMap | m_slave_faces |
| TiedInterfaceFaceMap | m_master_faces |
| String | m_slave_interface_name |
| FaceGroup | m_slave_interface |
| FaceGroup | m_master_interface |
| HashTableMapT< ItemUniqueId, ItemUniqueId > | m_slave_faces_master_face_uid |
| Table indicating for each slave face, the uid of the corresponding master face. | |
| Real | m_planar_tolerance |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Construction of semi-conformal interface information.
The current algorithm has the following limitations:
The goal is to calculate the set of master and slave faces, for each master face the list of its slave faces and for each slave face node its iso-barycentric coordinates in the corresponding master face.
The algorithm works as follows:
Definition at line 402 of file TiedInterface.cc.
| typedef HashTableMapT<ItemUniqueId, TiedInterfaceNodeInfo> Arcane::mesh::TiedInterfaceBuilder::NodeInfoList |
Definition at line 407 of file TiedInterface.cc.
| typedef HashTableMapEnumeratorT<ItemUniqueId, TiedInterfaceNodeInfo> Arcane::mesh::TiedInterfaceBuilder::NodeInfoListEnumerator |
Definition at line 409 of file TiedInterface.cc.
| typedef std::set<TiedInterfaceSortedNodeInfo> Arcane::mesh::TiedInterfaceBuilder::SortedNodeInfoSet |
Definition at line 411 of file TiedInterface.cc.
| typedef HashTableMapT<ItemUniqueId, TiedInterfaceStructurationInfo> Arcane::mesh::TiedInterfaceBuilder::StructurationMap |
Definition at line 412 of file TiedInterface.cc.
| typedef HashTableMapEnumeratorT<ItemUniqueId, TiedInterfaceStructurationInfo> Arcane::mesh::TiedInterfaceBuilder::StructurationMapEnumerator |
Definition at line 413 of file TiedInterface.cc.
| typedef HashTableMapT<ItemUniqueId, TiedInterfaceFace> Arcane::mesh::TiedInterfaceBuilder::TiedInterfaceFaceMap |
Definition at line 408 of file TiedInterface.cc.
| typedef HashTableMapEnumeratorT<ItemUniqueId, TiedInterfaceFace> Arcane::mesh::TiedInterfaceBuilder::TiedInterfaceFaceMapEnumerator |
Definition at line 410 of file TiedInterface.cc.
| Arcane::mesh::TiedInterfaceBuilder::TiedInterfaceBuilder | ( | IMesh * | mesh, |
| const FaceGroup & | slave_interface, | ||
| bool | use_own, | ||
| bool | is_debug ) |
Definition at line 470 of file TiedInterface.cc.
|
private |
Definition at line 853 of file TiedInterface.cc.
|
private |
Determines the master surface of the interface.
Considering that the mesh is semi-conforming, this means that all nodes of the master faces of the interface belong to a slave face. It is therefore enough to determine these master faces by iterating through the list of slave faces, marking the nodes of these faces. A face is then considered master if all of its nodes are marked.
Definition at line 791 of file TiedInterface.cc.
References Arcane::Array< T >::add(), ARCANE_FATAL, ENUMERATE_FACE, Arcane::TraceAccessor::info(), Arcane::Item::localId(), Arcane::mesh::TiedInterfaceNodeInfo::m_connected_master_faces, Arcane::ItemWithNodes::nbNode(), Arcane::ItemWithNodes::nodes(), and Arcane::Item::uniqueId().
Referenced by computeInterfaceConnections().
|
private |
Definition at line 711 of file TiedInterface.cc.
|
private |
Definition at line 915 of file TiedInterface.cc.
|
private |
Definition at line 1169 of file TiedInterface.cc.
|
private |
Definition at line 1206 of file TiedInterface.cc.
|
private |
Calculates the projection of a point onto a face.
In 2D, the face is an edge and the projection is simple.
In 3D, if the face is a triangle, the projection is also simple since it is the projection onto a plane. For a face having more than 3 nodes, its nodes are not necessarily coplanar. The face is then decomposed into triangles whose vertex is the barycenter of the face and we calculate the projection of the point point onto each of these triangles. We therefore have as many projections as triangles. We keep which is inside one of these triangles. It may happen for reasons related to numerical calculation that the point is actually inside the face but in none of its triangles (for example, if it is on a diagonal). In this case, we take the one that is closest to the point point.
Definition at line 662 of file TiedInterface.cc.
References Arcane::GeometricUtilities::ProjectionInfo::m_distance, Arcane::GeometricUtilities::ProjectionInfo::m_region, and Arcane::GeometricUtilities::ProjectionInfo::projection().
|
private |
envoie et récupère les informations sur les noeuds de l'interface.
Rassemble en parallèle les noeuds et la liste des faces maitres avec lesquelles ils peuvent être connectectés.
Definition at line 1328 of file TiedInterface.cc.
References Arcane::Array< T >::add(), Arcane::IParallelMng::allGather(), Arcane::BasicSerializer::allocateBuffer(), Arcane::IParallelMng::barrier(), Arcane::IParallelMng::commSize(), Arcane::DT_Int64, Arcane::DT_Real, Arcane::BasicSerializer::get(), Arcane::BasicSerializer::getInteger(), Arcane::mesh::TiedInterfaceNodeInfo::m_connected_master_faces, Arcane::mesh::TiedInterfaceNodeInfo::m_coord, Arcane::ISerializer::ModeGet, Arcane::ISerializer::ModePut, Arcane::BasicSerializer::put(), Arcane::BasicSerializer::putInteger(), Arcane::BasicSerializer::reserve(), Arcane::Array< T >::resize(), Arcane::BasicSerializer::setMode(), Arcane::AbstractArray< T >::size(), Arcane::Real3POD::x, Arcane::Real3POD::y, and Arcane::Real3POD::z.
Referenced by computeInterfaceConnections().
|
private |
Sends to all subdomains the unique ID faces faces_to_send from the list face_map and receives those from all other subdomains.
Definition at line 1421 of file TiedInterface.cc.
References Arcane::Array< T >::add(), Arcane::HashTableMapT< KeyType, ValueType, KeyTraitsType >::add(), Arcane::IParallelMng::allGather(), Arcane::BasicSerializer::allocateBuffer(), Arcane::IParallelMng::barrier(), Arcane::IParallelMng::commRank(), Arcane::IParallelMng::commSize(), Arcane::DT_Int64, Arcane::DT_Real, Arcane::BasicSerializer::get(), Arcane::BasicSerializer::getInteger(), Arcane::HashTableMapT< KeyType, ValueType, KeyTraitsType >::hasKey(), Arcane::mesh::TiedInterfaceNodeInfo::m_coord, Arcane::ISerializer::ModeGet, Arcane::ISerializer::ModePut, Arcane::BasicSerializer::put(), Arcane::BasicSerializer::putInteger(), Arcane::Array< T >::reserve(), Arcane::BasicSerializer::reserve(), Arcane::Array< T >::resize(), Arcane::BasicSerializer::setMode(), Arcane::AbstractArray< T >::size(), Arcane::ConstArrayView< T >::size(), Arcane::Real3POD::x, Arcane::Real3POD::y, and Arcane::Real3POD::z.
Referenced by computeInterfaceConnections().
|
private |
Definition at line 744 of file TiedInterface.cc.
|
private |
Definition at line 1292 of file TiedInterface.cc.
|
private |
Removes from the group of master faces those that are connected to any slave face.
Definition at line 885 of file TiedInterface.cc.
References Arcane::Array< T >::add(), Arcane::AbstractArray< T >::empty(), ENUMERATE_FACE, Arcane::TraceAccessor::info(), m_slave_faces_master_face_uid, and Arcane::Item::uniqueId().
Referenced by computeInterfaceInfos().
|
private |
Definition at line 501 of file TiedInterface.cc.
| void Arcane::mesh::TiedInterfaceBuilder::changeOwners | ( | Int64Array & | linked_cells, |
| Int32Array & | linked_owners ) |
Positions the links between cells.
Changes the owner of each cell linked to a slave face so that it is the same as that of the associated master cell.
If a cell has several slave faces connected to masters, ensures that all these masters are in the same subdomain. Adds to linked_cells the list of linked meshes and to linked_owners the associated owner.
Definition at line 1592 of file TiedInterface.cc.
References Arcane::Array< T >::add(), ARCANE_FATAL, Arcane::Face::cell(), ENUMERATE_FACE, Arcane::Array< T >::fill(), Arcane::Item::localId(), m_slave_faces_master_face_uid, Arcane::IItemFamily::maxLocalId(), Arcane::Item::owner(), and Arcane::Item::uniqueId().
Referenced by Arcane::mesh::TiedInterfacePartitionConstraint::addLinkedCells().
| void Arcane::mesh::TiedInterfaceBuilder::changeOwnersOld | ( | ) |
Migrates the cells on the links.
Changes the owner of each cell linked to a slave face so that it is the same as that of the associated master cell.
NOTE: what to do if a cell has several slave faces connected to masters that are not in the same subdomain?
NOTE: obsolete version, because it does not work if a meshing has multiple welds
Definition at line 1554 of file TiedInterface.cc.
References ARCANE_FATAL, Arcane::Face::cell(), ENUMERATE_FACE, Arcane::Array< T >::fill(), Arcane::IItemFamily::itemsNewOwner(), Arcane::Item::localId(), m_slave_faces_master_face_uid, Arcane::IItemFamily::maxLocalId(), and Arcane::Item::uniqueId().
| void Arcane::mesh::TiedInterfaceBuilder::computeInterfaceConnections | ( | bool | allow_communication | ) |
Builds the info for a linked interface.
This operation is collective if allow_communication is true. If allow_communication is false, it means that all slave faces of a master face are in this subdomain.
Definition at line 1645 of file TiedInterface.cc.
References _computeMasterInterface(), _gatherAllNodesInfo(), _gatherFaces(), Arcane::Array< T >::add(), ARCANE_FATAL, Arcane::arcaneIsCheck(), Arcane::Array< T >::clear(), Arcane::IParallelMng::commRank(), Arcane::Array< T >::copy(), Arcane::TraceAccessor::info(), Arcane::String::localstr(), Arcane::IParallelMng::reduce(), Arcane::MessagePassing::ReduceSum, and Arcane::AbstractArray< T >::size().
Referenced by Arcane::mesh::TiedInterfacePartitionConstraint::addLinkedCells(), and Arcane::mesh::TiedInterface::build().
| void Arcane::mesh::TiedInterfaceBuilder::computeInterfaceInfos | ( | TiedInterfaceBuilderInfos & | infos, |
| bool | is_structured ) |
Migrates the meshes on the links.
Changes the owner of each cell linked to a slave face so that it is the same as that of the associated master cell.
NOTE: what to do if a cell has several slave faces connected to masters that are not in the same subdomain?
Definition at line 1725 of file TiedInterface.cc.
References _removeMasterFacesWithNoSlave().
Referenced by Arcane::mesh::TiedInterface::build().
|
inline |
Definition at line 426 of file TiedInterface.cc.
| void Arcane::mesh::TiedInterfaceBuilder::setPlanarTolerance | ( | Real | tolerance | ) |
Definition at line 492 of file TiedInterface.cc.
|
private |
Definition at line 433 of file TiedInterface.cc.
|
private |
Definition at line 430 of file TiedInterface.cc.
|
private |
Definition at line 437 of file TiedInterface.cc.
|
private |
Definition at line 440 of file TiedInterface.cc.
|
private |
Definition at line 431 of file TiedInterface.cc.
|
private |
Definition at line 432 of file TiedInterface.cc.
|
private |
Definition at line 435 of file TiedInterface.cc.
|
private |
Definition at line 443 of file TiedInterface.cc.
|
private |
Definition at line 436 of file TiedInterface.cc.
|
private |
Table indicating for each slave face, the uid of the corresponding master face.
Definition at line 442 of file TiedInterface.cc.
Referenced by _removeMasterFacesWithNoSlave(), changeOwners(), and changeOwnersOld().
|
private |
Definition at line 439 of file TiedInterface.cc.
|
private |
Definition at line 438 of file TiedInterface.cc.