Arcane  4.2.1.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::MeshCutService Class Reference

Service allowing the creation of a mesh with a cut of another mesh. More...

Inheritance diagram for Arcane::MeshCutService:
Collaboration diagram for Arcane::MeshCutService:

Public Member Functions

 MeshCutService (const ServiceBuildInfo &sbi)
void addPlane (const Real3 &p0, const Real3 &normal) override
 Method allowing to add a plane to the cut service. The use of these planes depends on the service.
void setVariables (VariableCollection variables) override
 Method allowing to add a set of variables to copy on the new mesh.
void setServiceMeshUniqueId (Int32 unique_id) override
 Method allowing to set a unique id allowing to create multiple section services for a mesh.
VariableCollection variables () override
 Method allowing to get a set of variables copied on the new mesh.
void updateSection () override
 Method allowing to update the mesh section with all planes.
MeshHandle meshSection () override
 Méthod allowing to get the mesh section.
Public Member Functions inherited from Arcane::ArcaneMeshCutObject
 ArcaneMeshCutObject (const Arcane::ServiceBuildInfo &sbi)
 Constructeur.
virtual ~ArcaneMeshCutObject ()
 Destructeur.
CaseOptionsMeshCutoptions () const
 Options du jeu de données du service.
Public Member Functions inherited from Arcane::BasicService
 ~BasicService () override
 Releases resources.
virtual ISubDomainsubDomain ()
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.
Public Member Functions inherited from Arcane::MeshAccessor
 MeshAccessor (ISubDomain *sd)
 MeshAccessor (IMesh *mesh)
 MeshAccessor (const MeshHandle &mesh_handle)
Integer nbCell () const
 Returns the number of cells in the mesh.
Integer nbFace () const
 Returns the number of faces in the mesh.
Integer nbEdge () const
 Returns the number of edges in the mesh.
Integer nbNode () const
 Returns the number of nodes in the mesh.
VariableNodeReal3nodesCoordinates () const
 Returns the coordinates of the mesh nodes.
NodeGroup allNodes () const
 Returns the group containing all nodes.
EdgeGroup allEdges () const
 Returns the group containing all edges.
FaceGroup allFaces () const
 Returns the group containing all faces.
CellGroup allCells () const
 Returns the group containing all cells.
FaceGroup outerFaces () const
 Returns the group containing all boundary faces.
NodeGroup ownNodes () const
 Returns the group containing all nodes specific to this domain.
CellGroup ownCells () const
 Returns the group containing all cells specific to this domain.
FaceGroup ownFaces () const
 Group containing all faces specific to this domain.
EdgeGroup ownEdges () const
 Group containing all edges specific to this domain.
IMeshmesh () const
const MeshHandlemeshHandle () const
Public Member Functions inherited from Arcane::CommonVariables
 CommonVariables (IModule *c)
 Constructs the references of the common variables for the module c.
 CommonVariables (IVariableMng *variable_mng)
 Constructs the references of the common variables for the manager variable_mng.
 CommonVariables (ISubDomain *sd)
 Constructs the references of the common variables for the subdomain sd.
virtual ~CommonVariables ()
 Releases resources.
Int32 globalIteration () const
 Current iteration number.
Real globalTime () const
 Current time.
Real globalOldTime () const
 Previous current time.
Real globalFinalTime () const
 Final time of the simulation.
Real globalDeltaT () const
 Current Delta T.
Real globalCPUTime () const
 CPU time used (in seconds).
Real globalOldCPUTime () const
 Previous CPU time used (in seconds).
Real globalElapsedTime () const
 Clock time (elapsed) used (in seconds).
Real globalOldElapsedTime () const
 Previous clock time (elapsed) used (in seconds).
Public Member Functions inherited from Arcane::IMeshSection
virtual ~IMeshSection ()=default
 Releases resources.

Private Member Functions

