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

Reader for IFP internal Voronoi mesh files. More...

Inheritance diagram for Arcane::VoronoiMeshIOService:
Collaboration diagram for Arcane::VoronoiMeshIOService:

Public Member Functions

 VoronoiMeshIOService (const ServiceBuildInfo &sbi)
virtual void build ()
 Build-level construction of the service.
virtual bool allowExtension (const String &str)
 Checks if the service supports files with the extension str.
virtual eReturnType readMeshFromFile (IPrimaryMesh *mesh, const XmlNode &mesh_node, const String &file_name, const String &dir_name, bool use_internal_partition)
virtual bool hasCutInfos () const
virtual ConstArrayView< IntegercommunicatingSubDomains () const
Public Member Functions inherited from Arcane::BasicService
 ~BasicService () override
 Releases resources.
virtual ISubDomainsubDomain ()
Public Member Functions inherited from Arcane::AbstractService
 ~AbstractService () override
 Destructor.
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::IMeshReader
virtual ~IMeshReader ()=default
 Frees resources.

Private Member Functions

bool _readMesh (IPrimaryMesh *mesh, const String &file_name, const String &dir_name, bool use_internal_partition)
bool _readHybridGrid (IPrimaryMesh *mesh, VoronoiFile &voronoi_file, bool use_internal_partition)
void _readCellVariable (IMesh *mesh, VoronoiFile &voronoi_file, const String &name_str, Integer nb_cell)
void _readItemGroup (IMesh *mesh, VoronoiFile &voronoi_file, const String &name_str, Integer nb_item, eItemKind ik, ConstArrayView< Integer > local_ids)
void _createFaceGroup (IMesh *mesh, const String &name, ConstArrayView< Integer > faces_lid)
bool _readData (IMesh *mesh, VoronoiFile &voronoi_file, bool use_internal_partition, eItemKind cell_kind, ConstArrayView< Integer > local_ids)
void _readNodesHybridGrid (IMesh *mesh, VoronoiFile &voronoi_file, Array< Real3 > &node_coords)
 Reading of nodes and their coordinates.
void _readCellsHybridGrid (IMesh *mesh, VoronoiFile &voronoi_file, Array< Integer > &cells_nb_node, Array< Integer > &cells_type, Array< Int64 > &cells_connectivity, Integer &mesh_dimension)
 Reading of cells and their connectivity.
void _readFacesMesh (IMesh *mesh, const String &file_name, const String &dir_name, bool use_internal_partition)

Private Attributes

UniqueArray< VariableCellReal3 * > m_variables
 Table of variables created locally by reading the mesh.

Additional Inherited Members

Public Types inherited from Arcane::IMeshReader
enum  eReturnType { RTOk , RTError , RTIrrelevant }
 Types of return codes for a read or write operation. More...
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

Reader for IFP internal Voronoi mesh files.

This is a preliminary version pending a unified IFP format, the reader and writer have only been partially tested.

It is possible to specify a set of variables in the file. In this case, their values are read at the same time as the mesh and are used to initialize the variables.

Definition at line 70 of file VoronoiMeshIOService.cc.

Constructor & Destructor Documentation

◆ VoronoiMeshIOService()

Arcane::VoronoiMeshIOService::VoronoiMeshIOService ( const ServiceBuildInfo & sbi)

Definition at line 223 of file VoronoiMeshIOService.cc.

◆ ~VoronoiMeshIOService()

Arcane::VoronoiMeshIOService::~VoronoiMeshIOService ( )

Definition at line 232 of file VoronoiMeshIOService.cc.

Member Function Documentation

◆ _readCellsHybridGrid()

void Arcane::VoronoiMeshIOService::_readCellsHybridGrid ( IMesh * mesh,
VoronoiFile & voronoi_file,
Array< Integer > & cells_nb_node,
Array< Integer > & cells_type,
Array< Int64 > & cells_connectivity,
Integer & mesh_dimension )
private

Reading of cells and their connectivity.

It fills cells_nb_node, cells_type, and cells_connectivity.

Definition at line 335 of file VoronoiMeshIOService.cc.

