6#include "feddlib/core/FEDDCore.hpp"
7#include "feddlib/core/General/DefaultTypeDefs.hpp"
8#include "feddlib/core/LinearAlgebra/MultiVector.hpp"
9#include "feddlib/core/FE/Elements.hpp"
10#include "feddlib/core/FE/FiniteElement.hpp"
11#include "feddlib/core/FE/Helper.hpp"
12#include "feddlib/core/Mesh/AABBTree.hpp"
24template <
class SC = default_sc,
class LO = default_lo,
class GO = default_go,
class NO = default_no>
30 typedef Teuchos::RCP<FiniteElement_Type> FiniteElementPtr_Type;
31 typedef Teuchos::RCP<Elements_Type> ElementsPtr_Type;
33 typedef Teuchos::RCP<Mesh> Mesh_ptr_Type;
35 typedef Teuchos::RCP<Teuchos::Comm<int> > CommPtr_Type;
36 typedef Teuchos::RCP<const Teuchos::Comm<int> > CommConstPtr_Type;
37 typedef const CommConstPtr_Type CommConstPtrConst_Type;
40 typedef Teuchos::RCP<Map_Type> MapPtr_Type;
41 typedef Teuchos::RCP<const Map_Type> MapConstPtr_Type;
42 typedef Teuchos::RCP<const Map_Type> MapConstPtrConst_Type;
45 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
48 typedef Teuchos::RCP<AABBTree_Type > AABBTreePtr_Type;
54 Mesh(CommConstPtrConst_Type &comm);
56 virtual ~Mesh() =
default;
138 CommConstPtrConst_Type
getComm(){
return comm_;};
155 void moveMesh( MultiVectorPtr_Type displacementUnique, MultiVectorPtr_Type displacementRepeated );
171 void create_AABBTree();
173 vec_int_ptr_Type findElemsForPoints(vec2D_dbl_ptr_Type query_points);
175 vec_dbl_Type getBaryCoords(vec_dbl_Type point,
int element);
177 bool isPointInElem(vec_dbl_Type point,
int element);
200 long long numElementsGlob_;
203 MapPtr_Type mapUnique_;
204 MapPtr_Type mapRepeated_;
205 vec2D_dbl_ptr_Type pointsRep_;
206 vec2D_dbl_ptr_Type pointsUni_;
207 vec_int_ptr_Type bcFlagRep_;
208 vec_int_ptr_Type bcFlagUni_;
210 ElementsPtr_Type surfaceElements_;
212 ElementsPtr_Type elementsC_;
213 MapPtr_Type elementMap_;
214 MapPtr_Type edgeMap_;
217 CommConstPtrConst_Type comm_;
219 vec2D_int_ptr_Type elementsVec_;
221 vec2D_dbl_ptr_Type pointsRepRef_;
222 vec2D_dbl_ptr_Type pointsUniRef_;
227 int surfaceElementOrder_;
228 int edgesElementOrder_;
230 AABBTreePtr_Type AABBTree_;
232 tuple_intint_Type rankRange_;
237 void flipSurface(ElementsPtr_Type subEl,
int surfaceNumber);
238 void flipElement(ElementsPtr_Type elements,
int elementNumber);
Definition AABBTree_decl.hpp:24
Definition Elements.hpp:22
Definition FiniteElement.hpp:17
Definition Map_decl.hpp:36
ElementsPtr_Type getElementsC()
Returns element list as c-object.
Definition Mesh_def.hpp:150
tuple_intint_Type getRankRange() const
Definition Mesh_decl.hpp:181
int setStructuredMeshFlags(int flags)
This is done in meshStructured. Maybe we should move it here or delete this.
Definition Mesh_decl.hpp:143
void setParameterList(ParameterListPtr_Type &pL)
Setting input parameterlist to be parameterlist here.
vec2D_dbl_ptr_Type getPointsRepeated() const
getter for list of repeated points with x,y,z coordinates in each row
Definition Mesh_def.hpp:126
CommConstPtrConst_Type getComm()
Communicator object.
Definition Mesh_decl.hpp:138
MapConstPtr_Type getEdgeMap()
Getter for edge map.
Definition Mesh_def.hpp:120
vec2D_dbl_ptr_Type getPointsUnique() const
getter for list of unique points with x,y,z coordinates in each row
Definition Mesh_def.hpp:132
vec_int_ptr_Type getBCFlagRepeated() const
Getter for flags corresponting to repeated points.
Definition Mesh_def.hpp:138
void setElementFlags(std::string type="")
Something for TPM. Can be deprecated soon.
Definition Mesh_def.hpp:67
void correctNormalDirections()
Correcting the normal direction of all surface normals set as subelements of volume elements to be ou...
Definition Mesh_def.hpp:442
GO getNumElementsGlobal()
Global number of elements.
Definition Mesh_def.hpp:166
vec_int_ptr_Type getElementsFlag() const
Getter for element flags.
Definition Mesh_def.hpp:94
MapConstPtr_Type getMapUnique() const
Getter for unique node map.
Definition Mesh_def.hpp:101
MapConstPtr_Type getElementMap() const
Getter for element map.
Definition Mesh_def.hpp:113
void correctElementOrientation()
Correct the element orientation of all elements to have positive volume / det when doint transformati...
Definition Mesh_def.hpp:508
vec2D_int_ptr_Type getElements()
Returns elements as a vector type contrary to the C-object list.
Definition Mesh_def.hpp:433
ParameterListConstPtr_Type getParameterList() const
Getter for paramaeterlist that is set here.
ElementsPtr_Type getSurfaceElements()
Getter for surface elements. Probably set in mesh partitioner. They are generally the dim-1 surface e...
Definition Mesh_def.hpp:155
int getEdgeElementOrder()
Get EdgeElement order.
Definition Mesh_decl.hpp:167
int getSurfaceElementOrder()
Get SurfaceElement order.
Definition Mesh_decl.hpp:161
MapConstPtr_Type getMapRepeated() const
Getter for repeated node mal.
Definition Mesh_def.hpp:107
LO getNumElements()
Local number of elements.
Definition Mesh_def.hpp:172
void deleteSurfaceElements()
Deleting surface elements, called after reading input mesh.
Definition Mesh_decl.hpp:184
LO getNumPoints(std::string type="Unique")
Get local (LO) number of points either in unique or repeated version.
Definition Mesh_def.hpp:178
int getDimension()
Definition Mesh_def.hpp:160
void moveMesh(MultiVectorPtr_Type displacementUnique, MultiVectorPtr_Type displacementRepeated)
Moving mesh according to displacement based on reference configuration.
Definition Mesh_def.hpp:268
int getOrderElement()
Definition Mesh_def.hpp:189
void setReferenceConfiguration()
Setting current coordinates as reference configuration. Should only be called once :D.
Definition Mesh_def.hpp:232
vec_int_ptr_Type getBCFlagUnique() const
Getter for flags corresponting to unique points.
Definition Mesh_def.hpp:144
Definition MultiVector_decl.hpp:36
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5