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
55 void buildMesh2D(std::string FEType,
56 int N,
57 int M,
58 int numProcsCoarseSolve=0);
59
60 // /// @brief Building 2D TPM rectangular mesh with the lenght and height as defined per 'setGeomerty2DRectangle' - characterized by building addition line segments for boundary conditions
61 // /// @param FEType Finite element discretization
62 // /// @param N Number of subdomains
63 // /// @param M H/h with H subdomain diameter (length/H) and h characteristic mesh size (length/(M*N))
64 // /// @param numProcsCoarseSolve if we want to reserve certain processors for coarse solve
65 // /// @param underlyingLib underlying linear algebra library
66 // void buildMesh2DTPM(std::string FEType,
67 // int N,
68 // int M,
69 // int numProcsCoarseSolve=0,
70 // std::string underlyingLib="Tpetra");
71
77 void buildMesh3D(std::string FEType,
78 int N,
79 int M,
80 int numProcsCoarseSolve=0);
81
87 void buildMesh3D5Elements(std::string FEType, int N, int M, int numProcsCoarseSolve);
88
89
95 void buildMesh2DBFS(std::string FEType,
96 int N,
97 int M,
98 int numProcsCoarseSolve=0);
99
105 void buildMesh3DBFS(std::string FEType,
106 int N,
107 int M,
108 int numProcsCoarseSolve=0);
109
115 int M,
116 int numProcsCoarseSolve);
117
123 int M,
124 int numProcsCoarseSolve);
125
130 void build3DQ1Cube(int N,
131 int M,
132 int numProcsCoarseSolve);
133
138 void build3DQ2Cube( int N,
139 int M,
140 int numProcsCoarseSolve);
141
147 int M,
148 int numProcsCoarseSolve);
153 void build3DQ1BFS(int N,
154 int M,
155 int numProcsCoarseSolve);
156
157
162 void build3DQ2BFS( int N,
163 int M,
164 int numProcsCoarseSolve);
165
166// /// @brief Building 2D mini TPM rectangular mesh with the lenght and height as defined per 'setGeomerty2DRectangle' - characterized by building addition line segments for boundary conditions
167// /// @param FEType Finite element discretization
168// /// @param N Number of subdomains
169// /// @param M H/h with H subdomain diameter (length/H) and h characteristic mesh size (length/(M*N))
170// /// @param numProcsCoarseSolve if we want to reserve certain processors for coarse solve
171// /// @param underlyingLib underlying linear algebra library
172// void buildMesh2DMiniTPM(std::string FEType,
173// int N,
174// int M,
175// int numProcsCoarseSolve=0,
176// std::string underlyingLib="Tpetra" );
177
178 // /// @brief Building suface lines for TPM square mini. Empty.
179 // /// @param feType
180 // void buildSurfaceLinesSquareMiniTPM( string feType );
181
182 void setRankRange( int numProcsCoarseSolve );
183
184 void buildElementsClass( vec2D_int_ptr_Type elements, vec_int_ptr_Type elementFlag = Teuchos::null );
185
188
189 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,
190 GO nmbPoints_oneDirFull, GO nmbPoints_oneDirMid);
191
195 void setStructuredMeshFlags(int flagsOption,std::string FEType="P1");
196
199
203 void buildSurfaces(int flagsOption, std::string FEType);
204
205 void flipSurface(vec_int_Type &surfaceElements_vec);
206
207
208 /* ###################################################################### */
209
210 std::vector<double> coorRec;
211 double length; // length of geometry
212 double height; // height of geometry
213 double width; // width of geometry
214
215 /* ###################################################################### */
216private:
217};
218}
219#endif
void buildMesh3DBFS(std::string FEType, int N, int M, int numProcsCoarseSolve=0)
Building general 3D backward facing step with length, width and height as defines by 'setGeometry3DBo...
Definition MeshStructured_def.hpp:2457
void buildElementMap()
Building element map.
Definition MeshStructured_def.hpp:4238
void build3DQ1BFS(int N, int M, int numProcsCoarseSolve)
Building general 3D backward facing step with length, width and height as defines by 'setGeometry3DBo...
Definition MeshStructured_def.hpp:1628
void buildMesh3D(std::string FEType, int N, int M, int numProcsCoarseSolve=0)
Building general 3D cuboid with length, width and height as defines by 'setGeometry3DBox'....
Definition MeshStructured_def.hpp:576
void buildP1_Disc_Q2_3DCube(int N, int M, int numProcsCoarseSolve)
Building general 3D cuboid with length, width and height as defines by 'setGeometry3DBox' with Q2-P1 ...
Definition MeshStructured_def.hpp:965
void buildMesh3D5Elements(std::string FEType, int N, int M, int numProcsCoarseSolve)
Building general 3D cuboid with length, width and height as defines by 'setGeometry3DBox'....
Definition MeshStructured_def.hpp:3682
void buildMesh2DBFS(std::string FEType, int N, int M, int numProcsCoarseSolve=0)
Building 2D backward facing step geometry with the lenght and height as defined per 'setGeomerty2DRec...
Definition MeshStructured_def.hpp:2000
void build3DQ2_20Cube(int N, int M, int numProcsCoarseSolve)
Building general 3D cuboid with length, width and height as defines by 'setGeometry3DBox' with Q2 dis...
Definition MeshStructured_def.hpp:1478
void build3DQ1Cube(int N, int M, int numProcsCoarseSolve)
Building general 3D cuboid with length, width and height as defines by 'setGeometry3DBox' with Q1 dis...
Definition MeshStructured_def.hpp:1145
void buildP1_Disc_Q2_3DBFS(int N, int M, int numProcsCoarseSolve)
Building general 3D backward facing step with length, width and height as defines by 'setGeometry3DBo...
Definition MeshStructured_def.hpp:2921
void build3DQ2Cube(int N, int M, int numProcsCoarseSolve)
Building general 3D cuboid with length, width and height as defines by 'setGeometry3DBox' with Q2 dis...
Definition MeshStructured_def.hpp:1268
void buildSurfaces(int flagsOption, std::string FEType)
Building surfaces. This is useful for structural problems. Each surface gets another flag....
Definition MeshStructured_def.hpp:3975
void buildSurfaceLinesSquare()
Building suface lines aka edges. Empty.
Definition MeshStructured_def.hpp:228
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:3104
void build3DQ2BFS(int N, int M, int numProcsCoarseSolve)
Building general 3D backward facing step with length, width and height as defines by 'setGeometry3DBo...
Definition MeshStructured_def.hpp:1804
void buildMesh2D(std::string FEType, int N, int M, int numProcsCoarseSolve=0)
Building a general 2D rectangular mesh with the lenght and height as defined per 'setGeomerty2DRectan...
Definition MeshStructured_def.hpp:238
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement_decl.hpp:33