4#include "feddlib/core/FEDDCore.hpp"
5#include "feddlib/core/General/DefaultTypeDefs.hpp"
6#include "feddlib/core/Mesh/MeshStructured.hpp"
7#include "feddlib/core/Mesh/MeshUnstructured.hpp"
19template <
class SC = default_sc,
class LO = default_lo,
class GO = default_go,
class NO = default_no>
38 typedef Teuchos::RCP<Domain<SC,LO,GO,NO> > DomainPtr_Type;
39 typedef std::vector<DomainPtr_Type> DomainPtrArray_Type;
40 typedef Teuchos::RCP< const Domain<SC,LO,GO,NO> > DomainConstPtr_Type;
42 typedef Teuchos::RCP<Mesh_Type > MeshPtr_Type;
44 typedef Teuchos::RCP<const Mesh_Type > MeshConstPtr_Type;
46 typedef Teuchos::RCP<MeshStr_Type> MeshStrPtr_Type;
49 typedef Teuchos::RCP<MeshUnstr_Type> MeshUnstrPtr_Type;
50 typedef std::vector<MeshUnstrPtr_Type> MeshUnstrPtrArray_Type;
52 typedef typename MeshUnstr_Type::MeshInterfacePtr_Type MeshInterfacePtr_Type;
54 typedef typename Mesh_Type::Elements_Type Elements_Type;
55 typedef typename Mesh_Type::ElementsPtr_Type ElementsPtr_Type;
58 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
59 typedef Teuchos::RCP<const MultiVector_Type> MultiVectorPtrConst_Type;
62 typedef Teuchos::RCP<Map_Type> MapPtr_Type;
63 typedef Teuchos::RCP<const Map_Type> MapConstPtr_Type;
65 typedef Teuchos::Comm<int> Comm_Type;
66 typedef Teuchos::RCP<const Comm_Type> CommConstPtr_Type;
68 typedef std::vector<GO> vec_GO_Type;
69 typedef std::vector<vec_GO_Type> vec2D_GO_Type;
70 typedef std::vector<vec2D_GO_Type> vec3D_GO_Type;
71 typedef Teuchos::RCP<vec3D_GO_Type> vec3D_GO_ptr_Type;
92 Domain(CommConstPtr_Type comm,
int dimension);
101 Domain(vec_dbl_Type coor,
double l,
double h, CommConstPtr_Type comm);
111 Domain(vec_dbl_Type coor,
double l,
double w,
double h, CommConstPtr_Type comm);
142 void buildMesh(
int flags, std::string meshType,
int dim, std::string FEType,
int N,
int M,
int numProcsCoarseSolve = 0);
265 void readMesh(std::string filename, std::string delimiter,
int dim, std::string FEType,
int volumeID=10);
291 void readAndPartitionMesh( std::string filename, std::string delimiter,
int dim, std::string FEType,
int volumeID=10 );
445 void moveMesh(MultiVectorPtr_Type displacementUnique, MultiVectorPtr_Type displacementRepeated);
473 void toNodeID(UN dim, GO dofID, GO &nodeID, LO &localDofNumber);
481 void toDofID(UN dim, GO nodeID, LO localDofNumber, GO &dofID );
542 CommConstPtr_Type comm_;
545 vec_dbl_Type coorRec;
552 mutable MapPtr_Type mapVecFieldUnique_;
553 mutable MapPtr_Type mapVecFieldRepeated_;
555 string_vec_ptr_Type geometries2DVec_;
556 string_vec_ptr_Type geometries3DVec_;
557 vec_dbl_ptr_Type distancesToInterface_;
560 MapPtr_Type interfaceMapUnique_;
561 MapPtr_Type interfaceMapVecFieldUnique_;
564 MapPtr_Type globalInterfaceMapUnique_;
565 MapPtr_Type globalInterfaceMapVecFieldUnique_;
566 MapPtr_Type partialGlobalInterfaceVecFieldMap_;
567 MapPtr_Type otherGlobalInterfaceMapUnique_;
568 MapPtr_Type otherGlobalInterfaceMapVecFieldUnique_;
569 MapPtr_Type otherPartialGlobalInterfaceVecFieldMap_;
575 vec_long_Type vecLocalInterfaceIDinGlobal_;
577 std::string meshType_;
578 int numProcsCoarseSolve_;
Domain(vec_dbl_Type coor, double l, double w, double h, CommConstPtr_Type comm)
Constructor for 3D strucutred meshes build in FEDDLib.
Definition Domain_def.hpp:113
vec_int_ptr_Type getElementsFlag() const
Returns flags of elements as vector of type int.
Definition Domain_def.hpp:171
UN getDimension() const
Get dimension.
Definition Domain_def.hpp:431
void initDummyMesh(MapPtr_Type map)
Initialize dummy mesh for i.e. lagrange multiplier that only represents on 'point' in that sense....
Definition Domain_def.hpp:396
void exportSurfaceNormals(std::string name="default")
Exporting Paraview file displaying surface normals of the underlying mesh. As we are generally not ab...
Definition Domain_def.hpp:1022
MapConstPtr_Type getMapRepeated() const
Get map of all repeated (not uniquely distributed) nodes of processors.
Definition Domain_def.hpp:454
void preProcessMesh(bool correctSurfaceNormals, bool correctElementDirection)
Option of preprocessing mesh by making consistent outward normal and/or consistent element orientatio...
Definition Domain_def.hpp:418
CommConstPtr_Type getComm() const
Communicator.
Definition Domain_def.hpp:443
vec_int_ptr_Type getBCFlagUnique() const
Get vector of the flags corrsponding to the unique points (on your processor)
Definition Domain_def.hpp:490
Domain(CommConstPtr_Type comm)
Constructor.
Definition Domain_def.hpp:37
MapConstPtr_Type getMapVecFieldRepeated() const
Definition Domain_def.hpp:518
void partitionDistanceToInterface()
Partition distance to interface.
Definition Domain_def.hpp:314
void buildMesh(int flags, std::string meshType, int dim, std::string FEType, int N, int M, int numProcsCoarseSolve=0)
Build structured mesh in FEDDLib.
Definition Domain_def.hpp:204
vec2D_int_ptr_Type getElements() const
Get the elements (on your processor) as vector data type.
Definition Domain_def.hpp:496
void setPartialCoupling(int flag, std::string type)
Set partial coupling.
Definition Domain_def.hpp:781
void readMesh(std::string filename, std::string delimiter, int dim, std::string FEType, int volumeID=10)
Reading mesh from .mesh file with name 'filename'.
MeshPtr_Type getMesh()
Get mesh.
Definition Domain_def.hpp:677
void buildInterfaceMaps()
Build interface maps.
Definition Domain_def.hpp:789
void identifyInterfaceParallelAndDistance(DomainPtr_Type domainOther, vec_int_Type interfaceID_vec)
Itentify interface parallal and distance.
Definition Domain_def.hpp:573
void toDofID(UN dim, GO nodeID, LO localDofNumber, GO &dofID)
Hilfsfunktion fuer buildLocalInterfaceIDInGlobal(). Gibt fuer eine gegebene nodeID die entsprechende ...
Definition Domain_def.hpp:900
vec_long_Type getLocalInterfaceIDInGlobal() const
Get local interface id in global.
Definition Domain_def.hpp:906
void readMeshSize(std::string filename, std::string delimiter)
Reading mesh size.
Definition Domain_def.hpp:291
void buildUniqueInterfaceMaps()
Build unique node and dof interfaceMap in interface numbering.
Definition Domain_def.hpp:695
void partitionMesh(bool partitionDistance=false)
Partition mesh according to number of processors. Partition with parmetis.
Definition Domain_def.hpp:302
MapConstPtr_Type getMapUnique() const
Get map of all uniquely distributed nodes of the processors.
Definition Domain_def.hpp:448
MultiVectorPtr_Type getNodeListMV() const
Get node list in multi vector point.
Definition Domain_def.hpp:984
MapConstPtr_Type getOtherGlobalInterfaceMapVecFieldUnique() const
Get other interface vec field map unique (for fsi coupling block c4)
Definition Domain_def.hpp:775
LO getNumElements() const
Get local number of elements (on your processor)
Definition Domain_def.hpp:533
void setMesh(MeshUnstrPtr_Type meshUnstr)
Settng mesh from domain.
Definition Domain_def.hpp:389
ElementsPtr_Type getElementsC() const
Get the elements (on your processor) as Elements_Type.
Definition Domain_def.hpp:502
void toNodeID(UN dim, GO dofID, GO &nodeID, LO &localDofNumber)
Hilfsfunktion fuer buildLocalInterfaceIDInGlobal(). Gibt fuer eine gegebene nodeID die entsprechende ...
Definition Domain_def.hpp:893
int findInPointsUnique(const vec_dbl_Type &x) const
Find in points unique.
Definition Domain_def.hpp:943
int checkGeomentry(std::string MeshType, int dim) const
Checks geometriy.
Definition Domain_def.hpp:545
Domain()
Constructor.
Definition Domain_def.hpp:16
vec2D_dbl_ptr_Type getPointsRepeated() const
Get vector of repeated points (on your processor). 2D Vector with size: numPoints x dim.
Definition Domain_def.hpp:472
void initializeFEData()
initializeFEData
Definition Domain_def.hpp:165
MapConstPtr_Type getGlobalInterfaceMapVecFieldPartial() const
Get global interface map vector field partial.
Definition Domain_decl.hpp:360
void moveMesh(MultiVectorPtr_Type displacementUnique, MultiVectorPtr_Type displacementRepeated)
Move mesh according to displacement (i.e. used in FSI)
Definition Domain_def.hpp:688
std::string getFEType() const
Finite element discretization. Represented as string, i.e., P2.
Definition Domain_def.hpp:437
LO getNumPoints(std::string type="Unique") const
Get local number of points of type 'type' (unique/repeated)
Definition Domain_def.hpp:539
void initializeUnstructuredMesh(int dimension, std::string feType, int volumeID=10)
Generally the domain object holds only meshes from type 'Mesh'. If we read a mesh from file it become...
Definition Domain_def.hpp:277
MeshConstPtr_Type getMesh() const
Get mesh constant.
Definition Domain_def.hpp:682
MapConstPtr_Type getEdgeMap() const
Get map of edges.
Definition Domain_def.hpp:466
GO getNumElementsGlobal() const
Get global number of elements.
Definition Domain_def.hpp:527
void initWithDomain(DomainPtr_Type domainsP1)
Initialize domain with already existing domain.
Definition Domain_def.hpp:363
void exportElementFlags(std::string name="default")
Exporting Paraview file displaying element flags of the underlying mesh.
Definition Domain_def.hpp:1102
MapConstPtr_Type getOtherGlobalInterfaceMapVecFieldPartial() const
Get other global interface map vec field partial.
Definition Domain_decl.hpp:366
MapConstPtr_Type getGlobalInterfaceMapUnique() const
Get interface map unique (for fsi coupling block c4)
Definition Domain_def.hpp:762
void buildP2ofP1Domain(DomainPtr_Type domainP1)
Building a P2 mesh from the P1 one mesh. We generally habe P1-input meshes and build the P2 mesh on t...
Definition Domain_def.hpp:344
vec2D_dbl_ptr_Type getPointsUnique() const
Get vector of unique points (on your processor). 2D Vector with size: numPoints x dim.
Definition Domain_def.hpp:478
void exportNodeFlags(std::string name="default")
Exporting Paraview file displaying node flags of the underlying mesh.
Definition Domain_def.hpp:999
MapConstPtr_Type getInterfaceMapVecFieldUnique() const
Get interface vector field map unique.
Definition Domain_def.hpp:755
void exportElementOrientation(std::string name="default")
Exporting Paraview file displaying element volume of underlying mesh.
Definition Domain_def.hpp:1070
Domain(CommConstPtr_Type comm, int dimension)
Constructor.
Definition Domain_def.hpp:58
void info() const
Information about the domain.
Definition Domain_def.hpp:141
MapConstPtr_Type getElementMap() const
Get map of elements.
Definition Domain_def.hpp:460
vec_int_ptr_Type getBCFlagRepeated() const
Get vector of the flags corrsponding to the repeated points (on your processor)
Definition Domain_def.hpp:484
void setReferenceConfiguration()
Set reference configuration.
Definition Domain_def.hpp:671
MapConstPtr_Type getGlobalInterfaceMapVecFieldUnique() const
Get interface vec field map unique (for fsi coupling block c4)
Definition Domain_def.hpp:769
Domain(vec_dbl_Type coor, double l, double h, CommConstPtr_Type comm)
Constructor for 2D structured meshes build in FEDDLib.
Definition Domain_def.hpp:81
LO getApproxEntriesPerRow() const
Estimate depending on FEType and dimension for the numer of entries in system matrix,...
Definition Domain_def.hpp:177
vec_dbl_ptr_Type getDistancesToInterface() const
Get distances to interface.
Definition Domain_def.hpp:666
void exportMesh(bool exportEdges=false, bool exportSurfaces=false, std::string exportMesh="export.mesh")
Exporting Mesh.
Definition Domain_def.hpp:410
void buildGlobalInterfaceMaps()
Build interface maps with global numbering with indicesGlobalMatchedUnique_.
MapConstPtr_Type getInterfaceMapUnique() const
Get interface map unique.
Definition Domain_def.hpp:748
void setDummyInterfaceDomain(DomainPtr_Type domain)
Set dummy interface domain.
Definition Domain_def.hpp:912
void calculateDistancesToInterface()
Calculate distance to interface.
Definition Domain_def.hpp:583
void readAndPartitionMesh(std::string filename, std::string delimiter, int dim, std::string FEType, int volumeID=10)
Function called when mesh is read and paritioned. In turn it calls readMesh(...) and partitionMesh(....
Definition Domain_def.hpp:327
MapConstPtr_Type getMapVecFieldUnique() const
Get map of all unique (not uniquely distributed) nodes of processors in a vector field point of view....
Definition Domain_def.hpp:509
Definition Map_decl.hpp:36
Definition MeshStructured_decl.hpp:27
Definition MeshUnstructured_decl.hpp:31
Definition Mesh_decl.hpp:25
Definition MultiVector_decl.hpp:36
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5