OGS
|
Definition at line 33 of file GocadSGridReader.h.
#include <GocadSGridReader.h>
Public Member Functions | |
GocadSGridReader (std::string const &fname) | |
~GocadSGridReader () | |
GocadSGridReader ()=delete | |
GocadSGridReader (GocadSGridReader &&src)=delete | |
GocadSGridReader (GocadSGridReader const &src)=delete | |
GocadSGridReader & | operator= (GocadSGridReader &&rhs)=delete |
GocadSGridReader & | operator= (GocadSGridReader const &rhs)=delete |
std::unique_ptr< MeshLib::Mesh > | getMesh () const |
std::unique_ptr< MeshLib::Mesh > | getFaceSetMesh (std::size_t const face_set_number) const |
std::vector< std::string > | getPropertyNames () const |
Private Types | |
using | Bitset = boost::dynamic_bitset<> |
Private Member Functions | |
void | parseDims (std::string const &line) |
void | parseFileName (std::string const &line, std::string &result_string) const |
void | parseHeader (std::istream &in) |
void | parseFaceSet (std::string &line, std::istream &in) |
void | readNodesBinary () |
std::vector< Bitset > | readRegionFlagsBinary () const |
void | readElementPropertiesBinary () |
void | mapRegionFlagsToCellProperties (std::vector< Bitset > const &rf) |
std::vector< MeshLib::Element * > | createElements (std::vector< MeshLib::Node * > const &nodes) const |
void | readSplitInformation () |
void | applySplitInformation (std::vector< MeshLib::Node * > &nodes, std::vector< MeshLib::Element * > const &elements) const |
void | addFaceSetQuad (GocadNode *face_set_node, std::size_t face_set_number, std::vector< MeshLib::Node * > &face_set_nodes, std::vector< MeshLib::Element * > &face_set_elements) const |
Gocad::Property const * | getProperty (std::string const &name) const |
void | addGocadPropertiesToMesh (MeshLib::Mesh &mesh) const |
Static Private Member Functions | |
static void | modifyElement (MeshLib::Element const *hex, MeshLib::Node const *node2sub, MeshLib::Node *substitute_node) |
Private Attributes | |
std::string const & | _fname |
std::string const | _path |
Gocad::IndexCalculator | _index_calculator |
Gocad::CoordinateSystem | _coordinate_system |
std::string | _pnts_fname |
std::string | _flags_fname |
std::string | _region_flags_fname |
std::vector< Gocad::Region > | regions |
std::vector< Gocad::Layer > | layers |
std::size_t | _n_face_sets |
bool | _double_precision_binary |
bool | _bin_pnts_in_double_precision |
std::vector< GocadNode * > | _nodes |
std::vector< GocadSplitNode * > | _split_nodes |
std::vector< Gocad::Property > | _property_meta_data_vecs |
|
private |
Definition at line 56 of file GocadSGridReader.h.
|
explicit |
Constructor takes as argument the Gocad .sg text file.
fname | file name |
Definition at line 31 of file GocadSGridReader.cpp.
References _bin_pnts_in_double_precision, _coordinate_system, _flags_fname, _fname, _path, _pnts_fname, _property_meta_data_vecs, _region_flags_fname, DBUG(), ERR(), layers, mapRegionFlagsToCellProperties(), FileIO::Gocad::CoordinateSystem::parse(), parseDims(), parseFaceSet(), parseFileName(), FileIO::Gocad::parseGocadPropertyMetaData(), parseHeader(), FileIO::Gocad::parseLayer(), FileIO::Gocad::parseRegion(), readElementPropertiesBinary(), readNodesBinary(), readRegionFlagsBinary(), readSplitInformation(), and regions.
FileIO::Gocad::GocadSGridReader::~GocadSGridReader | ( | ) |
Definition at line 167 of file GocadSGridReader.cpp.
References _nodes, and _split_nodes.
|
delete |
|
delete |
|
delete |
|
private |
Definition at line 796 of file GocadSGridReader.cpp.
References _index_calculator, _nodes, ERR(), FileIO::Gocad::IndexCalculator::getCoordsForID(), FileIO::Gocad::GocadNode::getFaceDirection(), MathLib::Point3dWithID::getID(), FileIO::Gocad::U, FileIO::Gocad::V, and FileIO::Gocad::W.
Referenced by getFaceSetMesh().
|
private |
Definition at line 199 of file GocadSGridReader.cpp.
References MeshLib::Cell, DBUG(), ERR(), MeshLib::getOrCreateMeshProperty(), getProperty(), and getPropertyNames().
Referenced by getMesh().
|
private |
Definition at line 639 of file GocadSGridReader.cpp.
References _index_calculator, _split_nodes, FileIO::Gocad::IndexCalculator::_x_dim, FileIO::Gocad::IndexCalculator::_y_dim, FileIO::Gocad::IndexCalculator::_z_dim, FileIO::Gocad::IndexCalculator::getCellIdx(), and modifyElement().
Referenced by getMesh().
|
private |
Definition at line 559 of file GocadSGridReader.cpp.
References _index_calculator, FileIO::Gocad::IndexCalculator::_n_cells, FileIO::Gocad::IndexCalculator::_x_dim, FileIO::Gocad::IndexCalculator::_y_dim, FileIO::Gocad::IndexCalculator::_z_dim, and FileIO::Gocad::IndexCalculator::getCellIdx().
Referenced by getMesh().
std::unique_ptr< MeshLib::Mesh > FileIO::Gocad::GocadSGridReader::getFaceSetMesh | ( | std::size_t const | face_set_number | ) | const |
Definition at line 758 of file GocadSGridReader.cpp.
References _nodes, _split_nodes, and addFaceSetQuad().
Referenced by FileIO::Gocad::generateFaceSets().
std::unique_ptr< MeshLib::Mesh > FileIO::Gocad::GocadSGridReader::getMesh | ( | ) | const |
Definition at line 179 of file GocadSGridReader.cpp.
References _fname, _nodes, addGocadPropertiesToMesh(), applySplitInformation(), createElements(), DBUG(), and BaseLib::extractBaseNameWithoutExtension().
Referenced by main().
|
private |
Definition at line 734 of file GocadSGridReader.cpp.
References _property_meta_data_vecs.
Referenced by addGocadPropertiesToMesh().
std::vector< std::string > FileIO::Gocad::GocadSGridReader::getPropertyNames | ( | ) | const |
Definition at line 748 of file GocadSGridReader.cpp.
References _property_meta_data_vecs.
Referenced by addGocadPropertiesToMesh().
|
private |
Definition at line 453 of file GocadSGridReader.cpp.
References _index_calculator, FileIO::Gocad::IndexCalculator::_n_cells, FileIO::Gocad::Property::_property_class_name, FileIO::Gocad::Property::_property_data, FileIO::Gocad::Property::_property_data_fname, FileIO::Gocad::Property::_property_data_type, FileIO::Gocad::Property::_property_id, _property_meta_data_vecs, FileIO::Gocad::Property::_property_name, FileIO::Gocad::Property::_property_no_data_value, FileIO::Gocad::Property::_property_unit, FileIO::Gocad::IndexCalculator::_x_dim, FileIO::Gocad::IndexCalculator::_y_dim, FileIO::Gocad::IndexCalculator::_z_dim, DBUG(), FileIO::Gocad::IndexCalculator::getCellIdx(), and regions.
Referenced by GocadSGridReader().
|
staticprivate |
Definition at line 717 of file GocadSGridReader.cpp.
References MeshLib::Element::getNodes().
Referenced by applySplitInformation().
|
delete |
|
delete |
|
private |
Definition at line 249 of file GocadSGridReader.cpp.
References _index_calculator, FileIO::Gocad::IndexCalculator::_n_cells, FileIO::Gocad::IndexCalculator::_n_nodes, and DBUG().
Referenced by GocadSGridReader().
|
private |
line | input/output |
in | input stream containing the face set |
Definition at line 289 of file GocadSGridReader.cpp.
References _index_calculator, FileIO::Gocad::IndexCalculator::_n_cells, _n_face_sets, FileIO::Gocad::IndexCalculator::_n_nodes, _nodes, FileIO::Gocad::Property::_property_class_name, FileIO::Gocad::Property::_property_data, FileIO::Gocad::Property::_property_data_fname, FileIO::Gocad::Property::_property_data_type, FileIO::Gocad::Property::_property_id, _property_meta_data_vecs, FileIO::Gocad::Property::_property_name, FileIO::Gocad::Property::_property_no_data_value, FileIO::Gocad::Property::_property_unit, _split_nodes, FileIO::Gocad::IndexCalculator::_x_dim, FileIO::Gocad::IndexCalculator::_y_dim, FileIO::Gocad::IndexCalculator::_z_dim, ERR(), FileIO::Gocad::IndexCalculator::getCellIdx(), and FileIO::Gocad::IndexCalculator::getCoordsForID().
Referenced by GocadSGridReader().
|
private |
Definition at line 275 of file GocadSGridReader.cpp.
References _path.
Referenced by GocadSGridReader().
|
private |
Definition at line 227 of file GocadSGridReader.cpp.
References _double_precision_binary, and DBUG().
Referenced by GocadSGridReader().
|
private |
Definition at line 499 of file GocadSGridReader.cpp.
References _index_calculator, FileIO::Gocad::IndexCalculator::_n_cells, _property_meta_data_vecs, DBUG(), ERR(), BaseLib::readBinaryVector< float >(), and WARN().
Referenced by GocadSGridReader().
|
private |
Definition at line 410 of file GocadSGridReader.cpp.
References _bin_pnts_in_double_precision, _index_calculator, FileIO::Gocad::IndexCalculator::_n_nodes, _nodes, _pnts_fname, ERR(), FileIO::Gocad::IndexCalculator::getCoordsForID(), BaseLib::readBinaryValue< double >(), BaseLib::readBinaryValue< float >(), and BaseLib::swapEndianness().
Referenced by GocadSGridReader().
|
private |
Definition at line 531 of file GocadSGridReader.cpp.
References _index_calculator, FileIO::Gocad::IndexCalculator::_n_nodes, _region_flags_fname, ERR(), FileIO::Gocad::readBits(), and regions.
Referenced by GocadSGridReader().
|
private |
Definition at line 590 of file GocadSGridReader.cpp.
References _fname, _nodes, _split_nodes, and ERR().
Referenced by GocadSGridReader().
|
private |
Definition at line 103 of file GocadSGridReader.h.
Referenced by GocadSGridReader(), and readNodesBinary().
|
private |
Definition at line 93 of file GocadSGridReader.h.
Referenced by GocadSGridReader().
|
private |
Definition at line 102 of file GocadSGridReader.h.
Referenced by parseHeader().
|
private |
Definition at line 95 of file GocadSGridReader.h.
Referenced by GocadSGridReader().
|
private |
Definition at line 89 of file GocadSGridReader.h.
Referenced by GocadSGridReader(), getMesh(), and readSplitInformation().
|
private |
Definition at line 92 of file GocadSGridReader.h.
Referenced by addFaceSetQuad(), applySplitInformation(), createElements(), mapRegionFlagsToCellProperties(), parseDims(), parseFaceSet(), readElementPropertiesBinary(), readNodesBinary(), and readRegionFlagsBinary().
|
private |
Definition at line 100 of file GocadSGridReader.h.
Referenced by parseFaceSet().
|
private |
Definition at line 106 of file GocadSGridReader.h.
Referenced by ~GocadSGridReader(), addFaceSetQuad(), getFaceSetMesh(), getMesh(), parseFaceSet(), readNodesBinary(), and readSplitInformation().
|
private |
Definition at line 90 of file GocadSGridReader.h.
Referenced by GocadSGridReader(), and parseFileName().
|
private |
Definition at line 94 of file GocadSGridReader.h.
Referenced by GocadSGridReader(), and readNodesBinary().
|
private |
Definition at line 109 of file GocadSGridReader.h.
Referenced by GocadSGridReader(), getProperty(), getPropertyNames(), mapRegionFlagsToCellProperties(), parseFaceSet(), and readElementPropertiesBinary().
|
private |
Definition at line 96 of file GocadSGridReader.h.
Referenced by GocadSGridReader(), and readRegionFlagsBinary().
|
private |
Definition at line 107 of file GocadSGridReader.h.
Referenced by ~GocadSGridReader(), applySplitInformation(), getFaceSetMesh(), parseFaceSet(), and readSplitInformation().
|
private |
Definition at line 99 of file GocadSGridReader.h.
Referenced by GocadSGridReader().
|
private |
Definition at line 98 of file GocadSGridReader.h.
Referenced by GocadSGridReader(), mapRegionFlagsToCellProperties(), and readRegionFlagsBinary().