void _createMesh ()
void _createNodesAndCells (Int32 plan_pos, Int32 &sd_nb_node, UniqueArray< NodeIntersection > &new_nodes, Int32 ajust_node_pos, Int32 &sd_nb_cell, UniqueArray< Int64 > &new_cells, Int32 &sd_nb_face, UniqueArray< FaceLite > &new_faces)
void _makeUniqueCellUID (Int32 sd_nb_cell, UniqueArray< Int64 > &new_cells, UniqueArray< NodeIntersection > &new_nodes)
void _fillNodeUID (Int32 &sd_nb_node, UniqueArray< NodeIntersection > &new_nodes)
Int32 _makeUniqueNodeUID (Int32 sd_nb_node, UniqueArray< NodeIntersection > &new_nodes)
void _fillFaceUID (Int32 &sd_nb_face, UniqueArray< FaceLite > &new_faces)
Int32 _makeUniqueFaceUID (Int32 sd_nb_face, UniqueArray< FaceLite > &new_faces)
void _compute ()
std::optional< Int64_find (Span< FaceLite > new_faces, Int64 node_uid0, Int64 node_uid1)
void _addFaces (UniqueArray< FaceLite > &new_faces) const
void _addCells (UniqueArray< Int64 > &new_cells)
void _setCoordNodesAndOwner (UniqueArray< NodeIntersection > &new_nodes)
void _setFacesOwner (UniqueArray< FaceLite > &new_faces)

Private Attributes

eServiceType m_creation_type
IPrimaryMeshm_cloned_mesh = nullptr
UniqueArray< std::pair< Real3, Real3 > > m_plans
Int32 m_mesh_uid = -1

Additional Inherited Members

Static Public Member Functions inherited from Arcane::ArcaneMeshCutObject
template<typename ServiceClassType>
static void fillServiceInfo (Arcane::ServiceInfo *si)
Public Attributes inherited from Arcane::CommonVariables
VariableScalarInt32 m_global_iteration
 Current iteration.
VariableScalarReal m_global_time
 Current time.
VariableScalarReal m_global_deltat
 Global Delta T.
VariableScalarReal m_global_old_time
 Time previous to the current time.
VariableScalarReal m_global_old_deltat
 Delta T at the time previous to the global time.
VariableScalarReal m_global_final_time
 Final time of the case.
VariableScalarReal m_global_old_cpu_time
 Previous CPU time used (in seconds).
VariableScalarReal m_global_cpu_time
 CPU time used (in seconds).
VariableScalarReal m_global_old_elapsed_time
 Previous clock time used (in seconds).
VariableScalarReal m_global_elapsed_time
 Clock time used (in seconds).
Protected Member Functions inherited from Arcane::BasicService
 BasicService (const ServiceBuildInfo &)
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

Service allowing the creation of a mesh with a cut of another mesh.

For each plan, a cut will be realized. All cuts will be stored in the mesh created by this service. To get this mesh, you can call meshSection() method.

Definition at line 221 of file MeshCutService.cc.

Constructor & Destructor Documentation

◆ MeshCutService()

Arcane::MeshCutService::MeshCutService ( const ServiceBuildInfo & sbi)
inlineexplicit

Definition at line 226 of file MeshCutService.cc.

Member Function Documentation

◆ _addCells()

void Arcane::MeshCutService::_addCells ( UniqueArray< Int64 > & new_cells)
private

Definition at line 2017 of file MeshCutService.cc.

◆ _addFaces()

void Arcane::MeshCutService::_addFaces ( UniqueArray< FaceLite > & new_faces) const
private

Definition at line 1995 of file MeshCutService.cc.

◆ _compute()

void Arcane::MeshCutService::_compute ( )
private

Definition at line 1856 of file MeshCutService.cc.

◆ _createMesh()

void Arcane::MeshCutService::_createMesh ( )
private

Definition at line 329 of file MeshCutService.cc.

◆ _createNodesAndCells()

void Arcane::MeshCutService::_createNodesAndCells ( Int32 plan_pos,
Int32 & sd_nb_node,
UniqueArray< NodeIntersection > & new_nodes,
Int32 ajust_node_pos,
Int32 & sd_nb_cell,
UniqueArray< Int64 > & new_cells,
Int32 & sd_nb_face,
UniqueArray< FaceLite > & new_faces )
private

Definition at line 376 of file MeshCutService.cc.

◆ _fillFaceUID()

void Arcane::MeshCutService::_fillFaceUID ( Int32 & sd_nb_face,
UniqueArray< FaceLite > & new_faces )
private

Definition at line 1433 of file MeshCutService.cc.

◆ _fillNodeUID()

void Arcane::MeshCutService::_fillNodeUID ( Int32 & sd_nb_node,
UniqueArray< NodeIntersection > & new_nodes )
private

Definition at line 744 of file MeshCutService.cc.

