![]() |
OGS
|
Namespaces | |
Legacy | |
Classes | |
class | NodePartitionedMeshReader |
struct | PropertyVectorMetaData |
struct | PropertyVectorPartitionMetaData |
class | PVDFile |
class | VtuInterface |
Reads and writes VtkXMLUnstructuredGrid-files (vtu) to and from OGS data structures. This class is currently not inherited from Writer because VTK will implement writing to a string from 6.2 onwards. More... | |
struct | HdfData |
struct | MeshHdfData |
class | HdfWriter |
struct | FileCommunicator |
struct | PartitionInfo |
struct | XdmfTopology |
struct | XdmfData |
struct | XdmfHdfData |
struct | TransformedMeshData |
struct | XdmfHdfMesh |
class | XdmfHdfWriter |
class | XdmfWriter |
Typedefs | |
using | Hdf5DimType = unsigned long long |
using | HDFAttributes = std::vector< HdfData > |
using | XdmfDimType = unsigned int |
Functions | |
void | writePropertyVectorMetaData (std::ostream &os, PropertyVectorMetaData const &pvmd) |
void | writePropertyVectorMetaData (PropertyVectorMetaData const &pvmd) |
std::optional< PropertyVectorMetaData > | readPropertyVectorMetaData (std::istream &is) |
void | writePropertyVectorPartitionMetaData (std::ostream &os, PropertyVectorPartitionMetaData const &pvpmd) |
std::optional< PropertyVectorPartitionMetaData > | readPropertyVectorPartitionMetaData (std::istream &is) |
MeshLib::Mesh * | readMeshFromFile (const std::string &file_name) |
std::string | getVtuFileNameForPetscOutputWithoutExtension (std::string const &file_name) |
int | writeVtu (MeshLib::Mesh const &mesh, std::string const &file_name, int const data_mode) |
int | writeMeshToFile (const MeshLib::Mesh &mesh, std::filesystem::path const &file_path, [[maybe_unused]] std::set< std::string > variable_output_names) |
int | writeMeshToFile (MeshLib::Mesh const &mesh, std::filesystem::path const &file_path, std::set< std::string > variable_output_names={}) |
int64_t | createFile (std::filesystem::path const &filepath, unsigned int n_files) |
int64_t | openHDF5File (std::filesystem::path const &filepath, unsigned int n_files) |
int64_t | createHDF5TransferPolicy () |
static hid_t | meshPropertyType2HdfType (MeshPropertyDataType const ogs_data_type) |
std::filesystem::path | partitionFilename (std::filesystem::path const &basic_filepath, int const file_group) |
int | getGroupIndex (int const input_index, int const input_size, int const new_group_size) |
FileCommunicator | getCommunicator (unsigned int const n_files) |
bool | isFileManager () |
PartitionInfo | getPartitionInfo (std::size_t const size, unsigned int const n_files) |
int64_t | openHDF5File (std::filesystem::path const &filepath) |
static constexpr auto | elemOGSTypeToXDMFType () |
constexpr auto | cellTypeOGS2XDMF (MeshLib::CellType const &cell_type) |
std::optional< XdmfHdfData > | transformAttribute (std::pair< std::string, PropertyVectorBase * > const &property_pair, unsigned int const n_files) |
std::vector< XdmfHdfData > | transformAttributes (MeshLib::Mesh const &mesh, unsigned int n_files) |
Create meta data for attributes used for hdf5 and xdmf. More... | |
std::vector< double > | transformToXDMFGeometry (MeshLib::Mesh const &mesh) |
Copies all node points into a new vector. Contiguous data used for writing. Conform with XDMF standard in https://xdmf.org/index.php/XDMF_Model_and_Format. More... | |
XdmfHdfData | transformGeometry (MeshLib::Mesh const &mesh, double const *data_ptr, unsigned int n_files) |
Create meta data for geometry used for hdf5 and xdmf. More... | |
std::vector< int > | transformToXDMFTopology (MeshLib::Mesh const &mesh, std::size_t const offset) |
Copies all cells into a new vector. Contiguous data used for writing. The topology is specific to xdmf because it contains the xdmf cell types!! See section topology in https://xdmf.org/index.php/XDMF_Model_and_Format. More... | |
XdmfHdfData | transformTopology (std::vector< int > const &values, unsigned int n_files) |
Create meta data for topology used for HDF5 and XDMF. More... | |
static std::string | meshItemTypeString (std::optional< MeshItemType > const &item_type) |
static auto | meshPropertyDatatypeString () |
static std::string | getPropertyDataTypeString (MeshPropertyDataType const &ogs_data_type) |
static constexpr auto | meshPropertyDatatypeSize () |
static std::string | getPropertyDataTypeSize (MeshPropertyDataType const &ogs_data_type) |
std::function< std::string(std::vector< double >)> | write_xdmf (XdmfData const &geometry, XdmfData const &topology, std::vector< XdmfData > const &constant_attributes, std::vector< XdmfData > const &variable_attributes, std::string const &h5filename, std::string const &ogs_version, std::string const &mesh_name) |
Generator function that creates a function capturing the spatial data of a mesh Temporal data can later be passed as argument. More... | |
Variables | |
constexpr auto | elem_type_ogs2xdmf = elemOGSTypeToXDMFType() |
constexpr char const * | mesh_item_type_strings [] |
auto | ogs_to_xdmf_type_fn = meshPropertyDatatypeSize() |
using MeshLib::IO::Hdf5DimType = typedef unsigned long long |
using MeshLib::IO::HDFAttributes = typedef std::vector<HdfData> |
Definition at line 25 of file HdfWriter.h.
using MeshLib::IO::XdmfDimType = typedef unsigned int |
Definition at line 27 of file XdmfData.h.
|
constexpr |
Definition at line 67 of file transformData.cpp.
References elem_type_ogs2xdmf, and BaseLib::to_underlying().
Referenced by transformToXDMFTopology().
int64_t MeshLib::IO::createFile | ( | std::filesystem::path const & | filepath, |
unsigned int | n_files | ||
) |
Definition at line 39 of file fileIO.cpp.
References getCommunicator(), and partitionFilename().
int64_t MeshLib::IO::createHDF5TransferPolicy | ( | ) |
|
staticconstexpr |
Definition at line 39 of file transformData.cpp.
References MeshLib::enum_length, MeshLib::HEX20, MeshLib::HEX27, MeshLib::HEX8, MeshLib::LINE2, MeshLib::LINE3, MeshLib::POINT1, MeshLib::PRISM15, MeshLib::PRISM18, MeshLib::PRISM6, MeshLib::PYRAMID13, MeshLib::PYRAMID5, MeshLib::QUAD4, MeshLib::QUAD8, MeshLib::QUAD9, MeshLib::TET10, MeshLib::TET4, BaseLib::to_underlying(), MeshLib::TRI3, and MeshLib::TRI6.
FileCommunicator MeshLib::IO::getCommunicator | ( | unsigned int const | n_files | ) |
Definition at line 43 of file getCommunicator.cpp.
References getGroupIndex().
Referenced by createFile(), getPartitionInfo(), and openHDF5File().
int MeshLib::IO::getGroupIndex | ( | int const | input_index, |
int const | input_size, | ||
int const | new_group_size | ||
) |
PartitionInfo MeshLib::IO::getPartitionInfo | ( | std::size_t const | size, |
unsigned int const | n_files | ||
) |
Definition at line 33 of file partition.cpp.
References getCommunicator(), and MeshLib::IO::FileCommunicator::mpi_communicator.
Referenced by MeshLib::IO::HdfData::HdfData().
|
static |
Definition at line 92 of file writeXdmf.cpp.
References BaseLib::format(), ogs_to_xdmf_type_fn, and BaseLib::to_underlying().
Referenced by write_xdmf().
|
static |
Definition at line 67 of file writeXdmf.cpp.
References meshPropertyDatatypeString(), and BaseLib::to_underlying().
Referenced by write_xdmf().
std::string MeshLib::IO::getVtuFileNameForPetscOutputWithoutExtension | ( | std::string const & | file_name | ) |
Definition at line 116 of file VtuInterface.cpp.
References BaseLib::extractBaseName(), BaseLib::extractPath(), BaseLib::getFileExtension(), BaseLib::joinPaths(), and OGS_FATAL.
Referenced by ApplicationsLib::TestDefinition::TestDefinition(), MeshLib::IO::PVDFile::addVTUFile(), and MeshLib::IO::VtuInterface::writeToFile().
bool MeshLib::IO::isFileManager | ( | ) |
Definition at line 26 of file partition.cpp.
Referenced by MeshLib::IO::XdmfHdfWriter::XdmfHdfWriter(), and MeshLib::IO::XdmfHdfWriter::writeStep().
|
static |
Definition at line 39 of file writeXdmf.cpp.
References mesh_item_type_strings, and OGS_FATAL.
Referenced by write_xdmf().
|
staticconstexpr |
Definition at line 74 of file writeXdmf.cpp.
References enum_length, float32, float64, int32, int64, int8, BaseLib::to_underlying(), uint32, uint64, and uint8.
|
static |
Definition at line 51 of file writeXdmf.cpp.
References enum_length, float32, float64, int32, int64, int8, BaseLib::to_underlying(), uint32, uint64, and uint8.
Referenced by getPropertyDataTypeString().
|
static |
int64_t MeshLib::IO::openHDF5File | ( | std::filesystem::path const & | filepath | ) |
Definition at line 25 of file fileIO.cpp.
hid_t MeshLib::IO::openHDF5File | ( | std::filesystem::path const & | filepath, |
unsigned int | n_files | ||
) |
Definition at line 57 of file fileIO.cpp.
References getCommunicator(), and MeshLib::IO::FileCommunicator::mpi_communicator.
std::filesystem::path MeshLib::IO::partitionFilename | ( | std::filesystem::path const & | basic_filepath, |
int const | file_group | ||
) |
MeshLib::Mesh * MeshLib::IO::readMeshFromFile | ( | const std::string & | file_name | ) |
Definition at line 68 of file readMeshFromFile.cpp.
References BaseLib::dropFileExtension(), MeshLib::IO::NodePartitionedMeshReader::read(), and anonymous_namespace{readMeshFromFile.cpp}::readMeshFromFileSerial().
Referenced by createGeometries(), FileIO::createSurface(), MainWindow::loadFile(), main(), MainWindow::mapGeometry(), anonymous_namespace{postLIE.cpp}::postVTU(), FileIO::XmlPrjInterface::readFile(), readMeshes(), and anonymous_namespace{ProjectData.cpp}::readSingleMesh().
|
inline |
Definition at line 81 of file PropertyVectorMetaData.h.
References MeshLib::IO::PropertyVectorMetaData::data_type_size_in_bytes, MeshLib::IO::PropertyVectorMetaData::is_data_type_signed, MeshLib::IO::PropertyVectorMetaData::is_int_type, MeshLib::IO::PropertyVectorMetaData::number_of_components, MeshLib::IO::PropertyVectorMetaData::number_of_tuples, and MeshLib::IO::PropertyVectorMetaData::property_name.
Referenced by MeshLib::IO::NodePartitionedMeshReader::readProperties().
|
inline |
Definition at line 136 of file PropertyVectorMetaData.h.
References MeshLib::IO::PropertyVectorPartitionMetaData::number_of_tuples, and MeshLib::IO::PropertyVectorPartitionMetaData::offset.
Referenced by MeshLib::IO::NodePartitionedMeshReader::readProperties().
std::optional<XdmfHdfData> MeshLib::IO::transformAttribute | ( | std::pair< std::string, PropertyVectorBase * > const & | property_pair, |
unsigned int const | n_files | ||
) |
Definition at line 72 of file transformData.cpp.
References float32, float64, MeshLib::PropertyVector< PROP_VAL_TYPE >::getNumberOfTuples(), int32, int8, MaterialPropertyLib::name, uint32, uint64, uint8, and unknown.
Referenced by transformAttributes().
std::vector< XdmfHdfData > MeshLib::IO::transformAttributes | ( | MeshLib::Mesh const & | mesh, |
unsigned int | n_files | ||
) |
Create meta data for attributes used for hdf5 and xdmf.
mesh | OGS mesh can be mesh or partitionedMesh |
n_files | specifies the number of files. If greater than 1 it groups the data of each process to n_files |
Definition at line 204 of file transformData.cpp.
References MeshLib::Mesh::getProperties(), MaterialPropertyLib::name, GitInfoLib::GitInfo::OGS_VERSION, transformAttribute(), and WARN().
Referenced by MeshLib::IO::XdmfHdfWriter::XdmfHdfWriter().
XdmfHdfData MeshLib::IO::transformGeometry | ( | MeshLib::Mesh const & | mesh, |
double const * | data_ptr, | ||
unsigned int | n_files | ||
) |
Create meta data for geometry used for hdf5 and xdmf.
mesh | OGS mesh can be mesh or partitionedMesh |
data_ptr | Memory location of geometry values. |
n_files | specifies the number of files. If greater than 1 it groups the data of each process to n_files |
Definition at line 248 of file transformData.cpp.
References float64, MeshLib::Mesh::getNodes(), and MaterialPropertyLib::name.
Referenced by MeshLib::IO::XdmfHdfWriter::XdmfHdfWriter().
XdmfHdfData MeshLib::IO::transformTopology | ( | std::vector< int > const & | values, |
unsigned int | n_files | ||
) |
Create meta data for topology used for HDF5 and XDMF.
values | actual topology values to get size and memory location |
n_files | specifies the number of files. If greater than 1 it groups the data of each process to n_files |
Definition at line 299 of file transformData.cpp.
References int32, and MaterialPropertyLib::name.
Referenced by MeshLib::IO::XdmfHdfWriter::XdmfHdfWriter().
std::vector< double > MeshLib::IO::transformToXDMFGeometry | ( | MeshLib::Mesh const & | mesh | ) |
Copies all node points into a new vector. Contiguous data used for writing. Conform with XDMF standard in https://xdmf.org/index.php/XDMF_Model_and_Format.
mesh | OGS mesh can be mesh or partitionedMesh |
Definition at line 232 of file transformData.cpp.
References MeshLib::Mesh::getNodes().
Referenced by MeshLib::IO::XdmfHdfWriter::XdmfHdfWriter().
std::vector< int > MeshLib::IO::transformToXDMFTopology | ( | MeshLib::Mesh const & | mesh, |
std::size_t const | offset | ||
) |
Copies all cells into a new vector. Contiguous data used for writing. The topology is specific to xdmf because it contains the xdmf cell types!! See section topology in https://xdmf.org/index.php/XDMF_Model_and_Format.
mesh | OGS mesh can be mesh or partitionedMesh |
offset | Local offset to transform local to global cell ID. Offset must be zero in serial and must be defined for each process in parallel execution. |
Definition at line 272 of file transformData.cpp.
References cellTypeOGS2XDMF(), MeshLib::Mesh::getElements(), MathLib::Point3dWithID::getID(), MeshLib::LINE2, and MeshLib::LINE3.
Referenced by MeshLib::IO::XdmfHdfWriter::XdmfHdfWriter().
std::function< std::string(std::vector< double >)> MeshLib::IO::write_xdmf | ( | XdmfData const & | geometry, |
XdmfData const & | topology, | ||
std::vector< XdmfData > const & | constant_attributes, | ||
std::vector< XdmfData > const & | variable_attributes, | ||
std::string const & | h5filename, | ||
std::string const & | ogs_version, | ||
std::string const & | mesh_name | ||
) |
Generator function that creates a function capturing the spatial data of a mesh Temporal data can later be passed as argument.
geometry | Metadata for the geometry (points) of the mesh |
topology | Metadata for the topology of the mesh |
variable_attributes | Meta data for attributes changing over time |
constant_attributes | Meta data for attributes NOT changing over time |
h5filename | Name of the file where the actual data was written |
ogs_version | OGS Version to be added to XdmfInformation tag |
mesh_name | Name of the output mesh |
Definition at line 100 of file writeXdmf.cpp.
References MeshLib::IO::XdmfData::attribute_center, BaseLib::format(), getPropertyDataTypeSize(), getPropertyDataTypeString(), MeshLib::IO::XdmfData::global_block_dims, meshItemTypeString(), MeshLib::IO::XdmfData::name, and GitInfoLib::GitInfo::ogs_version.
Referenced by MeshLib::IO::XdmfHdfWriter::XdmfHdfWriter().
int MeshLib::IO::writeMeshToFile | ( | const MeshLib::Mesh & | mesh, |
std::filesystem::path const & | file_path, | ||
[[maybe_unused] ] std::set< std::string > | variable_output_names | ||
) |
Definition at line 24 of file writeMeshToFile.cpp.
References ERR(), MeshLib::IO::Legacy::MeshIO::setMesh(), BaseLib::IO::writeStringToFile(), MeshLib::IO::VtuInterface::writeToFile(), and BaseLib::IO::Writer::writeToString().
Referenced by FileIO::Gocad::generateFaceSets(), identifyAndWriteBoundaryMeshes(), main(), anonymous_namespace{postLIE.cpp}::postVTU(), and FileIO::XmlPrjInterface::write().
int MeshLib::IO::writeMeshToFile | ( | MeshLib::Mesh const & | mesh, |
std::filesystem::path const & | file_path, | ||
std::set< std::string > | variable_output_names = {} |
||
) |
|
inline |
Definition at line 70 of file PropertyVectorMetaData.h.
References MeshLib::IO::PropertyVectorMetaData::data_type_size_in_bytes, DBUG(), MeshLib::IO::PropertyVectorMetaData::is_data_type_signed, MeshLib::IO::PropertyVectorMetaData::is_int_type, MeshLib::IO::PropertyVectorMetaData::number_of_components, MeshLib::IO::PropertyVectorMetaData::number_of_tuples, and MeshLib::IO::PropertyVectorMetaData::property_name.
|
inline |
Definition at line 43 of file PropertyVectorMetaData.h.
References MeshLib::IO::PropertyVectorMetaData::property_name.
Referenced by MeshLib::IO::NodePartitionedMeshReader::readProperties(), and ApplicationUtils::writePropertyVector().
|
inline |
Definition at line 122 of file PropertyVectorMetaData.h.
Referenced by ApplicationUtils::writeProperties().
int MeshLib::IO::writeVtu | ( | MeshLib::Mesh const & | mesh, |
std::string const & | file_name, | ||
int const | data_mode | ||
) |
Definition at line 154 of file VtuInterface.cpp.
References ERR(), and MeshLib::IO::VtuInterface::writeToFile().
Referenced by main().
|
constexpr |
Definition at line 65 of file transformData.cpp.
Referenced by cellTypeOGS2XDMF().
|
constexpr |
Definition at line 35 of file writeXdmf.cpp.
Referenced by meshItemTypeString().
|
inline |
Definition at line 89 of file writeXdmf.cpp.
Referenced by getPropertyDataTypeSize().