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

Arcane Service for meshing the dataset. More...

Inheritance diagram for Arcane::ArcaneBasicMeshSubdividerService:
Collaboration diagram for Arcane::ArcaneBasicMeshSubdividerService:

Public Member Functions

 ArcaneBasicMeshSubdividerService (const ServiceBuildInfo &sbi)
void subdivideMesh (IPrimaryMesh *mesh) override
 Refines the mesh by nb-subdivision.
Public Member Functions inherited from Arcane::ArcaneArcaneBasicMeshSubdividerServiceObject
 ArcaneArcaneBasicMeshSubdividerServiceObject (const Arcane::ServiceBuildInfo &sbi)
 Constructeur.
virtual ~ArcaneArcaneBasicMeshSubdividerServiceObject ()
 Destructeur.
CaseOptionsArcaneBasicMeshSubdividerServiceoptions () const
 Options du jeu de données du service.
Public Member Functions inherited from Arcane::AbstractService
 ~AbstractService () override
 Destructor.
virtual void build ()
 Build-level construction of the service.
IServiceInfoserviceInfo () const override
 Access to service information. See IServiceInfo for details.
IBaseserviceParent () const override
 Access to the base interface of main Arcane objects.
IServiceserviceInterface () override
 Returns the low-level IService interface of the service.
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::IService
virtual ~IService ()
 Releases resources.

Private Member Functions

void _init ()
void _faceOrderArcane (IPrimaryMesh *mesh)
 Generates the arcane face order for all patterns.
void _refineWithArcaneFaces (IPrimaryMesh *mesh, MeshSubdivider::Pattern p)
 Refines using arcane faces and the pattern (Pattern) p.
void _generateOneTri (IPrimaryMesh *mesh)
 Generates a triangle.
void _generateOneQuad (IPrimaryMesh *mesh)
 Generates a quadrilateral.
void _generateOneTetra (IPrimaryMesh *mesh)
 Generates a tetrahedron.
void _generateOneHexa (IPrimaryMesh *mesh)
 Generates a hexahedron.
void _refineOnce (IPrimaryMesh *mesh, std::unordered_map< Arccore::Int16, MeshSubdivider::Pattern > &pattern_manager)
 Refines the mesh once with the patterns present in the pattern_manager.
void _getArcaneOrder (IPrimaryMesh *mesh)
 Method to get how new faces are created for an element. Useful for filling the child faces array in the PatternBuilder.
void _generatePattern2D (IPrimaryMesh *mesh)
 Method to obtain the vtk files for the different patterns available in 2D.
void _generatePattern3D (IPrimaryMesh *mesh)
 Method to obtain the vtk files for the different patterns available in 3D.
void _generatePattern (IPrimaryMesh *mesh)
 Method to generate patterns on a single base element.
void _checkMeshUid (IPrimaryMesh *mesh)
 Verification that all uids are >= 0.
void _renumberNodesFaces (IPrimaryMesh *mesh)
 Renumbers nodes and faces based on cells This method does not compact, meaning For now, the variables are not necessarily sequential How do we recompact? => Sort and renumber by incrementing. Not sure if this is reproducible.
void _applyFamilyRenumbering (IItemFamily *family, VariableItemInt64 &items_new_uid)
 Renumbers the family TODO share with AMR.
void _checkHashNodesFacesCells (IPrimaryMesh *mesh)
 Calculates the hash of N F C.

Static Private Member Functions

static UniqueArray< Int64_computeNodeUid (UniqueArray< Int64 > nodes_uid, const StorageRefine &node_pattern)
 Calculates the unique ID based on node_uid.

Additional Inherited Members

Static Public Member Functions inherited from Arcane::ArcaneArcaneBasicMeshSubdividerServiceObject
template<typename ServiceClassType>
static void fillServiceInfo (Arcane::ServiceInfo *si)
Protected Member Functions inherited from Arcane::AbstractService
 AbstractService (const ServiceBuildInfo &)
 Constructor from a ServiceBuildInfo.
Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const
Protected Member Functions inherited from Arcane::IService
 IService ()
 Constructor.

