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

Construction of semi-conformal interface information. More...

Inheritance diagram for Arcane::mesh::TiedInterfaceBuilder:
Collaboration diagram for Arcane::mesh::TiedInterfaceBuilder:

Public Types

typedef HashTableMapT< ItemUniqueId, TiedInterfaceNodeInfoNodeInfoList
typedef HashTableMapT< ItemUniqueId, TiedInterfaceFaceTiedInterfaceFaceMap
typedef HashTableMapEnumeratorT< ItemUniqueId, TiedInterfaceNodeInfoNodeInfoListEnumerator
typedef HashTableMapEnumeratorT< ItemUniqueId, TiedInterfaceFaceTiedInterfaceFaceMapEnumerator
typedef std::set< TiedInterfaceSortedNodeInfoSortedNodeInfoSet
typedef HashTableMapT< ItemUniqueId, TiedInterfaceStructurationInfoStructurationMap
typedef HashTableMapEnumeratorT< ItemUniqueId, TiedInterfaceStructurationInfoStructurationMapEnumerator

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 FaceGroupmasterInterface () 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.
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

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
IMeshm_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, ItemUniqueIdm_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

Detailed Description

Construction of semi-conformal interface information.

The current algorithm has the following limitations:

  • it only applies to surfaces composed solely of quadrangles in 3D and edges in 2D.
  • a semi-conformal interface is composed of two surfaces, one called slave and the other master. The slave surface contains the set of faces that are most meshed. This surface is specified by the user. The master surface is the one containing the most coarsely meshed faces.

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:

  • we know the set of slave faces. We must determine the set of master faces. To do this, we iterate over all slave faces and mark their nodes. We then just need to iterate over all external faces of the mesh and if a face has all its nodes marked and is not slave, it is a master face.
  • TODO CONTINUE.

Definition at line 402 of file TiedInterface.cc.

Member Typedef Documentation

◆ NodeInfoList

typedef HashTableMapT<ItemUniqueId, TiedInterfaceNodeInfo> Arcane::mesh::TiedInterfaceBuilder::NodeInfoList

Definition at line 407 of file TiedInterface.cc.

◆ NodeInfoListEnumerator

typedef HashTableMapEnumeratorT<ItemUniqueId, TiedInterfaceNodeInfo> Arcane::mesh::TiedInterfaceBuilder::NodeInfoListEnumerator

Definition at line 409 of file TiedInterface.cc.

◆ SortedNodeInfoSet

typedef std::set<TiedInterfaceSortedNodeInfo> Arcane::mesh::TiedInterfaceBuilder::SortedNodeInfoSet

Definition at line 411 of file TiedInterface.cc.

◆ StructurationMap

typedef HashTableMapT<ItemUniqueId, TiedInterfaceStructurationInfo> Arcane::mesh::TiedInterfaceBuilder::StructurationMap

Definition at line 412 of file TiedInterface.cc.

◆ StructurationMapEnumerator

typedef HashTableMapEnumeratorT<ItemUniqueId, TiedInterfaceStructurationInfo> Arcane::mesh::TiedInterfaceBuilder::StructurationMapEnumerator

Definition at line 413 of file TiedInterface.cc.

◆ TiedInterfaceFaceMap

typedef HashTableMapT<ItemUniqueId, TiedInterfaceFace> Arcane::mesh::TiedInterfaceBuilder::TiedInterfaceFaceMap

Definition at line 408 of file TiedInterface.cc.

◆ TiedInterfaceFaceMapEnumerator

typedef HashTableMapEnumeratorT<ItemUniqueId, TiedInterfaceFace> Arcane::mesh::TiedInterfaceBuilder::TiedInterfaceFaceMapEnumerator

Definition at line 410 of file TiedInterface.cc.

Constructor & Destructor Documentation

◆ TiedInterfaceBuilder()

Arcane::mesh::TiedInterfaceBuilder::TiedInterfaceBuilder ( IMesh * mesh,
const FaceGroup & slave_interface,
bool use_own,
bool is_debug )

Definition at line 470 of file TiedInterface.cc.

Member Function Documentation

◆ _addFaceToList()

void Arcane::mesh::TiedInterfaceBuilder::_addFaceToList ( const Face & face,
TiedInterfaceFaceMap & face_map )
private

Definition at line 853 of file TiedInterface.cc.

◆ _computeMasterInterface()

void Arcane::mesh::TiedInterfaceBuilder::_computeMasterInterface ( )
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.

Note
This algorithm can potentially return more master faces than there actually are in the case where a cell has welds on several sides. This is not very serious because no slave face will be found for these master faces and they will be removed from the group of master faces.

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().

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

◆ _computeNormale()

Real3 Arcane::mesh::TiedInterfaceBuilder::_computeNormale ( const TiedInterfaceFace & face)
private

Definition at line 711 of file TiedInterface.cc.

◆ _computeProjectionInfos()

void Arcane::mesh::TiedInterfaceBuilder::_computeProjectionInfos ( TiedInterfaceBuilderInfos & infos,
bool is_structured )
private

