Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::mesh::DynamicMeshChecker Class Reference
Inheritance diagram for Arcane::mesh::DynamicMeshChecker:
Collaboration diagram for Arcane::mesh::DynamicMeshChecker:

Public Member Functions

 DynamicMeshChecker (IMesh *mesh)
IMeshmesh () override
 Associated mesh.
void setCheckLevel (Integer level) override
 Sets the mesh verification level.
Integer checkLevel () const override
 Current verification level.
void checkValidMesh () override
 Performs a preliminary check of mesh validity. The checks cover the following points:
void checkValidMeshFull () override
 Verification of mesh validity.
void checkValidReplication () override
 Checks that subdomains are correctly replicated.
void checkVariablesSynchronization () override
 Checks variable synchronization.
void checkItemGroupsSynchronization () override
 Checks synchronization on entity groups.
void setIsCheckItemsOwner (bool v) override
 Indicates whether entity owner verification is active.
bool isCheckItemsOwner () const override
 Indicates whether entity owner verification is active (true by default).
void checkValidConnectivity ()
void checkGhostCells ()
 Checks that the ghost cell layer is correct.
void checkMeshFromReferenceFile ()
void updateAMRFaceOrientation ()
void updateAMRFaceOrientation (ArrayView< Int64 > ghost_cell_to_refine)
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
Public Member Functions inherited from Arcane::IMeshChecker
virtual ~IMeshChecker ()=default
 Frees resources.

Private Member Functions

void _checkFacesOrientation ()
 Checks that faces are correctly oriented and connected.
void _checkEdgesOrientation ()
 Checks that edges are correctly numbered.
void _checkValidItemOwner (IItemFamily *family)
void _checkReplicationFamily (IItemFamily *family)

Private Attributes

IMeshm_mesh = nullptr
Integer m_check_level = 0
VariableCellArrayInt64m_var_cells_faces = nullptr
VariableCellArrayInt64m_var_cells_nodes = nullptr
bool m_compare_reference_file = false
bool m_is_check_items_owner = true

Additional Inherited Members

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

Detailed Description

Definition at line 39 of file DynamicMeshChecker.h.

Constructor & Destructor Documentation

◆ DynamicMeshChecker()

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

Definition at line 45 of file DynamicMeshChecker.cc.

◆ ~DynamicMeshChecker()

Arcane::mesh::DynamicMeshChecker::~DynamicMeshChecker ( )

Definition at line 57 of file DynamicMeshChecker.cc.

Member Function Documentation

◆ _checkEdgesOrientation()

void Arcane::mesh::DynamicMeshChecker::_checkEdgesOrientation ( )
private

Checks that edges are correctly numbered.

Definition at line 521 of file DynamicMeshChecker.cc.

References ARCANE_FATAL, ENUMERATE_, Arcane::TraceAccessor::info(), Arcane::Edge::nbNode(), Arcane::ItemWithNodes::node(), and Arcane::Item::uniqueId().

Referenced by checkValidConnectivity().

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

◆ _checkFacesOrientation()

void Arcane::mesh::DynamicMeshChecker::_checkFacesOrientation ( )
private

Checks that faces are correctly oriented and connected.

Definition at line 443 of file DynamicMeshChecker.cc.

References ARCANE_FATAL, Arcane::Face::backCell(), ENUMERATE_, Arcane::Cell::face(), Arcane::ItemTypeId::fromInteger(), Arcane::Face::frontCell(), Arcane::ItemTypeInfo::LocalFace::nbNode(), Arcane::ItemWithNodes::nbNode(), Arcane::ItemTypeInfo::LocalFace::node(), Arcane::ItemWithNodes::node(), Arcane::Item::null(), Arcane::Array< T >::resize(), Arcane::ItemTypeInfo::LocalFace::typeId(), Arcane::Item::typeInfo(), and Arcane::Item::uniqueId().

Referenced by checkValidConnectivity().

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

◆ _checkReplicationFamily()

void Arcane::mesh::DynamicMeshChecker::_checkReplicationFamily ( IItemFamily * family)
private

Definition at line 785 of file DynamicMeshChecker.cc.

◆ _checkValidItemOwner()

void Arcane::mesh::DynamicMeshChecker::_checkValidItemOwner ( IItemFamily * family)
private

Definition at line 547 of file DynamicMeshChecker.cc.

◆ checkGhostCells()

