OGS
|
Read FEFLOW model files (*.fem) into OGS data structure. Currently this class supports only import of mesh data and some geometry given in Supermesh section.
Definition at line 36 of file FEFLOWMeshInterface.h.
#include <FEFLOWMeshInterface.h>
Classes | |
struct | FEM_CLASS |
struct | FEM_DIM |
Public Member Functions | |
MeshLib::Mesh * | readFEFLOWFile (const std::string &filename) |
Private Member Functions | |
MeshLib::Element * | readElement (std::string const &line, std::vector< MeshLib::Node * > const &nodes) |
Read element type and node indices according to the element type. | |
MeshLib::Element * | readElement (const FEM_DIM &fem_dim, const MeshLib::MeshElemType elem_type, const std::string &line, const std::vector< MeshLib::Node * > &nodes) |
read node indices and create a mesh element | |
void | readNodeCoordinates (std::ifstream &in, std::vector< MeshLib::Node * > &nodes) |
read node coordinates given in the XYZCOOR section | |
void | readNodeCoordinates (std::ifstream &in, const FEM_CLASS &fem_class, const FEM_DIM &fem_dim, std::vector< MeshLib::Node * > const &nodes) |
read node coordinates | |
void | readElevation (std::ifstream &in, const FEM_CLASS &fem_class, const FEM_DIM &fem_dim, std::vector< MeshLib::Node * > &vec_nodes) |
read elevation data | |
std::vector< std::size_t > | getIndexList (const std::string &str_ranges) |
void | readELEMENTALSETS (std::ifstream &in, std::vector< std::vector< std::size_t > > &vec_elementsets) |
parse ELEMENTALSETS | |
void | setMaterialIDs (FEM_CLASS const &fem_class, FEM_DIM const &fem_dim, std::vector< GeoLib::Polyline * > const &lines, std::vector< std::vector< std::size_t > > const &vec_elementsets, std::vector< MeshLib::Element * > const &vec_elements, std::vector< int > &material_ids) |
|
private |
Definition at line 356 of file FEFLOWMeshInterface.cpp.
References BaseLib::replaceString(), BaseLib::splitString(), BaseLib::str2number(), and BaseLib::trim().
Referenced by readELEMENTALSETS(), and readElevation().
|
private |
read node indices and create a mesh element
Definition at line 555 of file FEFLOWMeshInterface.cpp.
References MeshLib::HEXAHEDRON, MeshLib::LINE, FileIO::FEFLOWMeshInterface::FEM_DIM::n_nodes_of_element, MeshLib::PRISM, MeshLib::QUAD, MeshLib::TETRAHEDRON, and MeshLib::TRIANGLE.
|
private |
Read element type and node indices according to the element type.
Definition at line 487 of file FEFLOWMeshInterface.cpp.
References MeshLib::HEXAHEDRON, MeshLib::PRISM, MeshLib::TETRAHEDRON, and WARN().
Referenced by readFEFLOWFile().
|
private |
parse ELEMENTALSETS
Definition at line 607 of file FEFLOWMeshInterface.cpp.
References ERR(), getIndexList(), INFO(), and BaseLib::trim().
Referenced by readFEFLOWFile().
|
private |
read elevation data
Definition at line 396 of file FEFLOWMeshInterface.cpp.
References getIndexList(), FileIO::FEFLOWMeshInterface::FEM_CLASS::n_layers3d, FileIO::FEFLOWMeshInterface::FEM_DIM::n_nodes, BaseLib::splitString(), BaseLib::str2number(), and BaseLib::trim().
Referenced by readFEFLOWFile().
MeshLib::Mesh * FileIO::FEFLOWMeshInterface::readFEFLOWFile | ( | const std::string & | filename | ) |
read a FEFLOW Model file (*.fem) in ASCII format (Version 5.4)
This function reads mesh data in addition to geometry data given in Supermesh.
filename | FEFLOW file name |
Definition at line 29 of file FEFLOWMeshInterface.cpp.
References MeshLib::Cell, FileIO::FEFLOWMeshInterface::FEM_CLASS::dimension, ERR(), BaseLib::extractBaseNameWithoutExtension(), MeshLib::HEXAHEDRON, INFO(), MeshLib::INVALID, MeshLib::LINE, FileIO::FEFLOWMeshInterface::FEM_DIM::n_elements, FileIO::FEFLOWMeshInterface::FEM_CLASS::n_layers3d, FileIO::FEFLOWMeshInterface::FEM_DIM::n_nodes, FileIO::FEFLOWMeshInterface::FEM_DIM::n_nodes_of_element, FileIO::FEFLOWMeshInterface::FEM_CLASS::orientation, MeshLib::PRISM, FileIO::FEFLOWMeshInterface::FEM_CLASS::problem_class, MeshLib::QUAD, readElement(), readELEMENTALSETS(), readElevation(), readNodeCoordinates(), FileIO::FEFLOWGeoInterface::readSuperMesh(), setMaterialIDs(), MeshLib::TETRAHEDRON, FileIO::FEFLOWMeshInterface::FEM_CLASS::time_mode, MeshLib::TRIANGLE, and WARN().
Referenced by MainWindow::loadFile(), and main().
|
private |
read node coordinates
Definition at line 306 of file FEFLOWMeshInterface.cpp.
References FileIO::FEFLOWMeshInterface::FEM_CLASS::dimension, FileIO::FEFLOWMeshInterface::FEM_CLASS::n_layers3d, and FileIO::FEFLOWMeshInterface::FEM_DIM::n_nodes.
|
private |
read node coordinates given in the XYZCOOR section
Definition at line 261 of file FEFLOWMeshInterface.cpp.
References ERR().
Referenced by readFEFLOWFile().
|
private |
Definition at line 704 of file FEFLOWMeshInterface.cpp.
References MeshLib::getCenterOfGravity(), MeshLib::Element::getNumberOfBaseNodes(), GeoLib::Polyline::isClosed(), GeoLib::Polygon::isPntInPolygon(), FileIO::FEFLOWMeshInterface::FEM_CLASS::n_layers3d, and FileIO::FEFLOWMeshInterface::FEM_DIM::n_nodes.
Referenced by readFEFLOWFile().