References Arcane::TraceAccessor::fatal(), Arcane::ItemTypeMng::nbBasicItemType(), Arcane::ItemTypeMng::nbBuiltInItemType(), Arcane::ItemTypeInfo::nbLocalEdge(), Arcane::ItemTypeInfo::nbLocalFace(), Arcane::ItemTypeInfo::nbLocalNode(), Arcane::Array< T >::resize(), and Arcane::ItemTypeMng::typeFromId().

Here is the call graph for this function:

◆ _readCellVariable()

void Arcane::VoronoiMeshIOService::_readCellVariable ( IMesh * mesh,
VoronoiFile & voronoi_file,
const String & name_str,
Integer nb_cell )
private

Definition at line 506 of file VoronoiMeshIOService.cc.

◆ _readData()

bool Arcane::VoronoiMeshIOService::_readData ( IMesh * mesh,
VoronoiFile & voronoi_file,
bool use_internal_partition,
eItemKind cell_kind,
ConstArrayView< Integer > local_ids )
private

Definition at line 481 of file VoronoiMeshIOService.cc.

◆ _readHybridGrid()

bool Arcane::VoronoiMeshIOService::_readHybridGrid ( IPrimaryMesh * mesh,
VoronoiFile & voronoi_file,
bool use_internal_partition )
private

Definition at line 393 of file VoronoiMeshIOService.cc.

◆ _readItemGroup()

void Arcane::VoronoiMeshIOService::_readItemGroup ( IMesh * mesh,
VoronoiFile & voronoi_file,
const String & name_str,
Integer nb_item,
eItemKind ik,
ConstArrayView< Integer > local_ids )
private

Definition at line 527 of file VoronoiMeshIOService.cc.

◆ _readMesh()

bool Arcane::VoronoiMeshIOService::_readMesh ( IPrimaryMesh * mesh,
const String & file_name,
const String & dir_name,
bool use_internal_partition )
private

Definition at line 266 of file VoronoiMeshIOService.cc.

◆ _readNodesHybridGrid()

void Arcane::VoronoiMeshIOService::_readNodesHybridGrid ( IMesh * mesh,
VoronoiFile & voronoi_file,
Array< Real3 > & node_coords )
private

Reading of nodes and their coordinates.

Definition at line 294 of file VoronoiMeshIOService.cc.

References Arcane::TraceAccessor::info(), and Arcane::Array< T >::resize().

Here is the call graph for this function:

◆ allowExtension()

virtual bool Arcane::VoronoiMeshIOService::allowExtension ( const String & str)
inlinevirtual

Checks if the service supports files with the extension str.

Implements Arcane::IMeshReader.

Definition at line 86 of file VoronoiMeshIOService.cc.

◆ build()

virtual void Arcane::VoronoiMeshIOService::build ( void )
inlinevirtual

Build-level construction of the service.

This method is called right after the constructor.

Reimplemented from Arcane::AbstractService.

Definition at line 82 of file VoronoiMeshIOService.cc.

◆ communicatingSubDomains()

virtual ConstArrayView< Integer > Arcane::VoronoiMeshIOService::communicatingSubDomains ( ) const
inlinevirtual

Definition at line 97 of file VoronoiMeshIOService.cc.

◆ hasCutInfos()

virtual bool Arcane::VoronoiMeshIOService::hasCutInfos ( ) const
inlinevirtual

Definition at line 96 of file VoronoiMeshIOService.cc.

◆ readMeshFromFile()

IMeshReader::eReturnType Arcane::VoronoiMeshIOService::readMeshFromFile ( IPrimaryMesh * mesh,
const XmlNode & mesh_node,
const String & filename,
const String & dir_name,
bool use_internal_partition )
virtual
Todo
Verify crash under linux.

Implements Arcane::IMeshReader.

Definition at line 248 of file VoronoiMeshIOService.cc.

References Arcane::IMeshReader::RTError, and Arcane::IMeshReader::RTOk.

Member Data Documentation

◆ m_variables

UniqueArray<VariableCellReal3*> Arcane::VoronoiMeshIOService::m_variables
private

Table of variables created locally by reading the mesh.

Definition at line 121 of file VoronoiMeshIOService.cc.


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