![]() |
v0.16.3 |
Interface for load MED files. More...
#include "src/interfaces/MedInterface.hpp"
Classes | |
| struct | FieldData |
Public Member Functions | |
| MoFEMErrorCode | query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const |
| MedInterface (const MoFEM::Core &core) | |
| MoFEMErrorCode | getFileNameFromCommandLine (int verb=1) |
| Get MED file name from command line. | |
| PetscBool | getFlgFile () const |
| Check if file name is given in command line. | |
| MoFEMErrorCode | medGetFieldNames (const string &file, int verb=1) |
| Get field names in MED file. | |
| MoFEMErrorCode | medGetFieldNames (int verb=1) |
| get field names in MED file | |
| MoFEMErrorCode | readMed (const string &file, int verb=1) |
| read MED file | |
| MoFEMErrorCode | readMed (int verb=1) |
| read MED file | |
| MoFEMErrorCode | writeMed (boost::shared_ptr< Range > range_ptr=nullptr, int verb=1) |
| write MED file | |
| MoFEMErrorCode | getMeshsets (boost::shared_ptr< std::vector< const CubitMeshSets * > > &meshsets_ptr) |
| MoFEMErrorCode | writeMed (const string &file, boost::shared_ptr< std::vector< const CubitMeshSets * > > meshsets_ptr, boost::shared_ptr< Range > range_ptr=nullptr, int verb=1) |
| write MED file | |
| MoFEMErrorCode | readFields (const std::string &file_name, const std::string &field_name, const bool load_series=false, const int only_step=-1, int verb=1) |
Public Member Functions inherited from MoFEM::UnknownInterface | |
| template<class IFACE > | |
| MoFEMErrorCode | registerInterface (bool error_if_registration_failed=true) |
| Register interface. | |
| template<class IFACE > | |
| MoFEMErrorCode | getInterface (IFACE *&iface) const |
| Get interface reference to pointer of interface. | |
| template<class IFACE > | |
| MoFEMErrorCode | getInterface (IFACE **const iface) const |
| Get interface pointer to pointer of interface. | |
| template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0> | |
| IFACE | getInterface () const |
| Get interface pointer to pointer of interface. | |
| template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0> | |
| IFACE | getInterface () const |
| Get reference to interface. | |
| template<class IFACE > | |
| IFACE * | getInterface () const |
| Function returning pointer to interface. | |
| virtual | ~UnknownInterface ()=default |
Public Attributes | |
| std::vector< std::string > | meshNames |
| list of meshes in MED file | |
| std::vector< EntityHandle > | meshMeshsets |
| meshset for each mesh | |
| std::map< std::string, FieldData > | fieldNames |
| std::string | medFileName |
| MED file name. | |
Private Member Functions | |
| MoFEMErrorCode | readMesh (const string &file, const int index, std::map< int, Range > &family_elem_map, int verb=1) |
| read mesh from MED file | |
| MoFEMErrorCode | readFamily (const string &file, const int index, const std::map< int, Range > &family_elem_mapint, std::map< string, Range > &group_elem_map, int verb=1) |
| read family and groups | |
| MoFEMErrorCode | makeBlockSets (const std::map< string, Range > &group_elem_map, int verb=1) |
| make from groups meshsets | |
Private Attributes | |
| MoFEM::Core & | cOre |
| core database | |
| PetscBool | flgFile |
| true if file name given in command line | |
| CubitMeshSet_multiIndex | cubitMeshsets |
| cubit meshsets | |
Additional Inherited Members | |
Static Public Member Functions inherited from MoFEM::UnknownInterface | |
| static MoFEMErrorCode | getLibVersion (Version &version) |
| Get library version. | |
| static MoFEMErrorCode | getFileVersion (moab::Interface &moab, Version &version) |
| Get database major version. | |
| static MoFEMErrorCode | setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD)) |
| Get database major version. | |
| static MoFEMErrorCode | getInterfaceVersion (Version &version) |
| Get database major version. | |
Interface for load MED files.
Definition at line 23 of file MedInterface.hpp.
| MoFEM::MedInterface::MedInterface | ( | const MoFEM::Core & | core | ) |
Definition at line 53 of file MedInterface.cpp.
| MoFEMErrorCode MoFEM::MedInterface::getFileNameFromCommandLine | ( | int | verb = 1 | ) |
Get MED file name from command line.
| verb | verbosity level |
Definition at line 67 of file MedInterface.cpp.
|
inline |
| MoFEMErrorCode MoFEM::MedInterface::getMeshsets | ( | boost::shared_ptr< std::vector< const CubitMeshSets * > > & | meshsets_ptr | ) |
Retrieves the meshsets
| meshsets_ptr | A pointer to a vector of const CubitMeshSets objects. If provided, the retrieved meshsets will be stored in this vector. |
Definition at line 801 of file MedInterface.cpp.
|
private |
make from groups meshsets
| group_elem_map | map of groups and elements |
| verb | verbosity level |
Definition at line 756 of file MedInterface.cpp.
| MoFEMErrorCode MoFEM::MedInterface::medGetFieldNames | ( | const string & | file, |
| int | verb = 1 |
||
| ) |
Get field names in MED file.
| file | file name |
| verb | verbosity level |
Definition at line 84 of file MedInterface.cpp.
| MoFEMErrorCode MoFEM::MedInterface::medGetFieldNames | ( | int | verb = 1 | ) |
get field names in MED file
File name is get form command line
| verb | verbosity level |
Definition at line 138 of file MedInterface.cpp.
|
virtual |
Implements MoFEM::UnknownInterface.
Definition at line 47 of file MedInterface.cpp.
|
private |
read family and groups
| file | file name |
| index | mesh index |
| family_elem_mapint | map of families and elements |
| group_elem_map | map of groups and elements |
| verb | verbosity level |
Definition at line 664 of file MedInterface.cpp.
| MoFEMErrorCode MoFEM::MedInterface::readFields | ( | const std::string & | file_name, |
| const std::string & | field_name, | ||
| const bool | load_series = false, |
||
| const int | only_step = -1, |
||
| int | verb = 1 |
||
| ) |
Read fields
| file_name | file name |
| file_index | mesh index |
| loadSeries | load field into series |
| onlyStep | read only one step |
Definition at line 1170 of file MedInterface.cpp.
| MoFEMErrorCode MoFEM::MedInterface::readMed | ( | const string & | file, |
| int | verb = 1 |
||
| ) |
read MED file
Vertex GLOBAL_ID is the MED node number: the number stored in the file, or the node's position 1..N when the file stores none. A mesh read into a database that already has vertices, such as the second mesh of a file, is offset past the largest vertex ID, so IDs stay unique.
Elements use stored MED cell numbers, or generated consecutive numbers when absent. IDs are positive, below INT_MAX and unique within each dimension. A batch whose numbers collide with existing elements is offset past the largest existing ID; non-colliding MED numbers are kept.
| file | field name |
| verb | verbosity level |
Definition at line 147 of file MedInterface.cpp.
| MoFEMErrorCode MoFEM::MedInterface::readMed | ( | int | verb = 1 | ) |
read MED file
File name is form command line ////
| verb | verbosity level |
Definition at line 792 of file MedInterface.cpp.
|
private |
read mesh from MED file
| file | file name |
| index | index of mesh |
| family_elem_map | map of families and elements |
| verb | verbosity level |
Definition at line 392 of file MedInterface.cpp.
| MoFEMErrorCode MoFEM::MedInterface::writeMed | ( | boost::shared_ptr< Range > | range_ptr = nullptr, |
| int | verb = 1 |
||
| ) |
write MED file
File name is form command line
| verb | verbosity level |
Definition at line 824 of file MedInterface.cpp.
| MoFEMErrorCode MoFEM::MedInterface::writeMed | ( | const string & | file, |
| boost::shared_ptr< std::vector< const CubitMeshSets * > > | meshsets_ptr, | ||
| boost::shared_ptr< Range > | range_ptr = nullptr, |
||
| int | verb = 1 |
||
| ) |
write MED file
The MED node numbers are the vertices' GLOBAL_ID when every written vertex has a distinct positive one, else their positions 1..N.
| file | file name |
| meshsets_ptr | meshsets |
| verb | verbosity level |
Definition at line 839 of file MedInterface.cpp.
|
private |
core database
Definition at line 151 of file MedInterface.hpp.
|
private |
cubit meshsets
Definition at line 155 of file MedInterface.hpp.
| std::map<std::string, FieldData> MoFEM::MedInterface::fieldNames |
Definition at line 147 of file MedInterface.hpp.
|
private |
true if file name given in command line
Definition at line 153 of file MedInterface.hpp.
| std::string MoFEM::MedInterface::medFileName |
MED file name.
Definition at line 148 of file MedInterface.hpp.
| std::vector<EntityHandle> MoFEM::MedInterface::meshMeshsets |
meshset for each mesh
Definition at line 146 of file MedInterface.hpp.
| std::vector<std::string> MoFEM::MedInterface::meshNames |
list of meshes in MED file
Definition at line 145 of file MedInterface.hpp.