OGS
PostUtils.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <map>
7#include <memory>
8#include <vector>
9
10#include "MeshLib/Mesh.h"
11namespace MeshLib
12{
13class Node;
14}
15
16namespace ProcessLib
17{
18namespace LIE
19{
24class PostProcessTool final
25{
26public:
28 MeshLib::Mesh const& org_mesh,
29 std::vector<int> const& vec_fracture_mat_IDs,
30 std::vector<std::vector<MeshLib::Node*>> const& vec_vec_fracture_nodes,
31 std::vector<std::vector<MeshLib::Element*>> const&
32 vec_vec_fracture_matrix_elements,
33 std::vector<std::pair<std::size_t, std::vector<int>>> const&
34 vec_branch_nodeID_matIDs,
35 std::vector<std::pair<std::size_t, std::vector<int>>> const&
36 vec_junction_nodeID_matIDs);
37
38 MeshLib::Mesh const& getOutputMesh() const { return *_output_mesh; }
39
40private:
41 template <typename T>
43 MeshLib::PropertyVector<T> const& property);
44 template <typename T>
46 MeshLib::PropertyVector<T> const& source_property,
47 MeshLib::PropertyVector<T>* const destination_property);
48 void calculateTotalDisplacement(unsigned const n_fractures,
49 unsigned const n_junctions);
50
52 std::unique_ptr<MeshLib::Mesh> _output_mesh;
53 std::map<std::size_t, std::vector<std::size_t>> _map_dup_newNodeIDs;
54};
55
56} // namespace LIE
57} // namespace ProcessLib
MeshLib::Mesh const & getOutputMesh() const
Definition PostUtils.h:38
void copyPropertyValues(MeshLib::PropertyVector< T > const &source_property, MeshLib::PropertyVector< T > *const destination_property)
MeshLib::Mesh const & _org_mesh
Definition PostUtils.h:51
std::map< std::size_t, std::vector< std::size_t > > _map_dup_newNodeIDs
Definition PostUtils.h:53
void calculateTotalDisplacement(unsigned const n_fractures, unsigned const n_junctions)
MeshLib::PropertyVector< T > * createProperty(MeshLib::PropertyVector< T > const &property)
std::unique_ptr< MeshLib::Mesh > _output_mesh
Definition PostUtils.h:52
PostProcessTool(MeshLib::Mesh const &org_mesh, std::vector< int > const &vec_fracture_mat_IDs, std::vector< std::vector< MeshLib::Node * > > const &vec_vec_fracture_nodes, std::vector< std::vector< MeshLib::Element * > > const &vec_vec_fracture_matrix_elements, std::vector< std::pair< std::size_t, std::vector< int > > > const &vec_branch_nodeID_matIDs, std::vector< std::pair< std::size_t, std::vector< int > > > const &vec_junction_nodeID_matIDs)
Definition PostUtils.cpp:40