Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
MeshInterface_decl.hpp
1#ifndef MESHINTERFACE_decl_hpp
2#define MESHINTERFACE_decl_hpp
3
4#include "feddlib/core/FEDDCore.hpp"
5#include "feddlib/core/LinearAlgebra/Map.hpp"
6#include "feddlib/core/LinearAlgebra/MultiVector.hpp"
7
16
17namespace FEDD{
18template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
19class MeshInterface {
20
21public:
22 typedef MeshInterface<SC,LO,GO,NO> MeshInterface_Type;
23 typedef Teuchos::RCP<MeshInterface_Type> MeshInterfacePtr_Type;
24 typedef Map<LO,GO,NO> Map_Type;
25 typedef typename Map_Type::MapPtr_Type MapPtr_Type;
26 typedef typename Map_Type::MapConstPtr_Type MapConstPtr_Type;
27 typedef typename Map_Type::Comm_Type Comm_Type;
28 typedef typename Map_Type::CommConstPtr_Type CommConstPtr_Type;
29
30 typedef MultiVector<SC,LO,GO,NO> MultiVector_Type;
31 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
32
33
34 typedef std::vector<GO> vec_GO_Type;
35 typedef std::vector<vec_GO_Type> vec2D_GO_Type;
36 typedef std::vector<vec2D_GO_Type> vec3D_GO_Type;
37 typedef Teuchos::RCP<vec3D_GO_Type> vec3D_GO_ptr_Type;
38
39 /* ###################################################################### */
40 //
41 MeshInterface();
42
43 MeshInterface(CommConstPtr_Type comm);
44
45 void determineInterface( vec2D_dbl_ptr_Type pointsRepThis, vec2D_dbl_ptr_Type pointsRepOther, vec_int_ptr_Type flagThis, vec_int_ptr_Type flagOther, vec_int_Type relevant_flag_vec );
46
47 void determineInterfaceParallelAndDistance( vec2D_dbl_ptr_Type pointsUniThis, vec2D_dbl_ptr_Type pointsUniOther, vec_int_ptr_Type flagThis, vec_int_ptr_Type flagOther, vec_int_Type relevant_flag_vec, MapConstPtr_Type mapUniThis, MapConstPtr_Type mapUniOther, vec_dbl_ptr_Type &distancesToInterface, vec2D_dbl_ptr_Type pointsRepThis, int dim );
48
49 void calculateDistancesToInterfaceParallel( vec_dbl_ptr_Type &distancesToInterface, vec2D_dbl_Type &pointThis/*global interface, every proc has same information*/, vec2D_dbl_ptr_Type sourceNodesRep /*partitioned points*/);
50
51 int isPartialCouplingFlag(int flag);
52
53 void setPartialCoupling(int flag, std::string type);
54
55 int getPartialCouplingFlag(int i);
56
57 std::string getPartialCouplingType(int i);
58
59 int sizePartialCoupling();
60
61 void partitionMeshInterface(MapPtr_Type mapRepeated, MapPtr_Type mapUnique);
62
63 void buildFromOtherInterface( MeshInterfacePtr_Type otherMeshInterface);
64
65 void print(CommConstPtr_Type comm);
66
67 vec3D_GO_ptr_Type getIndicesGlobalMatched();
68
69 vec3D_GO_ptr_Type getIndicesGlobalMatchedOrigin();
70
71 vec3D_GO_ptr_Type getIndicesGlobalMatchedUnique();
72
73 private:
74 // Am Ende repeated partitioniert!
75 // TODO: in indicesGlobalMatchedRepated_ umbenennen.
76 vec3D_GO_ptr_Type indicesGlobalMatched_; /* One outer vector entry for each interface flag that is used.
77 If Interface is determined for 2 flags than 2 = indicesGlobalMatched_.size().
78 After this, 2 row vectors with global IDs for this and otherMesh.
79 2 = indicesGlobalMatched_.at(0).size(),
80 NumberOfInterfaceNodesWithFlag = indicesGlobalMatched_.at(0).at(0).size() */
81
82 vec3D_GO_ptr_Type indicesGlobalMatchedOrigin_; // nicht patitioniert, im Gegensatz zu indicesGlobalMatched_
83
84 vec3D_GO_ptr_Type indicesGlobalMatchedUnique_; // im Gegensatz zu indicesGlobalMatched_ unique partitioniert.
85
86 bool isPartitioned_;
87
88 vec_int_Type partialCouplingFlag_;
89 vec_string_Type partialCouplingType_;
90
91 CommConstPtr_Type comm_;
92
93 };
94
95}
96#endif
Definition Map_decl.hpp:36
Definition MultiVector_decl.hpp:36
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5