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

Merging nodes of a mesh. More...

#include <arcane/mesh/MeshNodeMerger.h>

Inheritance diagram for Arcane::mesh::MeshNodeMerger:
Collaboration diagram for Arcane::mesh::MeshNodeMerger:

Public Member Functions

 MeshNodeMerger (IMesh *mesh)
void mergeNodes (Int32ConstArrayView nodes_local_id, Int32ConstArrayView nodes_to_merge_local_id, bool allow_non_corresponding_face=false)
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 Attributes

IMeshm_mesh = nullptr
NodeFamilym_node_family = nullptr
EdgeFamilym_edge_family = nullptr
FaceFamilym_face_family = nullptr
CellFamilym_cell_family = nullptr
std::map< Node, Nodem_nodes_correspondance
std::map< Face, Facem_faces_correspondance

Additional Inherited Members

Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const

Detailed Description

Merging nodes of a mesh.

The current implementation only handles 'classical' meshes and only handles node, edge, face, and cell families.

Furthermore, the 3D part has not been tested. It should work as long as the edges are not active. Same for the parallel part, but it has not been tested either.

Definition at line 52 of file MeshNodeMerger.h.

Constructor & Destructor Documentation

◆ MeshNodeMerger()

Arcane::mesh::MeshNodeMerger::MeshNodeMerger ( IMesh * mesh)
explicit

Definition at line 42 of file MeshNodeMerger.cc.

Member Function Documentation

◆ mergeNodes()

void Arcane::mesh::MeshNodeMerger::mergeNodes ( Int32ConstArrayView nodes_local_id,
Int32ConstArrayView nodes_to_merge_local_id,
bool allow_non_corresponding_face = false )

The principle of the algorithm is as follows:

  1. Determine the set of faces and cells that have at least one modified node. These are the ones that need to be processed.
  2. For faces, determine those whose nodes are all merged. These faces will be merged and disappear. It must be determined with which faces they will merge. In 3D, the same must be done for edges.
  3. Once everything is calculated, the connectivities of the entities (cells, faces, and edges) that are modified must be updated.
  4. Finally, the merged nodes, edges, and faces must be destroyed.

It may be necessary to adapt this algorithm when the new connectivities are in place.

Definition at line 81 of file MeshNodeMerger.cc.

References ARCANE_FATAL, Arcane::Face::backCell(), Arcane::FaceReorienter::checkAndChangeOrientation(), ENUMERATE_, ENUMERATE_CELL, Arcane::mesh::ItemTools::findFaceInNode2(), Arcane::TraceAccessor::info(), Arcane::Face::nbCell(), Arcane::ItemWithNodes::nbNode(), Arcane::ItemWithNodes::nodes(), Arcane::Item::null(), Arcane::Array< T >::resize(), Arcane::ConstArrayView< T >::size(), Arcane::Item::type(), and Arcane::Item::uniqueId().

Referenced by Arcane::UnstructuredMeshUtilities::mergeNodes().

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

Member Data Documentation

◆ m_cell_family

CellFamily* Arcane::mesh::MeshNodeMerger::m_cell_family = nullptr
private

Definition at line 71 of file MeshNodeMerger.h.

◆ m_edge_family

EdgeFamily* Arcane::mesh::MeshNodeMerger::m_edge_family = nullptr
private

Definition at line 69 of file MeshNodeMerger.h.

◆ m_face_family

FaceFamily* Arcane::mesh::MeshNodeMerger::m_face_family = nullptr
private

Definition at line 70 of file MeshNodeMerger.h.

◆ m_faces_correspondance

std::map<Face, Face> Arcane::mesh::MeshNodeMerger::m_faces_correspondance
private

Definition at line 73 of file MeshNodeMerger.h.

◆ m_mesh

IMesh* Arcane::mesh::MeshNodeMerger::m_mesh = nullptr
private

Definition at line 67 of file MeshNodeMerger.h.

◆ m_node_family

NodeFamily* Arcane::mesh::MeshNodeMerger::m_node_family = nullptr
private

Definition at line 68 of file MeshNodeMerger.h.

◆ m_nodes_correspondance

std::map<Node, Node> Arcane::mesh::MeshNodeMerger::m_nodes_correspondance
private

Definition at line 72 of file MeshNodeMerger.h.


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