Writing mesh files in msh format. More...
Classes | |
| class | ArcaneToMshTypeInfo |
| Information mapping between MSH type and Arcane type. More... | |
| class | ItemFamilyWriteInfo |
| struct | PhysicalTagInfo |
| struct | EntityInfo |
| class | ItemGroupWriteInfo |
Public Member Functions | |
| MshMeshWriter (IMesh *mesh) | |
| void | writeMesh (const String &file_name) |
| Writes in MSH V4 format. | |
| Public Member Functions inherited from Arcane::TraceAccessor | |
| TraceAccessor (ITraceMng *m) | |
| Constructs an accessor via the trace manager m. | |
| TraceAccessor (const TraceAccessor &rhs) | |
| Copy constructor. | |
| TraceAccessor & | operator= (const TraceAccessor &rhs) |
| Copy assignment operator. | |
| virtual | ~TraceAccessor () |
| Frees resources. | |
| ITraceMng * | traceMng () 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 Types | |
| using | MshPeriodicOneInfo = impl::MshMeshGenerationInfo::MshPeriodicOneInfo |
Private Member Functions | |
| bool | _writeMeshToFileV4 (IMesh *mesh, const String &file_name) |
| std::pair< Int64, Int64 > | _getFamilyMinMaxUniqueId (IItemFamily *family) |
| void | _addGroupsToProcess (IItemFamily *family, Array< ItemGroup > &items_groups) |
| Determines the list of groups to process for a family. | |
| void | _writeEntities (std::ostream &ofile) |
| Writes the block containing the entities ($Entities). | |
| void | _writeNodes (std::ostream &ofile) |
| Writes the block containing the nodes ($Nodes). | |
| void | _writeElements (std::ostream &ofile, Int64 total_nb_cell) |
| Writes the block containing the elements ($Elements). | |
| void | _writePeriodic (std::ostream &ofile) |
| void | _initTypes () |
| void | _addArcaneTypeInfo (ItemTypeId arcane_type, Int32 msh_type, ConstArrayView< Int16 > reorder_infos={}) |
| const ArcaneToMshTypeInfo & | arcaneToMshTypeInfo (ItemTypeId arcane_type) const |
Private Attributes | |
| IMesh * | m_mesh = nullptr |
| ItemTypeMng * | m_item_type_mng = nullptr |
| UniqueArray< PhysicalTagInfo > | m_physical_tags |
| FixedArray< Int32, 4 > | m_nb_entities_by_dim |
| std::vector< std::unique_ptr< ItemGroupWriteInfo > > | m_groups_write_info_list |
| List of information to write for each group. | |
| impl::MshMeshGenerationInfo * | m_mesh_info = nullptr |
| bool | m_has_periodic_info = false |
| UniqueArray< ArcaneToMshTypeInfo > | m_arcane_to_msh_type_infos |
| Information on conversion between Arcane and MSH types for entities. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Writing mesh files in msh format.
Definition at line 44 of file MshMeshWriter.cc.
|
private |
Definition at line 47 of file MshMeshWriter.cc.
|
explicit |
Definition at line 183 of file MshMeshWriter.cc.
|
private |
Definition at line 738 of file MshMeshWriter.cc.
|
private |
Determines the list of groups to process for a family.
The list of groups to save will be added to items_groups.
Definition at line 270 of file MshMeshWriter.cc.
References Arcane::Array< T >::add(), Arcane::IItemFamily::allItems(), Arcane::IItemFamily::groups(), Arcane::IK_Cell, Arcane::TraceAccessor::info(), and Arcane::IItemFamily::itemKind().
Referenced by writeMesh().
|
private |
Definition at line 685 of file MshMeshWriter.cc.
|
private |
Definition at line 704 of file MshMeshWriter.cc.
|
private |
Writes the block containing the elements ($Elements).
Definition at line 548 of file MshMeshWriter.cc.
References Arcane::ConstArrayView< T >::empty(), ENUMERATE_, Arcane::TraceAccessor::info(), Arcane::ItemGroup::itemFamily(), m_groups_write_info_list, Arcane::IItemFamily::name(), Arcane::ItemTypeInfo::nbLocalNode(), Arcane::ItemWithNodes::node(), Arcane::ConstArrayView< T >::size(), Arcane::ItemTypeInfo::typeName(), Arcane::Item::uniqueId(), and Arcane::IItemFamily::view().
Referenced by writeMesh().
|
private |
Writes the block containing the entities ($Entities).
Definition at line 404 of file MshMeshWriter.cc.
References ENUMERATE_, m_groups_write_info_list, Arcane::math::max(), Arcane::math::min(), Arcane::Real3POD::x, Arcane::Real3POD::y, and Arcane::Real3POD::z.
Referenced by writeMesh().
|
private |
Writes the block containing the nodes ($Nodes).
Definition at line 495 of file MshMeshWriter.cc.
References ENUMERATE_, Arcane::Real3POD::x, Arcane::Real3POD::y, and Arcane::Real3POD::z.
Referenced by writeMesh().
|
private |
Definition at line 610 of file MshMeshWriter.cc.
|
private |
Definition at line 751 of file MshMeshWriter.cc.
| void Arcane::MshMeshWriter::writeMesh | ( | const String & | file_name | ) |
Writes in MSH V4 format.
| mesh | Input mesh |
| file_name | Output file name |
| true | if any error is detected |
| false | otherwise |
Definition at line 304 of file MshMeshWriter.cc.
References _addGroupsToProcess(), _writeElements(), _writeEntities(), _writeNodes(), ARCANE_THROW, Arcane::String::endsWith(), Arcane::TraceAccessor::info(), Arcane::String::localstr(), and m_groups_write_info_list.
Referenced by Arcane::MshMeshWriterService::writeMeshToFile().
|
private |
Information on conversion between Arcane and MSH types for entities.
Definition at line 164 of file MshMeshWriter.cc.
|
private |
List of information to write for each group.
Definition at line 158 of file MshMeshWriter.cc.
Referenced by _writeElements(), _writeEntities(), and writeMesh().
|
private |
Definition at line 161 of file MshMeshWriter.cc.
|
private |
Definition at line 149 of file MshMeshWriter.cc.
|
private |
Definition at line 148 of file MshMeshWriter.cc.
|
private |
Definition at line 160 of file MshMeshWriter.cc.
|
private |
Definition at line 155 of file MshMeshWriter.cc.
|
private |
Definition at line 152 of file MshMeshWriter.cc.