void Arcane::mesh::DynamicMeshChecker::checkGhostCells ( )

Checks that the ghost cell layer is correct.

Checks that all ghost cells are properly connected to a cell of this sub-domain (case where there is only one layer of ghost cells).

Todo

Check that no boundary cell belongs to this sub-domain

Support multiple layers of ghost cells.

Definition at line 667 of file DynamicMeshChecker.cc.

References ENUMERATE_CELL, Arcane::TraceAccessor::info(), Arcane::Item::isOwn(), Arcane::ItemWithNodes::nodes(), and Arcane::TraceAccessor::pwarning().

Here is the call graph for this function:

◆ checkItemGroupsSynchronization()

void Arcane::mesh::DynamicMeshChecker::checkItemGroupsSynchronization ( )
overridevirtual

Checks synchronization on entity groups.

Checks for each group of each family (other than particles) that the entities are the same on each subdomain.

Raises a FatalErrorException in case of error.

Implements Arcane::IMeshChecker.

Definition at line 640 of file DynamicMeshChecker.cc.

References ARCANE_FATAL, and Arcane::mesh::ItemGroupsSynchronize::checkSynchronize().

Here is the call graph for this function:

◆ checkLevel()

Integer Arcane::mesh::DynamicMeshChecker::checkLevel ( ) const
inlineoverridevirtual

Current verification level.

Implements Arcane::IMeshChecker.

Definition at line 52 of file DynamicMeshChecker.h.

◆ checkMeshFromReferenceFile()

void Arcane::mesh::DynamicMeshChecker::checkMeshFromReferenceFile ( )

Definition at line 692 of file DynamicMeshChecker.cc.

◆ checkValidConnectivity()

◆ checkValidMesh()

void Arcane::mesh::DynamicMeshChecker::checkValidMesh ( )
overridevirtual

Performs a preliminary check of mesh validity. The checks cover the following points:

  • no mesh entities having a null index.
  • for faces, checks that at least one frontCell or backCell exists. A fatal error is generated if these rules are not respected.

Implements Arcane::IMeshChecker.

Definition at line 73 of file DynamicMeshChecker.cc.

References Arcane::IItemFamily::checkValid(), checkValidConnectivity(), checkValidMeshFull(), ENUMERATE_CELL, Arcane::Cell::face(), Arcane::TraceAccessor::info(), Arcane::IItemFamily::itemKind(), Arcane::Cell::nbFace(), Arcane::ItemWithNodes::nbNode(), Arcane::ItemWithNodes::node(), and Arcane::Item::uniqueId().

Here is the call graph for this function:

◆ checkValidMeshFull()

void Arcane::mesh::DynamicMeshChecker::checkValidMeshFull ( )
overridevirtual

Verification of mesh validity.

This is a global verification across all subdomains.

It checks, in particular, that the connectivity is consistent between subdomains.

The verification can be quite CPU time-intensive. This method is collective.

Implements Arcane::IMeshChecker.

Definition at line 131 of file DynamicMeshChecker.cc.

References ARCANE_FATAL, Arcane::Face::backCell(), Arcane::TraceAccessor::debug(), ENUMERATE_CELL, ENUMERATE_FACE, Arcane::TraceAccessor::error(), Arcane::Face::frontCell(), Arcane::TraceAccessor::info(), Arcane::IVariable::itemFamily(), Arcane::IVariable::itemFamilyName(), Arcane::MeshVariableScalarRefT< ItemTypeT, DataTypeT >::itemGroup(), Arcane::IVariable::itemGroupName(), Arcane::Item::null(), Arcane::Item::type(), Arcane::Item::uniqueId(), and Arcane::VariableRef::variable().

Referenced by checkValidMesh().

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

◆ checkValidReplication()

void Arcane::mesh::DynamicMeshChecker::checkValidReplication ( )
overridevirtual

Checks that subdomains are correctly replicated.

The following checks are performed:

  • same entity families and same values for these families.
  • same mesh node coordinates.

Implements Arcane::IMeshChecker.

Definition at line 723 of file DynamicMeshChecker.cc.