Detailed Description

Arcane Service for meshing the dataset.

Definition at line 833 of file ArcaneBasicMeshSubdividerService.cc.

Constructor & Destructor Documentation

◆ ArcaneBasicMeshSubdividerService()

Arcane::ArcaneBasicMeshSubdividerService::ArcaneBasicMeshSubdividerService ( const ServiceBuildInfo & sbi)
explicit

Definition at line 2066 of file ArcaneBasicMeshSubdividerService.cc.

Member Function Documentation

◆ _applyFamilyRenumbering()

void Arcane::ArcaneBasicMeshSubdividerService::_applyFamilyRenumbering ( IItemFamily * family,
VariableItemInt64 & items_new_uid )
private

Renumbers the family TODO share with AMR.

Definition at line 2230 of file ArcaneBasicMeshSubdividerService.cc.

References Arcane::IItemFamily::allItems(), ENUMERATE_, Arcane::TraceAccessor::info(), Arcane::Item::mutableItemBase(), Arcane::IItemFamily::name(), Arcane::IItemFamily::notifyItemsUniqueIdChanged(), and Arcane::Item::uniqueId().

Referenced by _renumberNodesFaces().

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

◆ _checkHashNodesFacesCells()

void Arcane::ArcaneBasicMeshSubdividerService::_checkHashNodesFacesCells ( IPrimaryMesh * mesh)
private

Calculates the hash of N F C.

Definition at line 2324 of file ArcaneBasicMeshSubdividerService.cc.

◆ _checkMeshUid()

void Arcane::ArcaneBasicMeshSubdividerService::_checkMeshUid ( IPrimaryMesh * mesh)
private

Verification that all uids are >= 0.

Definition at line 927 of file ArcaneBasicMeshSubdividerService.cc.

References ENUMERATE_CELL, ENUMERATE_EDGE, ENUMERATE_FACE, ENUMERATE_NODE, Arcane::IVariable::fullName(), Arcane::TraceAccessor::info(), Arcane::IVariable::isUsed(), Arcane::IVariable::itemFamilyName(), Arcane::String::null(), Arcane::IVariable::PNoDump, Arcane::IVariable::property(), and Arcane::Item::uniqueId().

Here is the call graph for this function:

◆ _computeNodeUid()

UniqueArray< Int64 > Arcane::ArcaneBasicMeshSubdividerService::_computeNodeUid ( UniqueArray< Int64 > nodes_uid,
const StorageRefine & node_pattern )
staticprivate

Calculates the unique ID based on node_uid.

Definition at line 2043 of file ArcaneBasicMeshSubdividerService.cc.

References Arcane::Array< T >::add(), Arcane::Array< T >::begin(), Arcane::Array< T >::end(), Arcane::Array< T >::resize(), and Arcane::AbstractArray< T >::size().

Referenced by _refineWithArcaneFaces().

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

◆ _faceOrderArcane()

void Arcane::ArcaneBasicMeshSubdividerService::_faceOrderArcane ( IPrimaryMesh * mesh)
private

Generates the arcane face order for all patterns.

Definition at line 2209 of file ArcaneBasicMeshSubdividerService.cc.

References Arcane::Array< T >::add(), ENUMERATE_CELL, Arcane::Cell::faces(), and Arcane::TraceAccessor::info().

Here is the call graph for this function:

◆ _generateOneHexa()

void Arcane::ArcaneBasicMeshSubdividerService::_generateOneHexa ( IPrimaryMesh * mesh)
private

Generates a hexahedron.

Definition at line 2075 of file ArcaneBasicMeshSubdividerService.cc.

References Arcane::Array< T >::add(), Arcane::IMeshModifier::addCells(), Arcane::IMeshModifier::addNodes(), Arcane::IMeshModifier::endUpdate(), ENUMERATE_CELL, ENUMERATE_FACE, Arcane::TraceAccessor::info(), Arcane::IMeshModifier::removeCells(), Arcane::AbstractArray< T >::size(), Arcane::Item::uniqueId(), and Arcane::Array< T >::view().