◆ _find()

std::optional< Int64 > Arcane::MeshCutService::_find ( Span< FaceLite > new_faces,
Int64 node_uid0,
Int64 node_uid1 )
private

Definition at line 1981 of file MeshCutService.cc.

◆ _makeUniqueCellUID()

void Arcane::MeshCutService::_makeUniqueCellUID ( Int32 sd_nb_cell,
UniqueArray< Int64 > & new_cells,
UniqueArray< NodeIntersection > & new_nodes )
private

Definition at line 710 of file MeshCutService.cc.

◆ _makeUniqueFaceUID()

Int32 Arcane::MeshCutService::_makeUniqueFaceUID ( Int32 sd_nb_face,
UniqueArray< FaceLite > & new_faces )
private

Definition at line 1830 of file MeshCutService.cc.

◆ _makeUniqueNodeUID()

Int32 Arcane::MeshCutService::_makeUniqueNodeUID ( Int32 sd_nb_node,
UniqueArray< NodeIntersection > & new_nodes )
private

Definition at line 1407 of file MeshCutService.cc.

◆ _setCoordNodesAndOwner()

void Arcane::MeshCutService::_setCoordNodesAndOwner ( UniqueArray< NodeIntersection > & new_nodes)
private

Definition at line 2048 of file MeshCutService.cc.

◆ _setFacesOwner()

void Arcane::MeshCutService::_setFacesOwner ( UniqueArray< FaceLite > & new_faces)
private

Definition at line 2067 of file MeshCutService.cc.

◆ addPlane()

void Arcane::MeshCutService::addPlane ( const Real3 & p0,
const Real3 & normal )
overridevirtual

Method allowing to add a plane to the cut service. The use of these planes depends on the service.

Parameters
p0Point of the plane.
normalNormal of the plane.

Implements Arcane::IMeshSection.

Definition at line 287 of file MeshCutService.cc.

References Arcane::math::normalizeReal3().

Here is the call graph for this function:

◆ meshSection()

MeshHandle Arcane::MeshCutService::meshSection ( )
inlineoverridevirtual

Méthod allowing to get the mesh section.

Returns
The mesh section.

Implements Arcane::IMeshSection.

Definition at line 243 of file MeshCutService.cc.

◆ setServiceMeshUniqueId()

void Arcane::MeshCutService::setServiceMeshUniqueId ( Int32 unique_id)
overridevirtual

Method allowing to set a unique id allowing to create multiple section services for a mesh.

Parameters
unique_idMesh unique id to apply.

Implements Arcane::IMeshSection.

Definition at line 307 of file MeshCutService.cc.

◆ setVariables()

void Arcane::MeshCutService::setVariables ( VariableCollection variables)
overridevirtual

Method allowing to add a set of variables to copy on the new mesh.

Parameters
variablesA set of variable on the original mesh.

Implements Arcane::IMeshSection.

Definition at line 296 of file MeshCutService.cc.

References variables().

Here is the call graph for this function:

◆ updateSection()

void Arcane::MeshCutService::updateSection ( )
overridevirtual

Method allowing to update the mesh section with all planes.

If a previous call has edited the mesh, all the cells will be destroyed before update.

Implements Arcane::IMeshSection.

Definition at line 316 of file MeshCutService.cc.

References ARCANE_FATAL.

◆ variables()

VariableCollection Arcane::MeshCutService::variables ( )
inlineoverridevirtual

Method allowing to get a set of variables copied on the new mesh.

Returns
A set of variables on the cloned mesh.

Implements Arcane::IMeshSection.

Definition at line 239 of file MeshCutService.cc.

Referenced by setVariables().

Here is the caller graph for this function:

Member Data Documentation

◆ m_cloned_mesh

IPrimaryMesh* Arcane::MeshCutService::m_cloned_mesh = nullptr
private

Definition at line 271 of file MeshCutService.cc.

◆ m_creation_type

eServiceType Arcane::MeshCutService::m_creation_type
private

Definition at line 269 of file MeshCutService.cc.

◆ m_mesh_uid

Int32 Arcane::MeshCutService::m_mesh_uid = -1
private

Definition at line 273 of file MeshCutService.cc.

◆ m_plans

UniqueArray<std::pair<Real3, Real3> > Arcane::MeshCutService::m_plans
private

Definition at line 272 of file MeshCutService.cc.


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