References Arcane::Array< T >::add(), Arcane::ValueChecker::areEqual(), Arcane::ValueChecker::areEqualArray(), Arcane::Array< T >::copy(), ENUMERATE_ITEM, Arcane::IParallelReplication::hasReplication(), Arcane::IK_Particle, Arcane::TraceAccessor::info(), Arcane::IItemFamily::itemKind(), Arcane::IParallelMng::reduce(), Arcane::MessagePassing::ReduceMax, Arcane::IParallelReplication::replicaParallelMng(), Arcane::IParallelMng::replication(), Arcane::Array< T >::resize(), Arcane::AbstractArray< T >::size(), Arcane::ItemGroup::size(), and Arcane::Array< T >::view().

Here is the call graph for this function:

◆ checkVariablesSynchronization()

void Arcane::mesh::DynamicMeshChecker::checkVariablesSynchronization ( )
overridevirtual

Checks variable synchronization.

Checks for each variable that its values on ghost entities are the same as the value on the entity's owning subdomain.

Variables on particles are not compared.

Raises a FatalErrorException in case of error.

Implements Arcane::IMeshChecker.

Definition at line 613 of file DynamicMeshChecker.cc.

References ARCANE_FATAL, Arcane::IVariable::checkIfSync(), Arcane::IK_Cell, Arcane::IK_DoF, Arcane::IK_Edge, Arcane::IK_Face, Arcane::IK_Node, Arcane::IK_Particle, Arcane::IK_Unknown, and Arcane::IVariable::itemKind().

Here is the call graph for this function:

◆ isCheckItemsOwner()

bool Arcane::mesh::DynamicMeshChecker::isCheckItemsOwner ( ) const
inlineoverridevirtual

Indicates whether entity owner verification is active (true by default).

Implements Arcane::IMeshChecker.

Definition at line 61 of file DynamicMeshChecker.h.

◆ mesh()

IMesh * Arcane::mesh::DynamicMeshChecker::mesh ( )
inlineoverridevirtual

Associated mesh.

Implements Arcane::IMeshChecker.

Definition at line 50 of file DynamicMeshChecker.h.

◆ setCheckLevel()

void Arcane::mesh::DynamicMeshChecker::setCheckLevel ( Integer level)
inlineoverridevirtual

Sets the mesh verification level.

0 - tests disabled 1 - partial tests, after endUpdate() 2 - full tests, after endUpdate()

Implements Arcane::IMeshChecker.

Definition at line 51 of file DynamicMeshChecker.h.

◆ setIsCheckItemsOwner()

void Arcane::mesh::DynamicMeshChecker::setIsCheckItemsOwner ( bool v)
inlineoverridevirtual

Indicates whether entity owner verification is active.

This verification is performed when calling checkValidConnectivity(). If it is active, we check that the nodes, edges, and faces have the same owner as one of the cells they are connected to.

This is always the case if the owners are managed by Arcane and it is therefore preferable to always perform this verification to ensure consistency of information in parallel. However, if the owner management is done by the user, it is possible to disable this verification.

Implements Arcane::IMeshChecker.

Definition at line 60 of file DynamicMeshChecker.h.

◆ updateAMRFaceOrientation() [1/2]

void Arcane::mesh::DynamicMeshChecker::updateAMRFaceOrientation ( )

Definition at line 390 of file DynamicMeshChecker.cc.

◆ updateAMRFaceOrientation() [2/2]

void Arcane::mesh::DynamicMeshChecker::updateAMRFaceOrientation ( ArrayView< Int64 > ghost_cell_to_refine)

Definition at line 415 of file DynamicMeshChecker.cc.

Member Data Documentation

◆ m_check_level

Integer Arcane::mesh::DynamicMeshChecker::m_check_level = 0
private

Definition at line 81 of file DynamicMeshChecker.h.

◆ m_compare_reference_file

bool Arcane::mesh::DynamicMeshChecker::m_compare_reference_file = false
private

Definition at line 86 of file DynamicMeshChecker.h.

◆ m_is_check_items_owner

bool Arcane::mesh::DynamicMeshChecker::m_is_check_items_owner = true
private

Definition at line 87 of file DynamicMeshChecker.h.

◆ m_mesh

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

Definition at line 80 of file DynamicMeshChecker.h.

◆ m_var_cells_faces

VariableCellArrayInt64* Arcane::mesh::DynamicMeshChecker::m_var_cells_faces = nullptr
private

Definition at line 83 of file DynamicMeshChecker.h.

◆ m_var_cells_nodes

VariableCellArrayInt64* Arcane::mesh::DynamicMeshChecker::m_var_cells_nodes = nullptr
private

Definition at line 84 of file DynamicMeshChecker.h.


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