Finite Element Domain Decomposition Library
FEDDLib
|
This class is responsible for setting the boundary conditions into the system and rhs. More...
#include <BCBuilder_decl.hpp>
Public Types | |
typedef unsigned | UN |
typedef Teuchos::RCP< Domain< SC, LO, GO, NO > > | DomainPtr_Type |
typedef Matrix< SC, LO, GO, NO > | Matrix_Type |
typedef Teuchos::RCP< Matrix_Type > | MatrixPtr_Type |
typedef BlockMatrix< SC, LO, GO, NO > | BlockMatrix_Type |
typedef Teuchos::RCP< BlockMatrix_Type > | BlockMatrixPtr_Type |
typedef Matrix_Type::Map_Type | Map_Type |
typedef Matrix_Type::MapPtr_Type | MapPtr_Type |
typedef Matrix_Type::MapConstPtr_Type | MapConstPtr_Type |
typedef MultiVector< SC, LO, GO, NO > | MultiVector_Type |
typedef Teuchos::RCP< MultiVector_Type > | MultiVectorPtr_Type |
typedef Teuchos::RCP< const MultiVector_Type > | MultiVectorConstPtr_Type |
typedef BlockMultiVector< SC, LO, GO, NO > | BlockMultiVector_Type |
typedef Teuchos::RCP< BlockMultiVector_Type > | BlockMultiVectorPtr_Type |
typedef FE< SC, LO, GO, NO > | FEFac_Type |
typedef Teuchos::RCP< FEFac_Type > | FEFacPtr_Type |
typedef boost::function< void(double *x, double *res, double t, const double *parameters)> | BC_func_Type |
Public Member Functions | |
void | addBC (BC_func_Type funcBC, int flag, int block, const DomainPtr_Type &domain, std::string type, int dofs) |
Adding Boundary Condition. | |
void | addBC (BC_func_Type funcBC, int flag, int block, const DomainPtr_Type &domain, std::string type, int dofs, vec_dbl_Type ¶meter_vec) |
Adding Boundary Condition with extra parameters. | |
void | addBC (BC_func_Type funcBC, int flag, int block, const DomainPtr_Type &domain, std::string type, int dofs, vec_dbl_Type ¶meter_vec, MultiVectorConstPtr_Type &externalSol) |
Adding Boundary Condition with extra parameters and vector values (i.e. when the inflow of a region is computed) | |
void | set (const BlockMatrixPtr_Type &blockMatrix, const BlockMultiVectorPtr_Type &b, double t=0.) const |
Setting bundary condtions to problem. | |
void | setRHS (const BlockMultiVectorPtr_Type &blockMV, double t=0.) const |
Setting boundary conditions to (block)vector. | |
void | setBCMinusVector (const BlockMultiVectorPtr_Type &outBlockMV, const BlockMultiVectorPtr_Type &substractBlockMV, double t=0.) const |
void | setVectorMinusBC (const BlockMultiVectorPtr_Type &outBlockMV, const BlockMultiVectorPtr_Type &substractBlockMV, double t=0.) const |
void | setDirichletBoundaryFromExternal (Teuchos::ArrayRCP< SC > &values, LO index, int loc, double time, std::string type, Teuchos::ArrayRCP< SC > valuesSubstract=Teuchos::null) const |
void | setAllDirichletZero (const BlockMultiVectorPtr_Type &blockMV) const |
void | setSystem (const BlockMatrixPtr_Type &blockMatrix) const |
Set boundary conditions to system. | |
void | setDirichletBC (const MatrixPtr_Type &matrix, int loc, int blockRow, bool isDiagonalBlock) const |
void | setLocalRowOne (const MatrixPtr_Type &matrix, LO localNode, UN dofsPerNode, int loc) const |
void | setLocalRowZero (const MatrixPtr_Type &matrix, LO localNode, UN dofsPerNode, int loc) const |
bool | blockHasDirichletBC (int block) const |
bool | blockHasDirichletBC (int block, int &loc) const |
bool | findFlag (LO flag, int block, int &loc) const |
int | dofsPerNodeAtBlock (int block) |
This class is responsible for setting the boundary conditions into the system and rhs.
SC | The scalar type. So far, this is always double, but having it as a template parameter would allow flexibily, e.g., for using complex instead |
LO | The local ordinal type. The is the index type for local indices |
GO | The global ordinal type. The is the index type for global indices |
NO | The Kokkos Node type. This would allow for performance portibility when using Kokkos. Currently, this is not used. |
When we define our test/example we add boundary conditions to the BCBuilder. These conditions match the geometry flags to boundary functions (i.e. zeroDirchlet).
Then, when 'setSystem()' or 'setRhs()' is called, the boundary conditiones are set according to the set boundary conditions.
These boundary conditions are limited to dirichlet boundary conditions.
BC Builder contains all boundary condition information of current problem.
void FEDD::BCBuilder< SC, LO, GO, NO >::addBC | ( | BC_func_Type | funcBC, |
int | flag, | ||
int | block, | ||
const DomainPtr_Type & | domain, | ||
std::string | type, | ||
int | dofs ) |
Adding Boundary Condition.
funcBC | function representing bc |
flag | flag corresponding to the funcBC |
block | diagonal block corresponding to the bc (i.e. in block systems like stokes equation) |
domain | finite element space correspong to block |
type | of bc. Dirichlet, Dirichlet_X ... |
dofs | degrees of freedom of bc (i.e. 3 for a vector valued problem) |
void FEDD::BCBuilder< SC, LO, GO, NO >::addBC | ( | BC_func_Type | funcBC, |
int | flag, | ||
int | block, | ||
const DomainPtr_Type & | domain, | ||
std::string | type, | ||
int | dofs, | ||
vec_dbl_Type & | parameter_vec ) |
Adding Boundary Condition with extra parameters.
funcBC | function representing bc |
flag | flag corresponding to the funcBC |
block | diagonal block corresponding to the bc (i.e. in block systems like stokes equation) |
domain | finite element space correspong to block |
type | of bc. Dirichlet, Dirichlet_X ... |
dofs | degrees of freedom of bc (i.e. 3 for a vector valued problem) |
parameter_vec | vector containing different parameters for bc |
void FEDD::BCBuilder< SC, LO, GO, NO >::addBC | ( | BC_func_Type | funcBC, |
int | flag, | ||
int | block, | ||
const DomainPtr_Type & | domain, | ||
std::string | type, | ||
int | dofs, | ||
vec_dbl_Type & | parameter_vec, | ||
MultiVectorConstPtr_Type & | externalSol ) |
Adding Boundary Condition with extra parameters and vector values (i.e. when the inflow of a region is computed)
funcBC | function representing bc |
flag | flag corresponding to the funcBC |
block | diagonal block corresponding to the bc (i.e. in block systems like stokes equation) |
domain | finite element space correspong to block |
type | of bc. Dirichlet, Dirichlet_X ... |
dofs | degrees of freedom of bc (i.e. 3 for a vector valued problem) |
parameter_vec | vector containing different parameters for bc |
externalSol | vector with values for bc |
bool FEDD::BCBuilder< SC, LO, GO, NO >::blockHasDirichletBC | ( | int | block | ) | const |
block |
bool FEDD::BCBuilder< SC, LO, GO, NO >::blockHasDirichletBC | ( | int | block, |
int & | loc ) const |
block | |
loc |
int FEDD::BCBuilder< SC, LO, GO, NO >::dofsPerNodeAtBlock | ( | int | block | ) |
block |
bool FEDD::BCBuilder< SC, LO, GO, NO >::findFlag | ( | LO | flag, |
int | block, | ||
int & | loc ) const |
flag | |
block | |
loc |
void FEDD::BCBuilder< SC, LO, GO, NO >::set | ( | const BlockMatrixPtr_Type & | blockMatrix, |
const BlockMultiVectorPtr_Type & | b, | ||
double | t = 0. ) const |
Setting bundary condtions to problem.
blockMatrix | System matrix |
b | rhs vector |
t |
void FEDD::BCBuilder< SC, LO, GO, NO >::setAllDirichletZero | ( | const BlockMultiVectorPtr_Type & | blockMV | ) | const |
blockMV |
void FEDD::BCBuilder< SC, LO, GO, NO >::setBCMinusVector | ( | const BlockMultiVectorPtr_Type & | outBlockMV, |
const BlockMultiVectorPtr_Type & | substractBlockMV, | ||
double | t = 0. ) const |
outBlockMV | |
substractBlockMV | |
t |
void FEDD::BCBuilder< SC, LO, GO, NO >::setDirichletBC | ( | const MatrixPtr_Type & | matrix, |
int | loc, | ||
int | blockRow, | ||
bool | isDiagonalBlock ) const |
matrix | |
loc | |
blockRow | |
isDiagonalBlock |
void FEDD::BCBuilder< SC, LO, GO, NO >::setDirichletBoundaryFromExternal | ( | Teuchos::ArrayRCP< SC > & | values, |
LO | index, | ||
int | loc, | ||
double | time, | ||
std::string | type, | ||
Teuchos::ArrayRCP< SC > | valuesSubstract = Teuchos::null ) const |
values | |
index | |
loc | |
time | |
type | |
valuesSubstract |
void FEDD::BCBuilder< SC, LO, GO, NO >::setLocalRowOne | ( | const MatrixPtr_Type & | matrix, |
LO | localNode, | ||
UN | dofsPerNode, | ||
int | loc ) const |
matrix | |
localNode | |
dofsPerNode | |
loc |
void FEDD::BCBuilder< SC, LO, GO, NO >::setLocalRowZero | ( | const MatrixPtr_Type & | matrix, |
LO | localNode, | ||
UN | dofsPerNode, | ||
int | loc ) const |
matrix | |
localNode | |
dofsPerNode | |
loc |
void FEDD::BCBuilder< SC, LO, GO, NO >::setRHS | ( | const BlockMultiVectorPtr_Type & | blockMV, |
double | t = 0. ) const |
Setting boundary conditions to (block)vector.
blockMV | vector |
t |
void FEDD::BCBuilder< SC, LO, GO, NO >::setSystem | ( | const BlockMatrixPtr_Type & | blockMatrix | ) | const |
Set boundary conditions to system.
blockMatrix |
void FEDD::BCBuilder< SC, LO, GO, NO >::setVectorMinusBC | ( | const BlockMultiVectorPtr_Type & | outBlockMV, |
const BlockMultiVectorPtr_Type & | substractBlockMV, | ||
double | t = 0. ) const |
outBlockMV | |
substractBlockMV | |
t |