OGS
PostUtils.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include <map>
13 #include <memory>
14 #include <vector>
15 
16 #include "MeshLib/Mesh.h"
17 namespace MeshLib
18 {
19 class Node;
20 }
21 
22 namespace ProcessLib
23 {
24 namespace LIE
25 {
30 class PostProcessTool final
31 {
32 public:
34  MeshLib::Mesh const& org_mesh,
35  std::vector<int> const& vec_fracture_mat_IDs,
36  std::vector<std::vector<MeshLib::Node*>> const& vec_vec_fracture_nodes,
37  std::vector<std::vector<MeshLib::Element*>> const&
38  vec_vec_fracture_matrix_elements,
39  std::vector<std::pair<std::size_t, std::vector<int>>> const&
40  vec_branch_nodeID_matIDs,
41  std::vector<std::pair<std::size_t, std::vector<int>>> const&
42  vec_junction_nodeID_matIDs);
43 
44  MeshLib::Mesh const& getOutputMesh() const { return *_output_mesh; }
45 
46 private:
47  template <typename T>
49  MeshLib::PropertyVector<T> const& property);
50  template <typename T>
51  void copyPropertyValues(
52  MeshLib::PropertyVector<T> const& source_property,
53  MeshLib::PropertyVector<T>* const destination_property);
54  void calculateTotalDisplacement(unsigned const n_fractures,
55  unsigned const n_junctions);
56 
58  std::unique_ptr<MeshLib::Mesh> _output_mesh;
59  std::map<std::size_t, std::vector<std::size_t>> _map_dup_newNodeIDs;
60 };
61 
62 } // namespace LIE
63 } // namespace ProcessLib
Definition of the Mesh class.
void copyPropertyValues(MeshLib::PropertyVector< T > const &source_property, MeshLib::PropertyVector< T > *const destination_property)
Definition: PostUtils.cpp:323
MeshLib::Mesh const & _org_mesh
Definition: PostUtils.h:57
MeshLib::Mesh const & getOutputMesh() const
Definition: PostUtils.h:44
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:44
std::map< std::size_t, std::vector< std::size_t > > _map_dup_newNodeIDs
Definition: PostUtils.h:59
void calculateTotalDisplacement(unsigned const n_fractures, unsigned const n_junctions)
Definition: PostUtils.cpp:376
MeshLib::PropertyVector< T > * createProperty(MeshLib::PropertyVector< T > const &property)
Definition: PostUtils.cpp:287
std::unique_ptr< MeshLib::Mesh > _output_mesh
Definition: PostUtils.h:58