Finite Element Domain Decomposition Library
FEDDLib
|
Public Types | |
typedef Teuchos::RCP< Domain< SC, LO, GO, NO > > | DomainPtr_Type |
typedef std::vector< DomainPtr_Type > | DomainPtrArray_Type |
typedef Teuchos::RCP< const Domain< SC, LO, GO, NO > > | DomainConstPtr_Type |
typedef Mesh< SC, LO, GO, NO > | Mesh_Type |
typedef Teuchos::RCP< Mesh_Type > | MeshPtr_Type |
typedef Teuchos::RCP< const Mesh_Type > | MeshConstPtr_Type |
typedef MeshStructured< SC, LO, GO, NO > | MeshStr_Type |
typedef Teuchos::RCP< MeshStr_Type > | MeshStrPtr_Type |
typedef MeshUnstructured< SC, LO, GO, NO > | MeshUnstr_Type |
typedef Teuchos::RCP< MeshUnstr_Type > | MeshUnstrPtr_Type |
typedef std::vector< MeshUnstrPtr_Type > | MeshUnstrPtrArray_Type |
typedef MeshUnstr_Type::MeshInterfacePtr_Type | MeshInterfacePtr_Type |
typedef Mesh_Type::Elements_Type | Elements_Type |
typedef Mesh_Type::ElementsPtr_Type | ElementsPtr_Type |
typedef MultiVector< SC, LO, GO, NO > | MultiVector_Type |
typedef Teuchos::RCP< MultiVector_Type > | MultiVectorPtr_Type |
typedef Teuchos::RCP< const MultiVector_Type > | MultiVectorPtrConst_Type |
typedef Map< LO, GO, NO > | Map_Type |
typedef Teuchos::RCP< Map_Type > | MapPtr_Type |
typedef Teuchos::RCP< const Map_Type > | MapConstPtr_Type |
typedef Teuchos::Comm< int > | Comm_Type |
typedef Teuchos::RCP< const Comm_Type > | CommConstPtr_Type |
typedef std::vector< GO > | vec_GO_Type |
typedef std::vector< vec_GO_Type > | vec2D_GO_Type |
typedef std::vector< vec2D_GO_Type > | vec3D_GO_Type |
typedef Teuchos::RCP< vec3D_GO_Type > | vec3D_GO_ptr_Type |
Public Member Functions | |
Domain () | |
Constructor. | |
Domain (CommConstPtr_Type comm) | |
Constructor. | |
Domain (CommConstPtr_Type comm, int dimension) | |
Constructor. | |
Domain (vec_dbl_Type coor, double l, double h, CommConstPtr_Type comm) | |
Constructor for 2D structured meshes build in FEDDLib. | |
Domain (vec_dbl_Type coor, double l, double w, double h, CommConstPtr_Type comm) | |
Constructor for 3D strucutred meshes build in FEDDLib. | |
void | initializeFEData () |
initializeFEData | |
vec_int_ptr_Type | getElementsFlag () const |
Returns flags of elements as vector of type int. | |
void | info () const |
Information about the domain. | |
void | buildMesh (int flags, std::string meshType, int dim, std::string FEType, int N, int M, int numProcsCoarseSolve=0) |
Build structured mesh in FEDDLib. | |
LO | getApproxEntriesPerRow () const |
Estimate depending on FEType and dimension for the numer of entries in system matrix, as approximate number of entries is requiered for matrix initialization. This serves as a upper bound. | |
UN | getDimension () const |
Get dimension. | |
MapConstPtr_Type | getMapUnique () const |
Get map of all uniquely distributed nodes of the processors. | |
MapConstPtr_Type | getMapRepeated () const |
Get map of all repeated (not uniquely distributed) nodes of processors. | |
MapConstPtr_Type | getElementMap () const |
Get map of elements. | |
MapConstPtr_Type | getEdgeMap () const |
Get map of edges. | |
vec2D_dbl_ptr_Type | getPointsRepeated () const |
Get vector of repeated points (on your processor). 2D Vector with size: numPoints x dim. | |
vec2D_dbl_ptr_Type | getPointsUnique () const |
Get vector of unique points (on your processor). 2D Vector with size: numPoints x dim. | |
vec_int_ptr_Type | getBCFlagRepeated () const |
Get vector of the flags corrsponding to the repeated points (on your processor) | |
vec_int_ptr_Type | getBCFlagUnique () const |
Get vector of the flags corrsponding to the unique points (on your processor) | |
vec2D_int_ptr_Type | getElements () const |
Get the elements (on your processor) as vector data type. | |
ElementsPtr_Type | getElementsC () const |
Get the elements (on your processor) as Elements_Type. | |
MapConstPtr_Type | getMapVecFieldUnique () const |
Get map of all unique (not uniquely distributed) nodes of processors in a vector field point of view. Here, a node has more than one degree of freedom. For Example in with dofs=2: 1_x , 1_y , 2_x , 2_y ,... . This degree of freedom map captures this. | |
MapConstPtr_Type | getMapVecFieldRepeated () const |
std::string | getFEType () const |
Finite element discretization. Represented as string, i.e., P2. | |
CommConstPtr_Type | getComm () const |
Communicator. | |
void | readMesh (std::string filename, std::string delimiter, int dim, std::string FEType, int volumeID=10) |
Reading mesh from .mesh file with name 'filename'. | |
void | readMeshSize (std::string filename, std::string delimiter) |
Reading mesh size. | |
void | partitionMesh (bool partitionDistance=false) |
Partition mesh according to number of processors. Partition with parmetis. | |
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(...) | |
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 top of that. | |
void | initWithDomain (DomainPtr_Type domainsP1) |
Initialize domain with already existing domain. | |
void | setMesh (MeshUnstrPtr_Type meshUnstr) |
Settng mesh from domain. | |
void | initDummyMesh (MapPtr_Type map) |
Initialize dummy mesh for i.e. lagrange multiplier that only represents on 'point' in that sense. i.e. for setting pressure mean value in P2-P1 stokes problem. This is necassary if a variable does not live on a mesh. | |
void | buildUniqueInterfaceMaps () |
Build unique node and dof interfaceMap in interface numbering. | |
void | setPartialCoupling (int flag, std::string type) |
Set partial coupling. | |
void | buildGlobalInterfaceMaps () |
Build interface maps with global numbering with indicesGlobalMatchedUnique_. | |
void | buildInterfaceMaps () |
Build interface maps. | |
MapConstPtr_Type | getInterfaceMapUnique () const |
Get interface map unique. | |
MapConstPtr_Type | getInterfaceMapVecFieldUnique () const |
Get interface vector field map unique. | |
MapConstPtr_Type | getGlobalInterfaceMapVecFieldPartial () const |
Get global interface map vector field partial. | |
MapConstPtr_Type | getOtherGlobalInterfaceMapVecFieldPartial () const |
Get other global interface map vec field partial. | |
MapConstPtr_Type | getGlobalInterfaceMapUnique () const |
Get interface map unique (for fsi coupling block c4) | |
MapConstPtr_Type | getGlobalInterfaceMapVecFieldUnique () const |
Get interface vec field map unique (for fsi coupling block c4) | |
MapConstPtr_Type | getOtherGlobalInterfaceMapVecFieldUnique () const |
Get other interface vec field map unique (for fsi coupling block c4) | |
GO | getNumElementsGlobal () const |
Get global number of elements. | |
LO | getNumElements () const |
Get local number of elements (on your processor) | |
LO | getNumPoints (std::string type="Unique") const |
Get local number of points of type 'type' (unique/repeated) | |
int | checkGeomentry (std::string MeshType, int dim) const |
Checks geometriy. | |
void | identifyInterfaceParallelAndDistance (DomainPtr_Type domainOther, vec_int_Type interfaceID_vec) |
Itentify interface parallal and distance. | |
void | calculateDistancesToInterface () |
Calculate distance to interface. | |
vec_dbl_ptr_Type | getDistancesToInterface () const |
Get distances to interface. | |
void | partitionDistanceToInterface () |
Partition distance to interface. | |
void | setReferenceConfiguration () |
Set reference configuration. | |
void | moveMesh (MultiVectorPtr_Type displacementUnique, MultiVectorPtr_Type displacementRepeated) |
Move mesh according to displacement (i.e. used in FSI) | |
MeshPtr_Type | getMesh () |
Get mesh. | |
MeshConstPtr_Type | getMesh () const |
Get mesh constant. | |
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 becomes the type 'MeshUnstructured' and needs to be initialized. | |
void | toNodeID (UN dim, GO dofID, GO &nodeID, LO &localDofNumber) |
Hilfsfunktion fuer buildLocalInterfaceIDInGlobal(). Gibt fuer eine gegebene nodeID die entsprechende dofID und umgekehrt. localDofNumber entspricht dem Rest der Division, also ob es sich um die x- (=0), y- (=1) oder z-Komponente (=2) handelt. | |
void | toDofID (UN dim, GO nodeID, LO localDofNumber, GO &dofID) |
Hilfsfunktion fuer buildLocalInterfaceIDInGlobal(). Gibt fuer eine gegebene nodeID die entsprechende dofID und umgekehrt. localDofNumber entspricht dem Rest der Division, also ob es sich um die x- (=0), y- (=1) oder z-Komponente (=2) handelt. | |
vec_long_Type | getLocalInterfaceIDInGlobal () const |
Get local interface id in global. | |
void | setDummyInterfaceDomain (DomainPtr_Type domain) |
Set dummy interface domain. | |
int | findInPointsUnique (const vec_dbl_Type &x) const |
Find in points unique. | |
MultiVectorPtr_Type | getNodeListMV () const |
Get node list in multi vector point. | |
void | exportMesh (bool exportEdges=false, bool exportSurfaces=false, std::string exportMesh="export.mesh") |
Exporting Mesh. | |
void | preProcessMesh (bool correctSurfaceNormals, bool correctElementDirection) |
Option of preprocessing mesh by making consistent outward normal and/or consistent element orientation, where we always have positive det of transformation to reference element. | |
void | exportElementFlags (std::string name="default") |
Exporting Paraview file displaying element flags of the underlying mesh. | |
void | exportNodeFlags (std::string name="default") |
Exporting Paraview file displaying node flags of the underlying mesh. | |
void | exportSurfaceNormals (std::string name="default") |
Exporting Paraview file displaying surface normals of the underlying mesh. As we are generally not able to plot only the surfaces, the normals are displayed in each node. This means, that at corners, the visualization is incorrect (i.e. node belongs to surfaces which are in different directions) | |
void | exportElementOrientation (std::string name="default") |
Exporting Paraview file displaying element volume of underlying mesh. | |
Domain::Domain | ( | CommConstPtr_Type | comm | ) |
Constructor.
[in] | comm |
Domain::Domain | ( | CommConstPtr_Type | comm, |
int | dimension ) |
Constructor.
[in] | comm | |
[in] | dimension |
Domain::Domain | ( | vec_dbl_Type | coor, |
double | l, | ||
double | h, | ||
CommConstPtr_Type | comm ) |
Constructor for 2D structured meshes build in FEDDLib.
[in] | coor | |
[in] | l | |
[in] | h | |
[in] | comm |
Domain::Domain | ( | vec_dbl_Type | coor, |
double | l, | ||
double | w, | ||
double | h, | ||
CommConstPtr_Type | comm ) |
Constructor for 3D strucutred meshes build in FEDDLib.
[in] | coor | |
[in] | l | length |
[in] | w | width |
[in] | h | height |
[in] | comm |
void Domain::buildMesh | ( | int | flags, |
std::string | meshType, | ||
int | dim, | ||
std::string | FEType, | ||
int | N, | ||
int | M, | ||
int | numProcsCoarseSolve = 0 ) |
Build structured mesh in FEDDLib.
[in] | flags | |
[in] | meshType | |
[in] | dim | |
[in] | FEType | discretization |
[in] | N | |
[in] | M | |
[in] | numProcsCoarseSolve |
void Domain::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 top of that.
[in] | domainP1 | the domain with the mesh we read from .mesh file |
int Domain::checkGeomentry | ( | std::string | MeshType, |
int | dim ) const |
Checks geometriy.
[in] | MeshType | |
[in] | dim |
void Domain::exportElementFlags | ( | std::string | name = "default" | ) |
Exporting Paraview file displaying element flags of the underlying mesh.
name |
void Domain::exportElementOrientation | ( | std::string | name = "default" | ) |
Exporting Paraview file displaying element volume of underlying mesh.
name | export suffix to identify flags |
void Domain::exportNodeFlags | ( | std::string | name = "default" | ) |
Exporting Paraview file displaying node flags of the underlying mesh.
name | export suffix to identify flags |
void Domain::exportSurfaceNormals | ( | std::string | name = "default" | ) |
Exporting Paraview file displaying surface normals of the underlying mesh. As we are generally not able to plot only the surfaces, the normals are displayed in each node. This means, that at corners, the visualization is incorrect (i.e. node belongs to surfaces which are in different directions)
name | export suffix to identify flags |
int Domain::findInPointsUnique | ( | const vec_dbl_Type & | x | ) | const |
Find in points unique.
[in] | x | point to be found in unique nodes |
LO Domain::getApproxEntriesPerRow | ( | ) | const |
Estimate depending on FEType and dimension for the numer of entries in system matrix, as approximate number of entries is requiered for matrix initialization. This serves as a upper bound.
vec_int_ptr_Type Domain::getBCFlagRepeated | ( | ) | const |
Get vector of the flags corrsponding to the repeated points (on your processor)
vec_int_ptr_Type Domain::getBCFlagUnique | ( | ) | const |
Get vector of the flags corrsponding to the unique points (on your processor)
Domain< SC, LO, GO, NO >::CommConstPtr_Type Domain::getComm | ( | ) | const |
Communicator.
UN Domain::getDimension | ( | ) | const |
Get dimension.
vec_dbl_ptr_Type Domain::getDistancesToInterface | ( | ) | const |
Get distances to interface.
Domain< SC, LO, GO, NO >::MapConstPtr_Type Domain::getEdgeMap | ( | ) | const |
Get map of edges.
Domain< SC, LO, GO, NO >::MapConstPtr_Type Domain::getElementMap | ( | ) | const |
Get map of elements.
vec2D_int_ptr_Type Domain::getElements | ( | ) | const |
Get the elements (on your processor) as vector data type.
Domain< SC, LO, GO, NO >::ElementsPtr_Type Domain::getElementsC | ( | ) | const |
Get the elements (on your processor) as Elements_Type.
vec_int_ptr_Type Domain::getElementsFlag | ( | ) | const |
Returns flags of elements as vector of type int.
std::string Domain::getFEType | ( | ) | const |
Finite element discretization. Represented as string, i.e., P2.
Domain< SC, LO, GO, NO >::MapConstPtr_Type Domain::getGlobalInterfaceMapUnique | ( | ) | const |
Get interface map unique (for fsi coupling block c4)
|
inline |
Get global interface map vector field partial.
Domain< SC, LO, GO, NO >::MapConstPtr_Type Domain::getGlobalInterfaceMapVecFieldUnique | ( | ) | const |
Get interface vec field map unique (for fsi coupling block c4)
Domain< SC, LO, GO, NO >::MapConstPtr_Type Domain::getInterfaceMapUnique | ( | ) | const |
Get interface map unique.
Domain< SC, LO, GO, NO >::MapConstPtr_Type Domain::getInterfaceMapVecFieldUnique | ( | ) | const |
Get interface vector field map unique.
vec_long_Type Domain::getLocalInterfaceIDInGlobal | ( | ) | const |
Get local interface id in global.
Domain< SC, LO, GO, NO >::MapConstPtr_Type Domain::getMapRepeated | ( | ) | const |
Get map of all repeated (not uniquely distributed) nodes of processors.
Domain< SC, LO, GO, NO >::MapConstPtr_Type Domain::getMapUnique | ( | ) | const |
Get map of all uniquely distributed nodes of the processors.
Domain< SC, LO, GO, NO >::MapConstPtr_Type Domain::getMapVecFieldRepeated | ( | ) | const |
brief Get map of all repeated (not uniquely distributed) nodes of processors in a vector field point of view. Here, a node has more than one degree of freedom. For Example in with dofs=2: 1_x , 1_y , 2_x , 2_y ,... . This degree of freedom map captures this.
Domain< SC, LO, GO, NO >::MapConstPtr_Type Domain::getMapVecFieldUnique | ( | ) | const |
Get map of all unique (not uniquely distributed) nodes of processors in a vector field point of view. Here, a node has more than one degree of freedom. For Example in with dofs=2: 1_x , 1_y , 2_x , 2_y ,... . This degree of freedom map captures this.
Domain< SC, LO, GO, NO >::MeshPtr_Type Domain::getMesh | ( | ) |
Get mesh.
Domain< SC, LO, GO, NO >::MeshConstPtr_Type Domain::getMesh | ( | ) | const |
Get mesh constant.
Domain< SC, LO, GO, NO >::MultiVectorPtr_Type Domain::getNodeListMV | ( | ) | const |
Get node list in multi vector point.
[in] | nodeListMV |
LO Domain::getNumElements | ( | ) | const |
Get local number of elements (on your processor)
GO Domain::getNumElementsGlobal | ( | ) | const |
Get global number of elements.
LO Domain::getNumPoints | ( | std::string | type = "Unique" | ) | const |
Get local number of points of type 'type' (unique/repeated)
|
inline |
Get other global interface map vec field partial.
Domain< SC, LO, GO, NO >::MapConstPtr_Type Domain::getOtherGlobalInterfaceMapVecFieldUnique | ( | ) | const |
Get other interface vec field map unique (for fsi coupling block c4)
vec2D_dbl_ptr_Type Domain::getPointsRepeated | ( | ) | const |
Get vector of repeated points (on your processor). 2D Vector with size: numPoints x dim.
vec2D_dbl_ptr_Type Domain::getPointsUnique | ( | ) | const |
Get vector of unique points (on your processor). 2D Vector with size: numPoints x dim.
void Domain::identifyInterfaceParallelAndDistance | ( | DomainPtr_Type | domainOther, |
vec_int_Type | interfaceID_vec ) |
Itentify interface parallal and distance.
[in] | domainOther | |
[in] | interfaceID_vec |
void Domain::initDummyMesh | ( | MapPtr_Type | map | ) |
Initialize dummy mesh for i.e. lagrange multiplier that only represents on 'point' in that sense. i.e. for setting pressure mean value in P2-P1 stokes problem. This is necassary if a variable does not live on a mesh.
This function might not be necassary in the long run.
[in] | map | for this dummy mesh. Maybe the mesh only represents one point (i.e. for lagrange mp). |
void Domain::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 becomes the type 'MeshUnstructured' and needs to be initialized.
[in] | dimension | |
[in] | FEType | |
[in] | volumeID |
void Domain::initWithDomain | ( | DomainPtr_Type | domainsP1 | ) |
Initialize domain with already existing domain.
[in] | domainP1 | the domain with the mesh we read from .mesh file |
void Domain::moveMesh | ( | MultiVectorPtr_Type | displacementUnique, |
MultiVectorPtr_Type | displacementRepeated ) |
Move mesh according to displacement (i.e. used in FSI)
[in] | displacementUnique | |
[in] | displacementRepeated |
void Domain::partitionMesh | ( | bool | partitionDistance = false | ) |
Partition mesh according to number of processors. Partition with parmetis.
[in] | partitionDistance |
void Domain::preProcessMesh | ( | bool | correctSurfaceNormals, |
bool | correctElementDirection ) |
Option of preprocessing mesh by making consistent outward normal and/or consistent element orientation, where we always have positive det of transformation to reference element.
correctSurfaceNormals | bool for normal direction |
correctElementDirection | bool for surface direction |
void Domain::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(...)
[in] | filename | |
[in] | delimiter | |
[in] | dim | |
[in] | FEType | |
[in] | volumeID | element flag |
void FEDD::Domain< SC, LO, GO, NO >::readMesh | ( | std::string | filename, |
std::string | delimiter, | ||
int | dim, | ||
std::string | FEType, | ||
int | volumeID = 10 ) |
Reading mesh from .mesh file with name 'filename'.
[in] | filename | |
[in] | delimiter | |
[in] | dim | |
[in] | FEType | |
[in] | volumeID | element flag |
void Domain::readMeshSize | ( | std::string | filename, |
std::string | delimiter ) |
Reading mesh size.
[in] | filename | |
[in] | delimiter |
void Domain::setDummyInterfaceDomain | ( | DomainPtr_Type | domain | ) |
Set dummy interface domain.
[in] | domain |
void Domain::setMesh | ( | MeshUnstrPtr_Type | meshUnstr | ) |
Settng mesh from domain.
[in] | meshUnstr | mesh of MeshUnstr_Type which is generally the type of meshes from .mesh files |
void Domain::setPartialCoupling | ( | int | flag, |
std::string | type ) |
Set partial coupling.
[in] | flag | |
[in] | type |