Referenced by _generatePattern3D().

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

◆ _generateOneQuad()

void Arcane::ArcaneBasicMeshSubdividerService::_generateOneQuad ( IPrimaryMesh * mesh)
private

Generates a quadrilateral.

Definition at line 1949 of file ArcaneBasicMeshSubdividerService.cc.

References Arcane::IMeshModifier::addCells(), Arcane::IMeshModifier::addNodes(), Arcane::IMeshModifier::endUpdate(), ENUMERATE_CELL, Arcane::TraceAccessor::info(), Arcane::IMeshModifier::removeCells(), Arcane::AbstractArray< T >::size(), and Arcane::Array< T >::view().

Referenced by _generatePattern2D().

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

◆ _generateOneTetra()

void Arcane::ArcaneBasicMeshSubdividerService::_generateOneTetra ( IPrimaryMesh * mesh)
private

Generates a tetrahedron.

Definition at line 2139 of file ArcaneBasicMeshSubdividerService.cc.

References Arcane::Array< T >::add(), Arcane::IMeshModifier::addCells(), Arcane::IMeshModifier::addNodes(), Arcane::IMeshModifier::endUpdate(), ENUMERATE_CELL, ENUMERATE_FACE, Arcane::TraceAccessor::info(), Arcane::IMeshModifier::removeCells(), Arcane::AbstractArray< T >::size(), Arcane::Item::uniqueId(), and Arcane::Array< T >::view().

Referenced by _generatePattern3D().

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

◆ _generateOneTri()

void Arcane::ArcaneBasicMeshSubdividerService::_generateOneTri ( IPrimaryMesh * mesh)
private

Generates a triangle.

Definition at line 1998 of file ArcaneBasicMeshSubdividerService.cc.

References Arcane::IMeshModifier::addCells(), Arcane::IMeshModifier::addNodes(), Arcane::IMeshModifier::endUpdate(), ENUMERATE_CELL, Arcane::TraceAccessor::info(), Arcane::IMeshModifier::removeCells(), Arcane::AbstractArray< T >::size(), and Arcane::Array< T >::view().

Referenced by _generatePattern2D().

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

◆ _generatePattern()

void Arcane::ArcaneBasicMeshSubdividerService::_generatePattern ( IPrimaryMesh * mesh)
private

Method to generate patterns on a single base element.

Definition at line 991 of file ArcaneBasicMeshSubdividerService.cc.

References _generatePattern2D(), and _generatePattern3D().

Here is the call graph for this function:

◆ _generatePattern2D()

void Arcane::ArcaneBasicMeshSubdividerService::_generatePattern2D ( IPrimaryMesh * mesh)
private

Method to obtain the vtk files for the different patterns available in 2D.

Definition at line 1005 of file ArcaneBasicMeshSubdividerService.cc.

References _generateOneQuad(), _generateOneTri(), and _refineOnce().

Referenced by _generatePattern().

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

◆ _generatePattern3D()

void Arcane::ArcaneBasicMeshSubdividerService::_generatePattern3D ( IPrimaryMesh * mesh)
private

Method to obtain the vtk files for the different patterns available in 3D.

Definition at line 1039 of file ArcaneBasicMeshSubdividerService.cc.

References _generateOneHexa(), _generateOneTetra(), and _refineOnce().

Referenced by _generatePattern().

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

◆ _refineOnce()

void Arcane::ArcaneBasicMeshSubdividerService::_refineOnce ( IPrimaryMesh * mesh,
std::unordered_map< Arccore::Int16, MeshSubdivider::Pattern > & pattern_manager )
private

Refines the mesh once with the patterns present in the pattern_manager.

Definition at line 1171 of file ArcaneBasicMeshSubdividerService.cc.

