Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
MeshStructured_decl.hpp
1#ifndef MeshStructured_decl_hpp
2#define MeshStructured_decl_hpp
3#include "feddlib/core/Utils/FEDDUtils.hpp"
4#include "Mesh.hpp"
5
14
25namespace FEDD {
26template <class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
27class MeshStructured : public Mesh<SC,LO,GO,NO> {
28
29public:
30 typedef Mesh<SC,LO,GO,NO> Mesh_Type;
31 typedef typename Mesh_Type::CommPtr_Type CommPtr_Type;
32 typedef typename Mesh_Type::CommConstPtrConst_Type CommConstPtrConst_Type;
33 typedef typename Mesh_Type::Map_Type Map_Type;
34 typedef typename Mesh_Type::MapPtr_Type MapPtr_Type;
35 typedef typename Mesh_Type::ElementsPtr_Type ElementsPtr_Type;
36 typedef Teuchos::RCP<MeshStructured<SC,LO,GO,NO> > MeshStrPtr_Type;
37 /* ###################################################################### */
38 //
39 MeshStructured();
40
41 MeshStructured(CommConstPtrConst_Type& comm);
42
43 ~MeshStructured();
44
45 void setGeometry2DRectangle(std::vector<double> coordinates, double l, double h);
46
47 void setGeometry3DBox(std::vector<double> coordinates, double l, double w, double h);
48
49
56 void buildMesh2D(std::string FEType,
57 int N,
58 int M,
59 int numProcsCoarseSolve=0,
60 std::string underlyingLib="Tpetra");
61
68 void buildMesh2DTPM(std::string FEType,
69 int N,
70 int M,
71 int numProcsCoarseSolve=0,
72 std::string underlyingLib="Tpetra");
73
80 void buildMesh3D(std::string FEType,
81 int N,
82 int M,
83 int numProcsCoarseSolve=0,
84 std::string underlyingLib="Tpetra");
85
92 void buildMesh3D5Elements(std::string FEType, int N, int M, int numProcsCoarseSolve, std::string underlyingLib="Tpetra");
93
94
101 void buildMesh2DBFS(std::string FEType,
102 int N,
103 int M,
104 int numProcsCoarseSolve=0,
105 std::string underlyingLib="Tpetra");
106
113 void buildMesh3DBFS(std::string FEType,
114 int N,
115 int M,
116 int numProcsCoarseSolve=0,
117 std::string underlyingLib="Tpetra");
118
125 int M,
126 int numProcsCoarseSolve,
127 std::string underlyingLib);
128
135 int M,
136 int numProcsCoarseSolve,
137 std::string underlyingLib);
138
144 void build3DQ1Cube(int N,
145 int M,
146 int numProcsCoarseSolve,
147 std::string underlyingLib );
148
154 void build3DQ2Cube( int N,
155 int M,
156 int numProcsCoarseSolve,
157 std::string underlyingLib );
158
165 int M,
166 int numProcsCoarseSolve,
167 std::string underlyingLib );
168
169
175 void build3DQ2BFS( int N,
176 int M,
177 int numProcsCoarseSolve,
178 std::string underlyingLib );
179
186 void buildMesh2DMiniTPM(std::string FEType,
187 int N,
188 int M,
189 int numProcsCoarseSolve=0,
190 std::string underlyingLib="Tpetra" );
191
194 void buildSurfaceLinesSquareMiniTPM( std::string feType );
195
196 void setRankRange( int numProcsCoarseSolve );
197
198 void buildElementsClass( vec2D_int_ptr_Type elements, vec_int_ptr_Type elementFlag = Teuchos::null );
199
202
203 GO globalID_Q2_20Cube(int r, int s , int t, int &rr, int off_x, int off_y, int off_z, int M, int N,
204 GO nmbPoints_oneDirFull, GO nmbPoints_oneDirMid);
205
209 void setStructuredMeshFlags(int flagsOption,std::string FEType="P1");
210
213
217 void buildSurfaces(int flagsOption, std::string FEType);
218
219 void flipSurface(vec_int_Type &surfaceElements_vec);
220
221
222 /* ###################################################################### */
223
224 std::vector<double> coorRec;
225 double length; // length of geometry
226 double height; // height of geometry
227 double width; // width of geometry
228
229 /* ###################################################################### */
230private:
231};
232}
233#endif
void buildSurfaceLinesSquareMiniTPM(std::string feType)
Building suface lines for TPM square mini. Empty.
Definition MeshStructured_def.hpp:237
void buildElementMap()
Building element map.
Definition MeshStructured_def.hpp:4019
void buildMesh2DTPM(std::string FEType, int N, int M, int numProcsCoarseSolve=0, std::string underlyingLib="Tpetra")
Building 2D TPM rectangular mesh with the lenght and height as defined per 'setGeomerty2DRectangle' -...
Definition MeshStructured_def.hpp:66
void buildP1_Disc_Q2_3DBFS(int N, int M, int numProcsCoarseSolve, std::string underlyingLib)
Building general 3D backward facing step with length, width and height as defines by 'setGeometry3DBo...
Definition MeshStructured_def.hpp:2790
void buildMesh3D(std::string FEType, int N, int M, int numProcsCoarseSolve=0, std::string underlyingLib="Tpetra")
Building general 3D cuboid with length, width and height as defines by 'setGeometry3DBox'....
Definition MeshStructured_def.hpp:620
void buildMesh2DBFS(std::string FEType, int N, int M, int numProcsCoarseSolve=0, std::string underlyingLib="Tpetra")
Building 2D backward facing step geometry with the lenght and height as defined per 'setGeomerty2DRec...
Definition MeshStructured_def.hpp:1873
void buildP1_Disc_Q2_3DCube(int N, int M, int numProcsCoarseSolve, std::string underlyingLib)
Building general 3D cuboid with length, width and height as defines by 'setGeometry3DBox' with Q2-P1 ...
Definition MeshStructured_def.hpp:1010
void buildMesh2DMiniTPM(std::string FEType, int N, int M, int numProcsCoarseSolve=0, std::string underlyingLib="Tpetra")
Building 2D mini TPM rectangular mesh with the lenght and height as defined per 'setGeomerty2DRectang...
Definition MeshStructured_def.hpp:81
void buildMesh3DBFS(std::string FEType, int N, int M, int numProcsCoarseSolve=0, std::string underlyingLib="Tpetra")
Building general 3D backward facing step with length, width and height as defines by 'setGeometry3DBo...
Definition MeshStructured_def.hpp:2331
void build3DQ2_20Cube(int N, int M, int numProcsCoarseSolve, std::string underlyingLib)
Building general 3D cuboid with length, width and height as defines by 'setGeometry3DBox' with Q2 dis...
Definition MeshStructured_def.hpp:1526
void buildMesh2D(std::string FEType, int N, int M, int numProcsCoarseSolve=0, std::string underlyingLib="Tpetra")
Building a general 2D rectangular mesh with the lenght and height as defined per 'setGeomerty2DRectan...
Definition MeshStructured_def.hpp:281
void buildSurfaces(int flagsOption, std::string FEType)
Building surfaces. This is useful for structural problems. Each surface gets another flag....
Definition MeshStructured_def.hpp:3846
void buildSurfaceLinesSquare()
Building suface lines aka edges. Empty.
Definition MeshStructured_def.hpp:228
void build3DQ2BFS(int N, int M, int numProcsCoarseSolve, std::string underlyingLib)
Building general 3D backward facing step with length, width and height as defines by 'setGeometry3DBo...
Definition MeshStructured_def.hpp:1676
void buildMesh3D5Elements(std::string FEType, int N, int M, int numProcsCoarseSolve, std::string underlyingLib="Tpetra")
Building general 3D cuboid with length, width and height as defines by 'setGeometry3DBox'....
Definition MeshStructured_def.hpp:3552
void setStructuredMeshFlags(int flagsOption, std::string FEType="P1")
Setting corresponding flags to structured mesh depending on underlying problem. Rectangles/Cuboids ar...
Definition MeshStructured_def.hpp:2974
void build3DQ2Cube(int N, int M, int numProcsCoarseSolve, std::string underlyingLib)
Building general 3D cuboid with length, width and height as defines by 'setGeometry3DBox' with Q2 dis...
Definition MeshStructured_def.hpp:1315
void build3DQ1Cube(int N, int M, int numProcsCoarseSolve, std::string underlyingLib)
Building general 3D cuboid with length, width and height as defines by 'setGeometry3DBox' with Q1 dis...
Definition MeshStructured_def.hpp:1191
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5