![]() |
v0.14.0 |
Simple interface for fast problem set-up. More...
#include <src/interfaces/Simple.hpp>
Public Member Functions | |
MoFEMErrorCode | query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const |
Simple (const MoFEM::Core &core) | |
virtual | ~Simple ()=default |
MoFEMErrorCode | getOptions () |
get options More... | |
MoFEMErrorCode | loadFile (const std::string options, const std::string mesh_file_name) |
Load mesh file. More... | |
MoFEMErrorCode | loadFile (const std::string mesh_file_name="") |
Load mesh file with parallel options if number of cores > 1. More... | |
MoFEMErrorCode | addDomainField (const std::string &name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_ZERO, int verb=-1) |
Add field on domain. More... | |
MoFEMErrorCode | addBoundaryField (const std::string &name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_ZERO, int verb=-1) |
Add field on boundary. More... | |
MoFEMErrorCode | addSkeletonField (const std::string &name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_ZERO, int verb=-1) |
Add field on skeleton. More... | |
MoFEMErrorCode | addDataField (const std::string &name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_ZERO, int verb=-1) |
Add field on domain. More... | |
MoFEMErrorCode | removeDomainField (const std::string &name) |
Remove field form domain. More... | |
MoFEMErrorCode | removeBoundaryField (const std::string &name) |
Remove field form boundary. More... | |
MoFEMErrorCode | removeSkeletonField (const std::string &name) |
Remove field form skeleton. More... | |
MoFEMErrorCode | defineFiniteElements () |
Define finite elements. More... | |
MoFEMErrorCode | defineProblem (const PetscBool is_partitioned=PETSC_TRUE) |
define problem More... | |
MoFEMErrorCode | setFieldOrder (const std::string field_name, const int order, const Range *ents=NULL) |
Set field order. More... | |
MoFEMErrorCode | buildFields () |
Build fields. More... | |
MoFEMErrorCode | buildFiniteElements () |
Build finite elements. More... | |
MoFEMErrorCode | setSkeletonAdjacency (int dim=-1, std::string fe_name="") |
Set the skeleton adjacency object. More... | |
MoFEMErrorCode | buildProblem () |
Build problem. More... | |
MoFEMErrorCode | setUp (const PetscBool is_partitioned=PETSC_TRUE) |
Setup problem. More... | |
MoFEMErrorCode | reSetUp (bool only_dm=false) |
Rebuild internal MoFEM data structures. More... | |
MoFEMErrorCode | getDM (DM *dm) |
Get DM. More... | |
SmartPetscObj< DM > | getDM () |
Return smart DM object. More... | |
int | getDim () const |
Get the problem dimension. More... | |
void | setDim (int dim) |
Set the problem dimension. More... | |
DEPRECATED EntityHandle & | getMeshSet () |
EntityHandle & | getMeshset () |
Get the MeshSet object. More... | |
EntityHandle & | getBoundaryMeshSet () |
Get the BoundaryMeshSet object. More... | |
EntityHandle & | getSkeletonMeshSet () |
Get the SkeletonMeshSet object. More... | |
BitRefLevel & | getBitRefLevel () |
Get the BitRefLevel. More... | |
BitRefLevel & | getBitRefLevelMask () |
Get the BitRefLevel. More... | |
const std::string | getDomainFEName () const |
Get the Domain FE Name. More... | |
const std::string | getBoundaryFEName () const |
Get the Boundary FE Name. More... | |
const std::string | getSkeletonFEName () const |
Get the Skeleton FE Name. More... | |
const std::string | getProblemName () const |
Get the Problem Name. More... | |
std::string & | getDomainFEName () |
Get the Domain FE Name. More... | |
std::string & | getBoundaryFEName () |
Get the Boundary FE Name. More... | |
std::string & | getSkeletonFEName () |
Get the Skeleton FE Name. More... | |
std::string & | getProblemName () |
Get the Problem Name. More... | |
std::vector< std::string > & | getOtherFiniteElements () |
Get the Other Finite Elements. More... | |
MoFEMErrorCode | deleteDM () |
Delete dm. More... | |
MoFEMErrorCode | deleteFiniteElements () |
Delete finite elements. More... | |
bool & | getAddSkeletonFE () |
Get the addSkeletonFE. More... | |
bool & | getAddBoundaryFE () |
Get the addSkeletonFE. More... | |
bool & | getParentAdjacencies () |
Get the addParentAdjacencies. More... | |
auto & | getBitAdjParent () |
bit ref level for parent More... | |
auto & | getBitAdjParentMask () |
bit ref level for parent parent More... | |
auto & | getBitAdjEnt () |
bit ref level for parent More... | |
auto & | getBitAdjEntMask () |
bit ref level for parent parent More... | |
MoFEMErrorCode | addFieldToEmptyFieldBlocks (const std::string row_field, const std::string col_field) const |
add empty block to problem More... | |
![]() | |
virtual MoFEMErrorCode | query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const =0 |
template<class IFACE > | |
MoFEMErrorCode | registerInterface (bool error_if_registration_failed=true) |
Register interface. More... | |
template<class IFACE > | |
MoFEMErrorCode | getInterface (IFACE *&iface) const |
Get interface refernce to pointer of interface. More... | |
template<class IFACE > | |
MoFEMErrorCode | getInterface (IFACE **const iface) const |
Get interface pointer to pointer of interface. More... | |
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0> | |
IFACE | getInterface () const |
Get interface pointer to pointer of interface. More... | |
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0> | |
IFACE | getInterface () const |
Get reference to interface. More... | |
template<class IFACE > | |
IFACE * | getInterface () const |
Function returning pointer to interface. More... | |
virtual | ~UnknownInterface ()=default |
Private Member Functions | |
MoFEMErrorCode | createBoundaryMeshset () |
MoFEMErrorCode | createSkeletonMeshset () |
MoFEMErrorCode | exchangeGhostCells () |
template<int DIM = -1> | |
MoFEMErrorCode | setSkeletonAdjacency (std::string fe_name) |
template<int DIM = -1> | |
MoFEMErrorCode | setParentAdjacency () |
template<> | |
MoFEMErrorCode | setSkeletonAdjacency (std::string fe_name) |
template<> | |
MoFEMErrorCode | setSkeletonAdjacency (std::string fe_name) |
template<> | |
MoFEMErrorCode | setSkeletonAdjacency (std::string fe_name) |
template<> | |
MoFEMErrorCode | setParentAdjacency () |
template<> | |
MoFEMErrorCode | setParentAdjacency () |
template<> | |
MoFEMErrorCode | setParentAdjacency () |
Private Attributes | |
MoFEM::Core & | cOre |
BitRefLevel | bitLevel |
BitRefLevel of the problem. More... | |
BitRefLevel | bitLevelMask |
BitRefLevel of the problem. More... | |
PetscLogEvent | MOFEM_EVENT_SimpleSetUP |
PetscLogEvent | MOFEM_EVENT_SimpleLoadMesh |
PetscLogEvent | MOFEM_EVENT_SimpleBuildFields |
PetscLogEvent | MOFEM_EVENT_SimpleBuildFiniteElements |
PetscLogEvent | MOFEM_EVENT_SimpleBuildProblem |
PetscLogEvent | MOFEM_EVENT_SimpleKSPSolve |
EntityHandle | meshSet |
domain meshset More... | |
EntityHandle | boundaryMeshset |
meshset with boundary More... | |
EntityHandle | skeletonMeshset |
skeleton meshset with boundary More... | |
bool | addSkeletonFE |
Add skeleton FE. More... | |
bool | addBoundaryFE |
Add boundary FE. More... | |
bool | addParentAdjacencies |
If set to true parent adjacencies are build. More... | |
BitRefLevel | bitAdjParent |
bit ref level for parent More... | |
BitRefLevel | bitAdjParentMask |
bit ref level for parent parent More... | |
BitRefLevel | bitAdjEnt |
bit ref level for parent More... | |
BitRefLevel | bitAdjEntMask |
bit ref level for parent parent More... | |
std::vector< std::string > | domainFields |
domain fields More... | |
std::vector< std::string > | boundaryFields |
boundary fields More... | |
std::vector< std::string > | skeletonFields |
fields on the skeleton More... | |
std::vector< std::string > | dataFields |
Data fields. More... | |
std::vector< std::string > | noFieldFields |
NOFIELD field name. More... | |
std::vector< std::string > | noFieldDataFields |
NOFIELD field name. More... | |
std::list< std::tuple< std::string, int, Range, bool > > | fieldsOrder |
std::string | nameOfProblem |
problem name More... | |
std::string | domainFE |
domain finite element More... | |
std::string | boundaryFE |
boundary finite element More... | |
std::string | skeletonFE |
skeleton finite element More... | |
std::vector< std::string > | otherFEs |
Other finite elements. More... | |
char | meshFileName [255] |
mesh file name More... | |
int | dIm |
dimension of problem More... | |
SmartPetscObj< DM > | dM |
Discrete manager (interface to PETSc/MoFEM functions) More... | |
boost::shared_ptr< ParentFiniteElementAdjacencyFunction< 3 > > | parentAdjFunctionDim3 |
boost::shared_ptr< ParentFiniteElementAdjacencyFunction< 2 > > | parentAdjFunctionDim2 |
boost::shared_ptr< ParentFiniteElementAdjacencyFunction< 1 > > | parentAdjFunctionDim1 |
boost::shared_ptr< ParentFiniteElementAdjacencyFunctionSkeleton< 2 > > | parentAdjSkeletonFunctionDim2 |
boost::shared_ptr< ParentFiniteElementAdjacencyFunctionSkeleton< 1 > > | parentAdjSkeletonFunctionDim1 |
Additional Inherited Members | |
![]() | |
static MoFEMErrorCode | getLibVersion (Version &version) |
Get library version. More... | |
static MoFEMErrorCode | getFileVersion (moab::Interface &moab, Version &version) |
Get database major version. More... | |
static MoFEMErrorCode | setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD)) |
Get database major version. More... | |
static MoFEMErrorCode | getInterfaceVersion (Version &version) |
Get database major version. More... | |
Simple interface for fast problem set-up.
Definition at line 27 of file Simple.hpp.
MoFEM::Simple::Simple | ( | const MoFEM::Core & | core | ) |
Definition at line 162 of file Simple.cpp.
|
virtualdefault |
MoFEMErrorCode MoFEM::Simple::addBoundaryField | ( | const std::string & | name, |
const FieldSpace | space, | ||
const FieldApproximationBase | base, | ||
const FieldCoefficientsNumber | nb_of_coefficients, | ||
const TagType | tag_type = MB_TAG_SPARSE , |
||
const enum MoFEMTypes | bh = MF_ZERO , |
||
int | verb = -1 |
||
) |
Add field on boundary.
name | name of the filed |
space | space (L2,H1,Hdiv,Hcurl) |
base | approximation base, see FieldApproximationBase |
nb_of_coefficients | number of field coefficients |
tag_type | type of the tag MB_TAG_DENSE or MB_TAG_SPARSE (DENSE is faster and uses less memory, SPARSE is more flexible if you define field on subdomains) |
bh | if MF_EXCL throws error if field exits, MF_ZERO no error if field exist |
verb | verbosity level |
Definition at line 282 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::addDataField | ( | const std::string & | name, |
const FieldSpace | space, | ||
const FieldApproximationBase | base, | ||
const FieldCoefficientsNumber | nb_of_coefficients, | ||
const TagType | tag_type = MB_TAG_SPARSE , |
||
const enum MoFEMTypes | bh = MF_ZERO , |
||
int | verb = -1 |
||
) |
Add field on domain.
name | name of the filed |
space | space (L2,H1,Hdiv,Hcurl) |
base | approximation base, see FieldApproximationBase |
nb_of_coefficients | number of field coefficients |
tag_type | type of the tag MB_TAG_DENSE or MB_TAG_SPARSE (DENSE is faster and uses less memory, SPARSE is more flexible if you define field on subdomains) |
bh | if MF_EXCL throws error if field exits, MF_ZERO no error if field exist |
verb | verbosity level |
Definition at line 320 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::addDomainField | ( | const std::string & | name, |
const FieldSpace | space, | ||
const FieldApproximationBase | base, | ||
const FieldCoefficientsNumber | nb_of_coefficients, | ||
const TagType | tag_type = MB_TAG_SPARSE , |
||
const enum MoFEMTypes | bh = MF_ZERO , |
||
int | verb = -1 |
||
) |
Add field on domain.
name | name of the filed |
space | space (L2,H1,Hdiv,Hcurl) |
base | approximation base, see FieldApproximationBase |
nb_of_coefficients | number of field coefficients |
tag_type | type of the tag MB_TAG_DENSE or MB_TAG_SPARSE (DENSE is faster and uses less memory, SPARSE is more flexible if you define field on subdomains) |
bh | if MF_EXCL throws error if field exits, MF_ZERO no error if field exist |
verb | verbosity level |
Definition at line 264 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::addFieldToEmptyFieldBlocks | ( | const std::string | row_field, |
const std::string | col_field | ||
) | const |
add empty block to problem
MatrixManager assumes that all blocks, i.e. all fields combinations are non zero. This is not always the case, to optimise code and reduce memory usage user can specifi which blocks are empty.
row_field | row filed name |
col_field | col field name |
Definition at line 702 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::addSkeletonField | ( | const std::string & | name, |
const FieldSpace | space, | ||
const FieldApproximationBase | base, | ||
const FieldCoefficientsNumber | nb_of_coefficients, | ||
const TagType | tag_type = MB_TAG_SPARSE , |
||
const enum MoFEMTypes | bh = MF_ZERO , |
||
int | verb = -1 |
||
) |
Add field on skeleton.
name | name of the filed |
space | space (L2,H1,Hdiv,Hcurl) |
base | approximation base, see FieldApproximationBase |
nb_of_coefficients | number of field coefficients |
tag_type | type of the tag MB_TAG_DENSE or MB_TAG_SPARSE (DENSE is faster and uses less memory, SPARSE is more flexible if you define field on subdomains) |
bh | if MF_EXCL throws error if field exits, MF_ZERO no error if field exist |
verb | verbosity level |
Definition at line 300 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::buildFields | ( | ) |
Build fields.
Definition at line 482 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::buildFiniteElements | ( | ) |
Build finite elements.
Definition at line 571 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::buildProblem | ( | ) |
Build problem.
Definition at line 597 of file Simple.cpp.
|
private |
Definition at line 711 of file Simple.cpp.
|
private |
Definition at line 758 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::defineFiniteElements | ( | ) |
Define finite elements.
Definition at line 380 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::defineProblem | ( | const PetscBool | is_partitioned = PETSC_TRUE | ) |
define problem
Definition at line 452 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::deleteDM | ( | ) |
MoFEMErrorCode MoFEM::Simple::deleteFiniteElements | ( | ) |
Delete finite elements.
Definition at line 690 of file Simple.cpp.
|
private |
get all adjacent ghosted entities
Definition at line 792 of file Simple.cpp.
|
inline |
Get the addSkeletonFE.
If variable set to true, boundary element is created regardless field on skelton is added or not.
Definition at line 422 of file Simple.hpp.
|
inline |
Get the addSkeletonFE.
If variable set to true, skeleton element is created regardless field on skelton is added or not.
Definition at line 411 of file Simple.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the BitRefLevel.
Definition at line 313 of file Simple.hpp.
|
inline |
|
inline |
|
inline |
Get the Boundary FE Name.
Definition at line 334 of file Simple.hpp.
|
inline |
|
inline |
Get the problem dimension.
Problem dimension is determined by highest dimension of entities on the mesh.
Definition at line 271 of file Simple.hpp.
|
inline |
Return smart DM object.
Definition at line 261 of file Simple.hpp.
MoFEMErrorCode MoFEM::Simple::getDM | ( | DM * | dm | ) |
Get DM.
dm | discrete manager |
Definition at line 667 of file Simple.cpp.
|
inline |
|
inline |
Get the Domain FE Name.
Definition at line 327 of file Simple.hpp.
|
inline |
|
inline |
MoFEMErrorCode MoFEM::Simple::getOptions | ( | ) |
get options
Definition at line 180 of file Simple.cpp.
|
inline |
Get the Other Finite Elements.
User can create finite elements using directly core interface and and them to simple problem by this function
Definition at line 386 of file Simple.hpp.
|
inline |
Get the addParentAdjacencies.
If set true add parent adjacencies
Definition at line 432 of file Simple.hpp.
|
inline |
|
inline |
Get the Problem Name.
Definition at line 348 of file Simple.hpp.
|
inline |
|
inline |
Get the Skeleton FE Name.
Definition at line 341 of file Simple.hpp.
|
inline |
MoFEMErrorCode MoFEM::Simple::loadFile | ( | const std::string | mesh_file_name = "" | ) |
Load mesh file with parallel options if number of cores > 1.
mesh_file_name | file name if not set default or set by command line is used. |
Definition at line 250 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::loadFile | ( | const std::string | options, |
const std::string | mesh_file_name | ||
) |
Load mesh file.
options | file load options |
mesh_file_name | file name if not set default or set by command line is used. |
Definition at line 194 of file Simple.cpp.
|
virtual |
MoFEMErrorCode MoFEM::Simple::removeBoundaryField | ( | const std::string & | name | ) |
Remove field form boundary.
name |
Definition at line 352 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::removeDomainField | ( | const std::string & | name | ) |
Remove field form domain.
name |
Definition at line 337 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::removeSkeletonField | ( | const std::string & | name | ) |
Remove field form skeleton.
name |
Definition at line 366 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::reSetUp | ( | bool | only_dm = false | ) |
Rebuild internal MoFEM data structures.
Call this function after you add field or remove it.
Definition at line 633 of file Simple.cpp.
|
inline |
MoFEMErrorCode MoFEM::Simple::setFieldOrder | ( | const std::string | field_name, |
const int | order, | ||
const Range * | ents = NULL |
||
) |
Set field order.
std::field_name | field name |
order | order |
range | of entities to which order is set (If null it sat to all entities) |
Definition at line 473 of file Simple.cpp.
|
private |
Definition at line 72 of file Simple.cpp.
|
private |
Definition at line 103 of file Simple.cpp.
|
private |
Definition at line 128 of file Simple.cpp.
|
private |
Definition at line 67 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::setSkeletonAdjacency | ( | int | dim = -1 , |
std::string | fe_name = "" |
||
) |
Set the skeleton adjacency object.
dim | |
fe_name |
Definition at line 143 of file Simple.cpp.
|
private |
Definition at line 21 of file Simple.cpp.
|
private |
Definition at line 35 of file Simple.cpp.
|
private |
Definition at line 52 of file Simple.cpp.
|
private |
Definition at line 15 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::setUp | ( | const PetscBool | is_partitioned = PETSC_TRUE | ) |
Setup problem.
Definition at line 611 of file Simple.cpp.
|
private |
Add boundary FE.
Definition at line 495 of file Simple.hpp.
|
private |
If set to true parent adjacencies are build.
Definition at line 496 of file Simple.hpp.
|
private |
Add skeleton FE.
Definition at line 494 of file Simple.hpp.
|
private |
bit ref level for parent
Definition at line 500 of file Simple.hpp.
|
private |
bit ref level for parent parent
Definition at line 501 of file Simple.hpp.
|
private |
bit ref level for parent
Definition at line 498 of file Simple.hpp.
|
private |
bit ref level for parent parent
Definition at line 499 of file Simple.hpp.
|
private |
BitRefLevel of the problem.
Definition at line 480 of file Simple.hpp.
|
private |
BitRefLevel of the problem.
Definition at line 481 of file Simple.hpp.
|
private |
boundary finite element
Definition at line 516 of file Simple.hpp.
|
private |
boundary fields
Definition at line 504 of file Simple.hpp.
|
private |
meshset with boundary
Definition at line 491 of file Simple.hpp.
|
private |
Definition at line 478 of file Simple.hpp.
|
private |
Data fields.
Definition at line 506 of file Simple.hpp.
|
private |
dimension of problem
Definition at line 522 of file Simple.hpp.
|
private |
Discrete manager (interface to PETSc/MoFEM functions)
Definition at line 525 of file Simple.hpp.
|
private |
domain finite element
Definition at line 515 of file Simple.hpp.
|
private |
domain fields
Definition at line 503 of file Simple.hpp.
fields order. 1: field name, order, range, set by range if true
Definition at line 511 of file Simple.hpp.
|
private |
mesh file name
Definition at line 521 of file Simple.hpp.
|
private |
domain meshset
Definition at line 490 of file Simple.hpp.
|
private |
Definition at line 485 of file Simple.hpp.
|
private |
Definition at line 486 of file Simple.hpp.
|
private |
Definition at line 487 of file Simple.hpp.
|
private |
Definition at line 488 of file Simple.hpp.
|
private |
Definition at line 484 of file Simple.hpp.
|
private |
Definition at line 483 of file Simple.hpp.
|
private |
problem name
Definition at line 514 of file Simple.hpp.
|
private |
NOFIELD field name.
Definition at line 508 of file Simple.hpp.
|
private |
NOFIELD field name.
Definition at line 507 of file Simple.hpp.
|
private |
Other finite elements.
Definition at line 519 of file Simple.hpp.
|
private |
Definition at line 541 of file Simple.hpp.
|
private |
Definition at line 539 of file Simple.hpp.
|
private |
Definition at line 537 of file Simple.hpp.
|
private |
Definition at line 546 of file Simple.hpp.
|
private |
Definition at line 544 of file Simple.hpp.
|
private |
skeleton finite element
Definition at line 517 of file Simple.hpp.
|
private |
fields on the skeleton
Definition at line 505 of file Simple.hpp.
|
private |
skeleton meshset with boundary
Definition at line 492 of file Simple.hpp.