References Arcane::Array< T >::add(), Arcane::ItemGroup::addItems(), Arcane::Array< T >::addRange(), ARCANE_FATAL, Arcane::PrivateVariableScalarT< DataType >::arraySize(), Arcane::Array< T >::begin(), Arcane::ItemConnectedListViewT< ItemType, Extent >::begin(), Arcane::IGhostLayerMng::builderVersion(), Arcane::Face::cell(), Arcane::Node::cell(), Arcane::MeshSubdivider::Pattern::cell_type, Arcane::Face::cells(), Arcane::MeshSubdivider::Pattern::cells, Arcane::Node::cells(), Arcane::Array< T >::constView(), Arcane::CollectionBase::count(), Arcane::TraceAccessor::debug(), Arcane::Array< T >::end(), Arcane::ItemConnectedListViewT< ItemType, Extent >::end(), ENUMERATE_, ENUMERATE_CELL, Arcane::Cell::face(), Arcane::MeshSubdivider::Pattern::face_type, Arcane::MeshSubdivider::Pattern::faces, Arcane::ItemGroup::fullName(), Arcane::IItemFamily::groups(), Arcane::TraceAccessor::info(), Arcane::ItemGroup::isAllItems(), Arcane::ItemGroup::isOwn(), Arcane::Item::itemTypeId(), Arcane::Item::localId(), Arcane::Item::mutableItemBase(), Arcane::IGhostLayerMng::nbGhostLayer(), Arcane::IItemFamily::nbItem(), Arcane::ItemWithNodes::nbNode(), Arcane::ItemWithNodes::node(), Arcane::MeshSubdivider::Pattern::nodes, Arcane::ArcaneArcaneBasicMeshSubdividerServiceObject::options(), Arcane::Item::owner(), Arcane::MessagePassing::ReduceMax, Arcane::Array< T >::resize(), Arcane::IGhostLayerMng::setBuilderVersion(), Arcane::IMeshModifier::setDynamic(), Arcane::IGhostLayerMng::setNbGhostLayer(), Arcane::MutableItemBase::setOwner(), Arcane::AbstractArray< T >::size(), Arcane::Array< T >::subView(), Arcane::Item::type(), Arcane::Item::uniqueId(), Arcane::IMeshModifier::updateGhostLayers(), and Arcane::Array< T >::view().

Referenced by _generatePattern2D(), _generatePattern3D(), and subdivideMesh().

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

◆ _refineWithArcaneFaces()

◆ _renumberNodesFaces()

void Arcane::ArcaneBasicMeshSubdividerService::_renumberNodesFaces ( IPrimaryMesh * mesh)
private

Renumbers nodes and faces based on cells This method does not compact, meaning For now, the variables are not necessarily sequential How do we recompact? => Sort and renumber by incrementing. Not sure if this is reproducible.

Renumbers Nodes and Faces based on cells Warning: no guarantee of no holes in the new numbering

Definition at line 2256 of file ArcaneBasicMeshSubdividerService.cc.

References _applyFamilyRenumbering(), Arcane::Face::cells(), Arcane::Node::cells(), ENUMERATE_CELL, ENUMERATE_FACE, ENUMERATE_NODE, Arcane::Cell::faces(), Arcane::Cell::nbFace(), Arcane::ItemWithNodes::nbNode(), Arcane::ItemWithNodes::nodes(), and Arcane::Item::uniqueId().

Referenced by subdivideMesh().

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

◆ subdivideMesh()

void Arcane::ArcaneBasicMeshSubdividerService::subdivideMesh ( IPrimaryMesh * mesh)
overridevirtual

Refines the mesh by nb-subdivision.

Implements Arcane::IMeshSubdivider.

Definition at line 2338 of file ArcaneBasicMeshSubdividerService.cc.

References _refineOnce(), _renumberNodesFaces(), Arcane::TraceAccessor::debug(), Arcane::ITraceMng::info(), Arcane::TraceAccessor::info(), Arcane::Timer::name(), Arcane::ArcaneArcaneBasicMeshSubdividerServiceObject::options(), Arcane::Timer::start(), Arcane::Timer::stop(), Arcane::Timer::TimerReal, Arcane::Timer::totalTime(), and Arcane::TraceAccessor::traceMng().

Here is the call graph for this function:

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