Definition at line 915 of file TiedInterface.cc.

◆ _detectStructuration()

void Arcane::mesh::TiedInterfaceBuilder::_detectStructuration ( const TiedInterfaceMasterFace & master_face,
StructurationMap & nodes )
private

Definition at line 1169 of file TiedInterface.cc.

◆ _detectStructurationRecursive()

void Arcane::mesh::TiedInterfaceBuilder::_detectStructurationRecursive ( Array< ItemUniqueId > & slave_faces_to_process,
Array< ItemUniqueId > & remaining_slave_faces,
StructurationMap & slave_nodes )
private

Definition at line 1206 of file TiedInterface.cc.

◆ _findProjection()

GeometricUtilities::ProjectionInfo Arcane::mesh::TiedInterfaceBuilder::_findProjection ( const TiedInterfaceFace & face,
Real3 point )
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().

Here is the call graph for this function:

◆ _gatherAllNodesInfo()

void Arcane::mesh::TiedInterfaceBuilder::_gatherAllNodesInfo ( )
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.

Warning
Cette méthode ne doit pas être appelée en séquentiel.

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().

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

◆ _gatherFaces()

void Arcane::mesh::TiedInterfaceBuilder::_gatherFaces ( ConstArrayView< ItemUniqueId > faces_to_send,
TiedInterfaceFaceMap & face_map )
private

◆ _isInsideFace()

bool Arcane::mesh::TiedInterfaceBuilder::_isInsideFace ( const TiedInterfaceFace & face,
Real3 point )
private

Definition at line 744 of file TiedInterface.cc.

◆ _printFaces()

void Arcane::mesh::TiedInterfaceBuilder::_printFaces ( std::ostream & o,
TiedInterfaceFaceMap & face_map )
private

Definition at line 1292 of file TiedInterface.cc.

◆ _removeMasterFacesWithNoSlave()

void Arcane::mesh::TiedInterfaceBuilder::_removeMasterFacesWithNoSlave ( )
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().

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

◆ _searchMasterFaces()

void Arcane::mesh::TiedInterfaceBuilder::_searchMasterFaces ( Array< ItemUniqueId > & slave_faces_to_process,
Array< ItemUniqueId > & remaining_slave_faces )
private

Definition at line 501 of file TiedInterface.cc.

◆ changeOwners()

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().

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

◆ changeOwnersOld()

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().

Here is the call graph for this function:

◆ computeInterfaceConnections()

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().

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

◆ computeInterfaceInfos()

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().

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

◆ masterInterface()

const FaceGroup & Arcane::mesh::TiedInterfaceBuilder::masterInterface ( ) const
inline

Definition at line 426 of file TiedInterface.cc.

◆ setPlanarTolerance()

void Arcane::mesh::TiedInterfaceBuilder::setPlanarTolerance ( Real tolerance)

Definition at line 492 of file TiedInterface.cc.

Member Data Documentation

◆ m_face_info_mng

TiedInterfaceFaceInfoMng Arcane::mesh::TiedInterfaceBuilder::m_face_info_mng
private

Definition at line 433 of file TiedInterface.cc.

◆ m_is_debug

bool Arcane::mesh::TiedInterfaceBuilder::m_is_debug
private

Definition at line 430 of file TiedInterface.cc.

◆ m_master_faces

TiedInterfaceFaceMap Arcane::mesh::TiedInterfaceBuilder::m_master_faces
private

Definition at line 437 of file TiedInterface.cc.

◆ m_master_interface

FaceGroup Arcane::mesh::TiedInterfaceBuilder::m_master_interface
private

Definition at line 440 of file TiedInterface.cc.

◆ m_mesh

IMesh* Arcane::mesh::TiedInterfaceBuilder::m_mesh
private

Definition at line 431 of file TiedInterface.cc.

◆ m_nodes_coord

VariableNodeReal3 Arcane::mesh::TiedInterfaceBuilder::m_nodes_coord
private

Definition at line 432 of file TiedInterface.cc.

◆ m_nodes_info

NodeInfoList Arcane::mesh::TiedInterfaceBuilder::m_nodes_info
private

Definition at line 435 of file TiedInterface.cc.

◆ m_planar_tolerance

Real Arcane::mesh::TiedInterfaceBuilder::m_planar_tolerance
private

Definition at line 443 of file TiedInterface.cc.

◆ m_slave_faces

TiedInterfaceFaceMap Arcane::mesh::TiedInterfaceBuilder::m_slave_faces
private

Definition at line 436 of file TiedInterface.cc.

◆ m_slave_faces_master_face_uid

HashTableMapT<ItemUniqueId, ItemUniqueId> Arcane::mesh::TiedInterfaceBuilder::m_slave_faces_master_face_uid
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().

◆ m_slave_interface

FaceGroup Arcane::mesh::TiedInterfaceBuilder::m_slave_interface
private

Definition at line 439 of file TiedInterface.cc.

◆ m_slave_interface_name

String Arcane::mesh::TiedInterfaceBuilder::m_slave_interface_name
private

Definition at line 438 of file TiedInterface.cc.


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