![]() |
v0.13.1 |
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) |
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... | |
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 marent More... | |
auto & | getBitAdjEnt () |
bit ref level for parent More... | |
auto & | getBitAdjEntMask () |
bit ref level for parent marent 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 () |
template<int DIM = -1> | |
MoFEMErrorCode | setParentAdjacency () |
template<> | |
MoFEMErrorCode | setSkeletonAdjacency () |
template<> | |
MoFEMErrorCode | setSkeletonAdjacency () |
template<> | |
MoFEMErrorCode | setSkeletonAdjacency () |
template<> | |
MoFEMErrorCode | setParentAdjacency () |
template<> | |
MoFEMErrorCode | setParentAdjacency () |
template<> | |
MoFEMErrorCode | setParentAdjacency () |
Private Attributes | |
MoFEM::Core & | cOre |
BitRefLevel | bitLevel |
BitRefLevel of the probelm. More... | |
BitRefLevel | bitLevelMask |
BitRefLevel of the probelm. 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 marent More... | |
BitRefLevel | bitAdjEnt |
bit ref level for parent More... | |
BitRefLevel | bitAdjEntMask |
bit ref level for parent marent 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::multimap< std::string, std::pair< int, Range > > | fieldsOrder |
fields order More... | |
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 |
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 35 of file Simple.hpp.
MoFEM::Simple::Simple | ( | const MoFEM::Core & | core | ) |
Definition at line 276 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 396 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 434 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 378 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 845 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 414 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::buildFields | ( | ) |
Build fields.
Definition at line 601 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::buildFiniteElements | ( | ) |
Build finite elements.
Definition at line 713 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::buildProblem | ( | ) |
Build problem.
Definition at line 739 of file Simple.cpp.
|
private |
Definition at line 854 of file Simple.cpp.
|
private |
Definition at line 901 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::defineFiniteElements | ( | ) |
Define finite elements.
Definition at line 497 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::defineProblem | ( | const PetscBool | is_partitioned = PETSC_TRUE | ) |
define problem
Definition at line 569 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::deleteDM | ( | ) |
MoFEMErrorCode MoFEM::Simple::deleteFiniteElements | ( | ) |
Delete finite elements.
Definition at line 833 of file Simple.cpp.
|
private |
Definition at line 935 of file Simple.cpp.
bool & MoFEM::Simple::getAddBoundaryFE | ( | ) |
Get the addSkeletonFE.
If variable set to true, boundary element is created regardless field on skelton is added or not.
Definition at line 416 of file Simple.hpp.
bool & MoFEM::Simple::getAddSkeletonFE | ( | ) |
Get the addSkeletonFE.
If variable set to true, skeleton element is created regardless field on skelton is added or not.
Definition at line 405 of file Simple.hpp.
auto & MoFEM::Simple::getBitAdjEnt | ( | ) |
auto & MoFEM::Simple::getBitAdjEntMask | ( | ) |
auto & MoFEM::Simple::getBitAdjParent | ( | ) |
auto & MoFEM::Simple::getBitAdjParentMask | ( | ) |
BitRefLevel & MoFEM::Simple::getBitRefLevel | ( | ) |
BitRefLevel & MoFEM::Simple::getBitRefLevelMask | ( | ) |
std::string & MoFEM::Simple::getBoundaryFEName | ( | ) |
const std::string MoFEM::Simple::getBoundaryFEName | ( | ) | const |
Get the Boundary FE Name.
Definition at line 328 of file Simple.hpp.
EntityHandle & MoFEM::Simple::getBoundaryMeshSet | ( | ) |
int MoFEM::Simple::getDim | ( | ) | const |
Get the problem dimension.
Problem dimension is determined by highest dimension of entities on the mesh.
Definition at line 272 of file Simple.hpp.
SmartPetscObj< DM > MoFEM::Simple::getDM | ( | ) |
Return smart DM object.
Definition at line 262 of file Simple.hpp.
MoFEMErrorCode MoFEM::Simple::getDM | ( | DM * | dm | ) |
Get DM.
dm | discrete manager |
Definition at line 810 of file Simple.cpp.
std::string & MoFEM::Simple::getDomainFEName | ( | ) |
const std::string MoFEM::Simple::getDomainFEName | ( | ) | const |
Get the Domain FE Name.
Definition at line 321 of file Simple.hpp.
EntityHandle & MoFEM::Simple::getMeshSet | ( | ) |
MoFEMErrorCode MoFEM::Simple::getOptions | ( | ) |
get options
Definition at line 294 of file Simple.cpp.
std::vector< std::string > & MoFEM::Simple::getOtherFiniteElements | ( | ) |
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 380 of file Simple.hpp.
bool & MoFEM::Simple::getParentAdjacencies | ( | ) |
Get the addParentAdjacencies.
If set true add parent adjacencies
Definition at line 426 of file Simple.hpp.
std::string & MoFEM::Simple::getProblemName | ( | ) |
const std::string MoFEM::Simple::getProblemName | ( | ) | const |
Get the Problem Name.
Definition at line 342 of file Simple.hpp.
std::string & MoFEM::Simple::getSkeletonFEName | ( | ) |
const std::string MoFEM::Simple::getSkeletonFEName | ( | ) | const |
Get the Skeleton FE Name.
Definition at line 335 of file Simple.hpp.
EntityHandle & MoFEM::Simple::getSkeletonMeshSet | ( | ) |
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 364 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 308 of file Simple.cpp.
|
virtual |
MoFEMErrorCode MoFEM::Simple::removeBoundaryField | ( | const std::string & | name | ) |
Remove field form boundary.
name |
Definition at line 467 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::removeDomainField | ( | const std::string & | name | ) |
Remove field form domain.
name |
Definition at line 451 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::removeSkeletonField | ( | const std::string & | name | ) |
Remove field form skeleton.
name |
Definition at line 482 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 776 of file Simple.cpp.
void MoFEM::Simple::setDim | ( | int | dim | ) |
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 593 of file Simple.cpp.
|
private |
Definition at line 190 of file Simple.cpp.
|
private |
Definition at line 221 of file Simple.cpp.
|
private |
Definition at line 246 of file Simple.cpp.
|
private |
Definition at line 185 of file Simple.cpp.
|
private |
Definition at line 33 of file Simple.cpp.
|
private |
Definition at line 99 of file Simple.cpp.
|
private |
Definition at line 170 of file Simple.cpp.
|
private |
Definition at line 28 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::setSkeletonAdjacency | ( | int | dim = -1 | ) |
Set the skeleton adjacency object.
dim |
Definition at line 261 of file Simple.cpp.
MoFEMErrorCode MoFEM::Simple::setUp | ( | const PetscBool | is_partitioned = PETSC_TRUE | ) |
Setup problem.
Definition at line 753 of file Simple.cpp.
|
private |
Add boundary FE.
Definition at line 489 of file Simple.hpp.
|
private |
If set to true parent adjacencies are build.
Definition at line 490 of file Simple.hpp.
|
private |
Add skeleton FE.
Definition at line 488 of file Simple.hpp.
|
private |
bit ref level for parent
Definition at line 494 of file Simple.hpp.
|
private |
bit ref level for parent marent
Definition at line 495 of file Simple.hpp.
|
private |
bit ref level for parent
Definition at line 492 of file Simple.hpp.
|
private |
bit ref level for parent marent
Definition at line 493 of file Simple.hpp.
|
private |
BitRefLevel of the probelm.
Definition at line 474 of file Simple.hpp.
|
private |
BitRefLevel of the probelm.
Definition at line 475 of file Simple.hpp.
|
private |
boundary finite element
Definition at line 509 of file Simple.hpp.
|
private |
boundary fields
Definition at line 498 of file Simple.hpp.
|
private |
meshset with boundary
Definition at line 485 of file Simple.hpp.
|
private |
Definition at line 472 of file Simple.hpp.
|
private |
Data fields.
Definition at line 500 of file Simple.hpp.
|
private |
dimension of problem
Definition at line 515 of file Simple.hpp.
|
private |
Discrete manager (interface to PETSc/MoFEM functions)
Definition at line 518 of file Simple.hpp.
|
private |
domain finite element
Definition at line 508 of file Simple.hpp.
|
private |
domain fields
Definition at line 497 of file Simple.hpp.
|
private |
fields order
Definition at line 505 of file Simple.hpp.
|
private |
mesh file name
Definition at line 514 of file Simple.hpp.
|
private |
domain meshset
Definition at line 484 of file Simple.hpp.
|
private |
Definition at line 479 of file Simple.hpp.
|
private |
Definition at line 480 of file Simple.hpp.
|
private |
Definition at line 481 of file Simple.hpp.
|
private |
Definition at line 482 of file Simple.hpp.
|
private |
Definition at line 478 of file Simple.hpp.
|
private |
Definition at line 477 of file Simple.hpp.
|
private |
problem name
Definition at line 507 of file Simple.hpp.
|
private |
NOFIELD field name.
Definition at line 502 of file Simple.hpp.
|
private |
NOFIELD field name.
Definition at line 501 of file Simple.hpp.
|
private |
Other finite elements.
Definition at line 512 of file Simple.hpp.
|
private |
Definition at line 533 of file Simple.hpp.
|
private |
Definition at line 531 of file Simple.hpp.
|
private |
Definition at line 529 of file Simple.hpp.
|
private |
skeleton finite element
Definition at line 510 of file Simple.hpp.
|
private |
fields on the skeleton
Definition at line 499 of file Simple.hpp.
|
private |
skeleton meshset with boundary
Definition at line 486 of file Simple.hpp.