![]() |
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 <range/v3/numeric/accumulate.hpp>#include <range/v3/range/conversion.hpp>#include <range/v3/view/filter.hpp>#include <string>#include <unordered_set>#include <vector>#include "BaseLib/FileTools.h"#include "BaseLib/Logging.h"#include "BaseLib/MPI.h"#include "BaseLib/RunTime.h"#include "BaseLib/TCLAPArguments.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/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) |
| std::unique_ptr< MeshLib::Mesh > | mergeSubdomainMeshes (std::vector< std::unique_ptr< MeshLib::Mesh > > const &meshes) |
| template<typename T > | |
| bool | transfer (MeshLib::Properties const &subdomain_properties, MeshLib::Mesh &original_mesh, MeshLib::PropertyVector< std::size_t > const &global_ids, std::string_view const property_name, MeshLib::MeshItemType const mesh_item_type) |
| void | transferPropertiesFromPartitionedMeshToUnpartitionedMesh (MeshLib::Mesh const &subdomain_mesh, MeshLib::Mesh &original_mesh, MeshLib::MeshItemType const mesh_item_type) |
| void | transferPropertiesFromPartitionedMeshToUnpartitionedMesh (MeshLib::Mesh const &subdomain_mesh, MeshLib::Mesh &original_mesh) |
| 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 55 of file PVTU2VTU.cpp.
References MeshLib::PropertyVector< T >::begin(), MeshLib::Cell, MeshLib::Mesh::getElements(), MeshToolsLib::getIntegrationPointDataOffsetsOfMeshElements(), MeshLib::getIntegrationPointMetaData(), MeshLib::getIntegrationPointMetaDataSingleField(), MeshLib::PropertyVectorBase::getMeshItemType(), MeshToolsLib::getNumberOfElementIntegrationPoints(), MeshLib::PropertyVectorBase::getNumberOfGlobalComponents(), MeshLib::getOrCreateMeshProperty(), MeshLib::PropertyVectorBase::getPropertyName(), MeshLib::IntegrationPoint, and MeshLib::Node.
Referenced by mergeSubdomainMeshes().
| 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 293 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 232 of file PVTU2VTU.cpp.
References BaseLib::sizesToOffsets().
Referenced by mergeSubdomainMeshes().
| std::tuple< std::vector< MeshLib::Element * >, std::vector< MeshEntityMapInfo > > getRegularElements | ( | std::vector< std::unique_ptr< MeshLib::Mesh > > const & | meshes | ) |
Definition at line 251 of file PVTU2VTU.cpp.
References MeshLib::Properties::getPropertyVector().
Referenced by mergeSubdomainMeshes().
| int main | ( | int | argc, |
| char * | argv[] ) |
Definition at line 568 of file PVTU2VTU.cpp.
References BaseLib::RunTime::elapsed(), ERR(), MeshLib::Properties::existsPropertyVector(), BaseLib::getFileExtension(), INFO(), BaseLib::initOGSLogger(), BaseLib::makeLogLevelArg(), mergeSubdomainMeshes(), OGS_FATAL, GitInfoLib::GitInfo::ogs_version, MeshLib::IO::VtuInterface::readVTUFile(), readVtuFileNames(), BaseLib::RunTime::start(), transferPropertiesFromPartitionedMeshToUnpartitionedMesh(), 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 353 of file PVTU2VTU.cpp.
References GeoLib::OctTree< POINT, MAX_POINTS >::addPoint().
Referenced by mergeSubdomainMeshes().
| std::unique_ptr< MeshLib::Mesh > mergeSubdomainMeshes | ( | std::vector< std::unique_ptr< MeshLib::Mesh > > const & | meshes | ) |
Definition at line 381 of file PVTU2VTU.cpp.
References applyToPropertyVectors(), GeoLib::OctTree< POINT, MAX_POINTS >::createOctTree(), createPropertyVector(), BaseLib::RunTime::elapsed(), GeoLib::AABB::getMaxPoint(), getMergedNodesVector(), GeoLib::AABB::getMinPoint(), getRegularElements(), INFO(), makeNodesUnique(), resetNodesInRegularElements(), and BaseLib::RunTime::start().
Referenced by main().
| std::vector< std::string > readVtuFileNames | ( | std::string const & | pvtu_file_name | ) |
Definition at line 189 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 331 of file PVTU2VTU.cpp.
References GeoLib::OctTree< POINT, MAX_POINTS >::addPoint(), and getExistingNodeFromOctTree().
Referenced by mergeSubdomainMeshes().
| bool transfer | ( | MeshLib::Properties const & | subdomain_properties, |
| MeshLib::Mesh & | original_mesh, | ||
| MeshLib::PropertyVector< std::size_t > const & | global_ids, | ||
| std::string_view const | property_name, | ||
| MeshLib::MeshItemType const | mesh_item_type ) |
Definition at line 451 of file PVTU2VTU.cpp.
References MeshLib::Properties::existsPropertyVector(), MeshLib::PropertyVector< T >::getComponent(), MeshLib::getOrCreateMeshProperty(), MeshLib::Properties::getPropertyVector(), INFO(), and MeshLib::PropertyVector< T >::size().
Referenced by transferPropertiesFromPartitionedMeshToUnpartitionedMesh().
| void transferPropertiesFromPartitionedMeshToUnpartitionedMesh | ( | MeshLib::Mesh const & | subdomain_mesh, |
| MeshLib::Mesh & | original_mesh ) |
Definition at line 558 of file PVTU2VTU.cpp.
References MeshLib::Cell, MeshLib::Node, and transferPropertiesFromPartitionedMeshToUnpartitionedMesh().
| void transferPropertiesFromPartitionedMeshToUnpartitionedMesh | ( | MeshLib::Mesh const & | subdomain_mesh, |
| MeshLib::Mesh & | original_mesh, | ||
| MeshLib::MeshItemType const | mesh_item_type ) |
Definition at line 489 of file PVTU2VTU.cpp.
References MeshLib::getBulkIDString(), MeshLib::Mesh::getName(), MeshLib::Mesh::getProperties(), MeshLib::globalIDString(), INFO(), OGS_FATAL, and transfer().
Referenced by main(), and transferPropertiesFromPartitionedMeshToUnpartitionedMesh().