OGS
|
Created on September 22, 2022, 12:29 PM
Definition in file PVTU2VTU.cpp.
#include <tclap/CmdLine.h>
#include <algorithm>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <filesystem>
#include <fstream>
#include <memory>
#include <numeric>
#include <range/v3/algorithm/copy.hpp>
#include <range/v3/algorithm/transform.hpp>
#include <string>
#include <unordered_set>
#include <vector>
#include "BaseLib/FileTools.h"
#include "BaseLib/MPI.h"
#include "BaseLib/RunTime.h"
#include "GeoLib/AABB.h"
#include "GeoLib/OctTree.h"
#include "InfoLib/GitInfo.h"
#include "MathLib/Point3d.h"
#include "MeshLib/Elements/Element.h"
#include "MeshLib/IO/VtkIO/VtuInterface.h"
#include "MeshLib/Location.h"
#include "MeshLib/Mesh.h"
#include "MeshLib/Node.h"
#include "MeshLib/Properties.h"
#include "MeshLib/Utils/IntegrationPointWriter.h"
#include "MeshLib/Utils/getOrCreateMeshProperty.h"
#include "MeshToolsLib/IntegrationPointDataTools.h"
Go to the source code of this file.
Classes | |
struct | MeshEntityMapInfo |
Functions | |
template<typename T > | |
bool | createPropertyVector (MeshLib::Mesh &merged_mesh, std::vector< std::unique_ptr< MeshLib::Mesh > > const &partitioned_meshes, MeshLib::PropertyVector< T > const *const pv, MeshLib::Properties const &properties, std::vector< MeshEntityMapInfo > const &merged_node_map, std::vector< MeshEntityMapInfo > const &merged_element_map) |
std::vector< std::string > | readVtuFileNames (std::string const &pvtu_file_name) |
std::tuple< std::vector< MeshLib::Node * >, std::vector< std::size_t > > | getMergedNodesVector (std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes) |
std::tuple< std::vector< MeshLib::Element * >, std::vector< MeshEntityMapInfo > > | getRegularElements (std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes) |
MeshLib::Node * | getExistingNodeFromOctTree (GeoLib::OctTree< MeshLib::Node, 16 > &oct_tree, Eigen::Vector3d const &extent, MeshLib::Node const &node, std::size_t const element_id) |
void | resetNodesInRegularElements (std::vector< MeshLib::Element * > const ®ular_elements, GeoLib::OctTree< MeshLib::Node, 16 > &oct_tree, Eigen::Vector3d const &extent) |
std::pair< std::vector< MeshLib::Node * >, std::vector< MeshEntityMapInfo > > | makeNodesUnique (std::vector< MeshLib::Node * > const &all_merged_nodes_tmp, std::vector< std::size_t > const &partition_offsets, GeoLib::OctTree< MeshLib::Node, 16 > &oct_tree) |
int | main (int argc, char *argv[]) |
bool createPropertyVector | ( | MeshLib::Mesh & | merged_mesh, |
std::vector< std::unique_ptr< MeshLib::Mesh > > const & | partitioned_meshes, | ||
MeshLib::PropertyVector< T > const *const | pv, | ||
MeshLib::Properties const & | properties, | ||
std::vector< MeshEntityMapInfo > const & | merged_node_map, | ||
std::vector< MeshEntityMapInfo > const & | merged_element_map ) |
Definition at line 51 of file PVTU2VTU.cpp.
References MeshLib::Cell, MeshLib::Mesh::getElements(), MeshToolsLib::getIntegrationPointDataOffsetsOfMeshElements(), MeshLib::getIntegrationPointMetaData(), MeshLib::PropertyVectorBase::getMeshItemType(), MeshToolsLib::getNumberOfElementIntegrationPoints(), MeshLib::PropertyVectorBase::getNumberOfGlobalComponents(), MeshLib::getOrCreateMeshProperty(), MeshLib::PropertyVectorBase::getPropertyName(), MeshLib::IntegrationPoint, MeshLib::Node, and MeshLib::PropertyVector< PROP_VAL_TYPE >::size().
Referenced by main().
MeshLib::Node * getExistingNodeFromOctTree | ( | GeoLib::OctTree< MeshLib::Node, 16 > & | oct_tree, |
Eigen::Vector3d const & | extent, | ||
MeshLib::Node const & | node, | ||
std::size_t const | element_id ) |
Definition at line 283 of file PVTU2VTU.cpp.
References MathLib::Point3d::asEigenVector3d(), MathLib::Point3dWithID::getID(), GeoLib::OctTree< POINT, MAX_POINTS >::getPointsInRange(), and OGS_FATAL.
Referenced by resetNodesInRegularElements().
std::tuple< std::vector< MeshLib::Node * >, std::vector< std::size_t > > getMergedNodesVector | ( | std::vector< std::unique_ptr< MeshLib::Mesh > > const & | meshes | ) |
Definition at line 227 of file PVTU2VTU.cpp.
References BaseLib::sizesToOffsets().
Referenced by main().
std::tuple< std::vector< MeshLib::Element * >, std::vector< MeshEntityMapInfo > > getRegularElements | ( | std::vector< std::unique_ptr< MeshLib::Mesh > > const & | meshes | ) |
Definition at line 246 of file PVTU2VTU.cpp.
References MeshLib::Properties::getPropertyVector().
Referenced by main().
int main | ( | int | argc, |
char * | argv[] ) |
Definition at line 368 of file PVTU2VTU.cpp.
References applyToPropertyVectors(), GeoLib::OctTree< POINT, MAX_POINTS >::createOctTree(), createPropertyVector(), BaseLib::RunTime::elapsed(), ERR(), MeshLib::Properties::existsPropertyVector(), BaseLib::getFileExtension(), GeoLib::AABB::getMaxPoint(), getMergedNodesVector(), GeoLib::AABB::getMinPoint(), getRegularElements(), INFO(), makeNodesUnique(), OGS_FATAL, GitInfoLib::GitInfo::ogs_version, MeshLib::IO::VtuInterface::readVTUFile(), readVtuFileNames(), resetNodesInRegularElements(), MeshLib::Mesh::shallowClean(), BaseLib::RunTime::start(), and MeshLib::IO::VtuInterface::writeToFile().
std::pair< std::vector< MeshLib::Node * >, std::vector< MeshEntityMapInfo > > makeNodesUnique | ( | std::vector< MeshLib::Node * > const & | all_merged_nodes_tmp, |
std::vector< std::size_t > const & | partition_offsets, | ||
GeoLib::OctTree< MeshLib::Node, 16 > & | oct_tree ) |
Definition at line 340 of file PVTU2VTU.cpp.
References GeoLib::OctTree< POINT, MAX_POINTS >::addPoint().
Referenced by main().
std::vector< std::string > readVtuFileNames | ( | std::string const & | pvtu_file_name | ) |
Definition at line 184 of file PVTU2VTU.cpp.
References BaseLib::extractPath(), BaseLib::joinPaths(), and OGS_FATAL.
Referenced by main().
void resetNodesInRegularElements | ( | std::vector< MeshLib::Element * > const & | regular_elements, |
GeoLib::OctTree< MeshLib::Node, 16 > & | oct_tree, | ||
Eigen::Vector3d const & | extent ) |
Definition at line 318 of file PVTU2VTU.cpp.
References GeoLib::OctTree< POINT, MAX_POINTS >::addPoint(), and getExistingNodeFromOctTree().
Referenced by main().