LifeV
|
BCBase - Base class which holds the boundary condition information. More...
#include <BCBase.hpp>
Private Attributes | |
std::string | M_name |
name of the boundary condition More... | |
bcFlag_Type | M_flag |
flag identifying a specific part of the mesh boundary More... | |
bcType_Type | M_type |
the boundary condition type More... | |
bcMode_Type | M_mode |
the boundary condition mode of application More... | |
bcComponentsVec_Type | M_components |
std::shared_ptr< BCFunctionBase > | M_bcFunction |
the list of components involved in this BC More... | |
std::shared_ptr< BCFunctionUDepBase > | M_bcFunctionFEVectorDependent |
Pointer to a user defined BC function (depending on a generic FE vector) More... | |
std::shared_ptr< BCVectorBase > | M_bcVector |
Pointer to a user given BC vector. More... | |
bool | M_isStored_BcVector |
bool | M_isStored_BcFunctionVectorDependent |
True if a FE BCVector has been provided. More... | |
std::set< std::shared_ptr< BCIdentifierBase >, BCIdentifierComparison > | M_idSet |
set of pointers to identifiers allowing the user to get hold the DOF to which the BC applies More... | |
std::vector< std::shared_ptr< BCIdentifierBase > > | M_idVector |
container for id's when the list is finalized More... | |
int | M_offset |
boundary condition offset More... | |
bool | M_finalized |
True, when M_idVector is finalized. More... | |
Friends | |
class | BCHandler |
BCHandle is a friend class of BCBase. More... | |
Constructor & Destructor | |
BCBase () | |
Empty constructor. More... | |
BCBase (const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCFunctionBase &bcFunction, const bcComponentsVec_Type &components) | |
Constructor for BCBase. More... | |
BCBase (const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCFunctionBase &bcFunction) | |
Constructor for BCBase without specifying components for Scalar, Tangential or Normal mode problems. More... | |
BCBase (const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCFunctionBase &bcFunction, const UInt &numberOfComponents) | |
Constructor for BCBase without specifying components for without list of components for Full mode problems. More... | |
BCBase (const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCVectorBase &vector, const bcComponentsVec_Type &components) | |
Constructor for BCBase to prescribe a boundary condition from a vector of dof values. More... | |
BCBase (const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCVectorBase &bcVector) | |
Constructor for BCBase to prescribe a boundary condition from a vector of dof values without specifying components for Scalar, Tangential or Normal mode problems. More... | |
BCBase (const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCVectorBase &bcVector, const UInt &numberOfComponents) | |
Constructor for BCBase to prescribe a boundary condition from a vector of dof values without specifying components for Full mode problems. More... | |
BCBase (const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCFunctionUDepBase &bcFunctionFEVectorDependent, const bcComponentsVec_Type &components) | |
Constructor for BCBase. The BC function depends on a generic FE vector (e.g. the solution at the previous time step) More... | |
BCBase (const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCFunctionUDepBase &bcFunctionFEVectorDependent) | |
Constructor for BCBase without specifying components for Scalar, Tangential or Normal mode problems. The BC function depends on a generic FE vector (e.g. the solution at the previous time step) More... | |
BCBase (const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCFunctionUDepBase &bcFunctionFEVectorDependent, const UInt &numberOfComponents) | |
Constructor for BCBase without specifying components for Full mode problems. The BC function depends on a generic FE vector (e.g. the solution at the previous time step) More... | |
BCBase (const BCBase &bcBase) | |
Copy constructor for BCBase. More... | |
~BCBase () | |
Destructor. More... | |
Methods | |
ID | component (const ID i) const |
Returns the index of the component of the solution associated to the iComponent-th component prescribed in the boundary condition at hand. More... | |
bool | isRobinCoeffAVector () const |
Returns true if robin coefficient (in BC Vector ) is a VectorEpetra, false if it is scalar (default alphaCoef=1) More... | |
bool | isBetaCoeffAVector () const |
Returns true if beta coefficient (in BC Vector ) is a VectorEpetra (betaVec) (default betaCoef=1) More... | |
Real | robinCoeffVector (const ID &iDof, const ID &iComponent) const |
Returns the value of the robin coefficient vector (in BC Vector) More... | |
Real | betaCoeffVector (const ID &iDof, const ID &iComponent) const |
Returns the value of the beta coefficient vector (in BC Vector) More... | |
const BCFunctionBase * | pointerToFunctor () const |
Returns a pointer to the BCFunctionBase object. More... | |
const BCFunctionUDepBase * | pointerToFunctorUDep () const |
Returns a pointer to the BCFunctionUDepBase object. More... | |
const BCVectorBase * | pointerToBCVector () const |
Returns a pointer to the BCVector object. More... | |
void | addBCIdentifier (BCIdentifierBase *identifierToAddPtr) |
Adds a new identifier to the list. More... | |
UInt | list_size () const |
Returns the size of the identifiers list. More... | |
std::ostream & | showMe (bool verbose=false, std::ostream &outStream=std::cout) const |
Method that writes info in output. More... | |
Operators | |
bool | operator< (const BCBase &bcBase1, const BCBase &bcBase2) |
Overloading "less-than" operator between BCBase objects. More... | |
bool | operator== (const BCBase &bcBase, const bcFlag_Type flag) |
Overloading "is-equal" operator for BCBase objects. More... | |
BCBase & | operator= (const BCBase &bcBase) |
The assignment operator for BCBase. More... | |
const BCIdentifierBase * | operator[] (const ID &i) const |
Returns a pointer to the (i)-th element of the list of identifiers. More... | |
Real | operator() (const Real &t, const Real &x, const Real &y, const Real &z, const ID &iComponent) const |
Overloading function operator by calling the BCFunctionBase user specified function. More... | |
Real | operator() (const Real &t, const Real &x, const Real &y, const Real &z, const ID &iComponent, const Real &u) const |
Overloading function operator by calling the BCFunctionUDepBase user specified function. More... | |
Real | operator() (const ID &iDof, const ID &iComponent) const |
Overloading function operator by querying the BCVector in DOF iDof and component iComponent. More... | |
Set Methods | |
void | setBCVector (const BCVectorBase &bcVector) |
set BCVectorBase boundary condition More... | |
void | setBCFunction (const BCFunctionBase &bcFunction) |
set BCFunctionBase boundary condition More... | |
void | setBCFunction (const BCFunctionUDepBase &bcFunctionFEVectorDependent) |
set BCFunctionUDepBase boundary condition More... | |
void | setOffset (int bcOffset) |
Set the BC offset. More... | |
void | setType (const bcType_Type &bcType) |
Set the BC type. More... | |
Get Methods | |
std::string | name () const |
Returns the boundary condition name. More... | |
bcFlag_Type | flag () const |
Returns the flag associated to the boundary condition name. More... | |
bcType_Type | type () const |
Returns the boundary condition type. More... | |
bcMode_Type | mode () const |
Returns the boundary condition mode. More... | |
UInt | numberOfComponents () const |
Returns the number of components involved in this boundary condition. More... | |
const int & | offset () const |
Returns the offset associated to this boundary condition. More... | |
Real | robinCoeff () const |
Returns the value of the robin coefficient (in BC Vector) More... | |
Real | resistanceCoeff () const |
Returns the value of the resistance coefficient (in BC Vector) More... | |
Real | betaCoeff () const |
Returns the value of the beta coefficient (in BC Vector) More... | |
bool | isDataAVector () const |
Returns True if a FE BCVector has been provided to the class, False otherwise. More... | |
bool | finalized () const |
Returns whether the list is finalized and the vector of ID's is then accessible. More... | |
bool | isUDep () const |
Returns True if the BCBase is based on a BCFunctionUDepBase function, False otherwise. More... | |
void | copyIdSetIntoIdVector () |
BCBase - Base class which holds the boundary condition information.
For each boundary condition the user must give
a name,
a mesh flag,
a type,
a mode,
a data BCFunction,
Finally the list of pointers to identifiers will be updated in the DOF class (BCHandler::bcUpdate
method).
Definition at line 149 of file BCBase.hpp.
BCBase | ( | ) |
Empty constructor.
Definition at line 73 of file BCBase.cpp.
BCBase | ( | const bcName_Type & | name, |
const bcFlag_Type & | flag, | ||
const bcType_Type & | type, | ||
const bcMode_Type & | mode, | ||
BCFunctionBase & | bcFunction, | ||
const bcComponentsVec_Type & | components | ||
) |
Constructor for BCBase.
name | the name of the boundary condition |
flag | the mesh flag identifying the part of the mesh where the boundary condition applies |
type | the boundary condition type: Natural, Essential, Robin, Flux, Resistance |
mode | the boundary condition mode: Scalar, Full, Component, Normal, Tangential, Directional |
bcFunction | the function holding the user defined function defining the boundary condition |
components | vector of IDs storing the list of components involved in this boundary condition |
Definition at line 77 of file BCBase.cpp.
BCBase | ( | const bcName_Type & | name, |
const bcFlag_Type & | flag, | ||
const bcType_Type & | type, | ||
const bcMode_Type & | mode, | ||
BCFunctionBase & | bcFunction | ||
) |
Constructor for BCBase without specifying components for Scalar, Tangential or Normal mode problems.
name | the name of the boundary condition |
flag | the mesh flag identifying the part of the mesh where the boundary condition applies |
type | the boundary condition type: Natural, Essential, Robin, Flux, Resistance |
mode | the boundary condition mode: Scalar, Normal, Tangential |
bcFunction | the BCFunctionBase holding the function defining the boundary condition involved in this boundary condition |
Definition at line 100 of file BCBase.cpp.
BCBase | ( | const bcName_Type & | name, |
const bcFlag_Type & | flag, | ||
const bcType_Type & | type, | ||
const bcMode_Type & | mode, | ||
BCFunctionBase & | bcFunction, | ||
const UInt & | numberOfComponents | ||
) |
Constructor for BCBase without specifying components for without list of components for Full mode problems.
name | the name of the boundary condition |
flag | the mesh flag identifying the part of the mesh where the boundary condition applies |
type | the boundary condition type: Natural, Essential, Robin, Flux, Resistance |
mode | the boundary condition mode: Full |
bcFunction | BCFunctionBase holding the function defining the boundary condition |
numberOfComponents | number of components involved in this boundary condition |
Definition at line 162 of file BCBase.cpp.
BCBase | ( | const bcName_Type & | name, |
const bcFlag_Type & | flag, | ||
const bcType_Type & | type, | ||
const bcMode_Type & | mode, | ||
BCVectorBase & | vector, | ||
const bcComponentsVec_Type & | components | ||
) |
Constructor for BCBase to prescribe a boundary condition from a vector of dof values.
name | the name of the boundary condition |
flag | the mesh flag identifying the part of the mesh where the boundary condition applies |
type | the boundary condition type: Natural, Essential, Robin, Flux, Resistance |
mode | the boundary condition mode: Scalar, Full, Component, Normal, Tangential, Directional |
vector | the vector containing the dof values to be prescribed as boundary data |
components | vector of IDs storing the list of components involved in this boundary condition |
Definition at line 195 of file BCBase.cpp.
BCBase | ( | const bcName_Type & | name, |
const bcFlag_Type & | flag, | ||
const bcType_Type & | type, | ||
const bcMode_Type & | mode, | ||
BCVectorBase & | bcVector | ||
) |
Constructor for BCBase to prescribe a boundary condition from a vector of dof values without specifying components for Scalar, Tangential or Normal mode problems.
name | the name of the boundary condition |
flag | the mesh flag identifying the part of the mesh where the boundary condition applies |
type | the boundary condition type: Natural, Essential, Robin, Flux, Resistance |
mode | the boundary condition mode: Scalar, Full, Component, Normal, Tangential, Directional |
bcVector | the vector containing the dof values to be prescribed as boundary data |
Definition at line 221 of file BCBase.cpp.
BCBase | ( | const bcName_Type & | name, |
const bcFlag_Type & | flag, | ||
const bcType_Type & | type, | ||
const bcMode_Type & | mode, | ||
BCVectorBase & | bcVector, | ||
const UInt & | numberOfComponents | ||
) |
Constructor for BCBase to prescribe a boundary condition from a vector of dof values without specifying components for Full mode problems.
name | the name of the boundary condition |
flag | the mesh flag identifying the part of the mesh where the boundary condition applies |
type | the boundary condition type: Natural, Essential, Robin, Flux, Resistance |
mode | the boundary condition mode: Scalar, Full, Component, Normal, Tangential, Directional |
bcVector | the vector containing the dof values to be prescribed as boundary data |
numberOfComponents | number of components involved in this boundary condition |
Definition at line 275 of file BCBase.cpp.
BCBase | ( | const bcName_Type & | name, |
const bcFlag_Type & | flag, | ||
const bcType_Type & | type, | ||
const bcMode_Type & | mode, | ||
BCFunctionUDepBase & | bcFunctionFEVectorDependent, | ||
const bcComponentsVec_Type & | components | ||
) |
Constructor for BCBase. The BC function depends on a generic FE vector (e.g. the solution at the previous time step)
name | the name of the boundary condition |
flag | the mesh flag identifying the part of the mesh where the boundary condition applies |
type | the boundary condition type: Natural, Essential, Robin, Flux, Resistance |
mode | the boundary condition mode: Scalar, Full, Component, Normal, Tangential, Directional |
bcFunctionFEVectorDependent | the BCFunctionUDepBase holding the function (depending on a generic finite element vector ) defining the boundary condition |
components | vector of IDs storing the list of components involved in this boundary condition |
Definition at line 308 of file BCBase.cpp.
BCBase | ( | const bcName_Type & | name, |
const bcFlag_Type & | flag, | ||
const bcType_Type & | type, | ||
const bcMode_Type & | mode, | ||
BCFunctionUDepBase & | bcFunctionFEVectorDependent | ||
) |
Constructor for BCBase without specifying components for Scalar, Tangential or Normal mode problems. The BC function depends on a generic FE vector (e.g. the solution at the previous time step)
name | the name of the boundary condition |
flag | the mesh flag identifying the part of the mesh where the boundary condition applies |
type | the boundary condition type: Natural, Essential, Robin, Flux, Resistance |
mode | the boundary condition mode: Scalar, Normal, Tangential |
bcFunctionFEVectorDependent | the BCFunctionUDepBase holding the function (depending on a generic finite element vector ) defining the boundary condition |
Definition at line 333 of file BCBase.cpp.
BCBase | ( | const bcName_Type & | name, |
const bcFlag_Type & | flag, | ||
const bcType_Type & | type, | ||
const bcMode_Type & | mode, | ||
BCFunctionUDepBase & | bcFunctionFEVectorDependent, | ||
const UInt & | numberOfComponents | ||
) |
Constructor for BCBase without specifying components for Full mode problems. The BC function depends on a generic FE vector (e.g. the solution at the previous time step)
name | the name of the boundary condition |
flag | the mesh flag identifying the part of the mesh where the boundary condition applies |
type | the boundary condition type: Natural, Essential, Robin, Flux, Resistance |
mode | the boundary condition mode: Full |
bcFunctionFEVectorDependent | the BCFunctionUDepBase holding the function (depending on a generic finite element vector ) defining the boundary condition |
numberOfComponents | number of components involved in this boundary condition |
Definition at line 384 of file BCBase.cpp.
Copy constructor for BCBase.
bcBase | a BCBase object |
Definition at line 417 of file BCBase.cpp.
~BCBase | ( | ) |
Destructor.
Definition at line 458 of file BCBase.cpp.
Returns the index of the component of the solution associated to the iComponent-th component prescribed in the boundary condition at hand.
Example: the solution has 4 components and we prescribe a boundary condition on component 0 and 3. Then, component(1) returns 3, since 3 is the index of the 2nd BC prescribed.
iComponent | the "local" component |
Definition at line 466 of file BCBase.cpp.
bool isRobinCoeffAVector | ( | ) | const |
Returns true if robin coefficient (in BC Vector ) is a VectorEpetra, false if it is scalar (default alphaCoef=1)
Definition at line 472 of file BCBase.cpp.
bool isBetaCoeffAVector | ( | ) | const |
Returns true if beta coefficient (in BC Vector ) is a VectorEpetra (betaVec) (default betaCoef=1)
Definition at line 485 of file BCBase.cpp.
Returns the value of the robin coefficient vector (in BC Vector)
corresponding to DOF iDof and component iComponent
iDof | DOF we are looking for in RobinVec |
iComponent | component we are looking for in RobinVec |
Definition at line 500 of file BCBase.cpp.
Returns the value of the beta coefficient vector (in BC Vector)
corresponding to DOF iDof and component iComponent
iDof | DOF we are looking for in BetaVec |
iComponent | component we are looking for in BetaVec |
Definition at line 513 of file BCBase.cpp.
const BCFunctionBase * pointerToFunctor | ( | ) | const |
Returns a pointer to the BCFunctionBase object.
Definition at line 528 of file BCBase.cpp.
const BCFunctionUDepBase * pointerToFunctorUDep | ( | ) | const |
Returns a pointer to the BCFunctionUDepBase object.
Definition at line 533 of file BCBase.cpp.
const BCVectorBase * pointerToBCVector | ( | ) | const |
Returns a pointer to the BCVector object.
Definition at line 538 of file BCBase.cpp.
void addBCIdentifier | ( | BCIdentifierBase * | identifierToAddPtr | ) |
Adds a new identifier to the list.
identifierToAddPtr | pointer to the BCIdentifierBase object to be added |
Definition at line 544 of file BCBase.cpp.
UInt list_size | ( | ) | const |
Returns the size of the identifiers list.
Definition at line 551 of file BCBase.cpp.
std::ostream & showMe | ( | bool | verbose = false , |
std::ostream & | outStream = std::cout |
||
) | const |
Method that writes info in output.
verbose | to specify the level of verbosity (false by default) |
outStream | to specify the output stream (std::cout by default) |
Definition at line 557 of file BCBase.cpp.
The assignment operator for BCBase.
bcBase | a BCBase object |
Definition at line 606 of file BCBase.cpp.
const BCIdentifierBase * operator[] | ( | const ID & | i | ) | const |
Returns a pointer to the (i)-th element of the list of identifiers.
The list of identifiers has to be finalized before calling this operator.
i | index of the element in the list of identifier that we want to be returned (starting from 0) |
Definition at line 638 of file BCBase.cpp.
Real operator() | ( | const Real & | t, |
const Real & | x, | ||
const Real & | y, | ||
const Real & | z, | ||
const ID & | iComponent | ||
) | const |
Overloading function operator by calling the BCFunctionBase user specified function.
t | time |
x | coordinate |
y | coordinate |
z | coordinate |
iComponent | component of the vector function |
Definition at line 645 of file BCBase.cpp.
Real operator() | ( | const Real & | t, |
const Real & | x, | ||
const Real & | y, | ||
const Real & | z, | ||
const ID & | iComponent, | ||
const Real & | u | ||
) | const |
Overloading function operator by calling the BCFunctionUDepBase user specified function.
t | time |
x | coordinate |
y | coordinate |
z | coordinate |
iComponent | component of the vector function |
u | value of the FE vector in t, x, y, z, component iComp |
Definition at line 651 of file BCBase.cpp.
Overloading function operator by querying the BCVector in DOF iDof and component iComponent.
iDof | global dof index |
iComponent | component index |
Definition at line 660 of file BCBase.cpp.
void setBCVector | ( | const BCVectorBase & | bcVector | ) |
set BCVectorBase boundary condition
bcVector | to be set in BCBase class |
Definition at line 679 of file BCBase.cpp.
void setBCFunction | ( | const BCFunctionBase & | bcFunction | ) |
set BCFunctionBase boundary condition
bcFunction | to be set in BCBase class |
Definition at line 687 of file BCBase.cpp.
void setBCFunction | ( | const BCFunctionUDepBase & | bcFunctionFEVectorDependent | ) |
set BCFunctionUDepBase boundary condition
bcFunctionFEVectorDependent | to be set in BCBase class |
Definition at line 695 of file BCBase.cpp.
|
inline |
Set the BC offset.
bcOffset | to be set in BCBase class |
Definition at line 526 of file BCBase.hpp.
|
inline |
Set the BC type.
bcOffset | to be set in BCBase class |
Definition at line 535 of file BCBase.hpp.
std::string name | ( | ) | const |
Returns the boundary condition name.
Definition at line 707 of file BCBase.cpp.
bcFlag_Type flag | ( | ) | const |
Returns the flag associated to the boundary condition name.
Definition at line 712 of file BCBase.cpp.
bcType_Type type | ( | ) | const |
Returns the boundary condition type.
Definition at line 717 of file BCBase.cpp.
bcMode_Type mode | ( | ) | const |
Returns the boundary condition mode.
Definition at line 722 of file BCBase.cpp.
UInt numberOfComponents | ( | ) | const |
Returns the number of components involved in this boundary condition.
Definition at line 727 of file BCBase.cpp.
|
inline |
Returns the offset associated to this boundary condition.
Definition at line 579 of file BCBase.hpp.
Real robinCoeff | ( | ) | const |
Returns the value of the robin coefficient (in BC Vector)
Definition at line 732 of file BCBase.cpp.
Real resistanceCoeff | ( | ) | const |
Returns the value of the resistance coefficient (in BC Vector)
Definition at line 746 of file BCBase.cpp.
Real betaCoeff | ( | ) | const |
Returns the value of the beta coefficient (in BC Vector)
Definition at line 760 of file BCBase.cpp.
bool isDataAVector | ( | ) | const |
Returns True if a FE BCVector has been provided to the class, False otherwise.
Definition at line 774 of file BCBase.cpp.
bool finalized | ( | ) | const |
Returns whether the list is finalized and the vector of ID's is then accessible.
Definition at line 779 of file BCBase.cpp.
bool isUDep | ( | ) | const |
Returns True if the BCBase is based on a BCFunctionUDepBase function, False otherwise.
Definition at line 784 of file BCBase.cpp.
void copyIdSetIntoIdVector | ( | ) |
|
friend |
BCHandle is a friend class of BCBase.
Definition at line 154 of file BCBase.hpp.
Overloading "less-than" operator between BCBase objects.
The "smaller" (or weaker) boundary conditions is the one to be applied first
Definition at line 473 of file BCBase.hpp.
|
friend |
Overloading "is-equal" operator for BCBase objects.
Check if the flag of bcBase is equal to flag argument
bcBase | BCBase to check |
flag | bcFlag_Type to be compared with bcBase flag |
Definition at line 493 of file BCBase.hpp.
|
private |
name of the boundary condition
Definition at line 625 of file BCBase.hpp.
|
private |
flag identifying a specific part of the mesh boundary
Definition at line 627 of file BCBase.hpp.
|
private |
the boundary condition type
Definition at line 629 of file BCBase.hpp.
|
private |
the boundary condition mode of application
Definition at line 631 of file BCBase.hpp.
|
private |
Definition at line 633 of file BCBase.hpp.
|
private |
the list of components involved in this BC
Pointer to a user defined BC function
Definition at line 635 of file BCBase.hpp.
|
private |
Pointer to a user defined BC function (depending on a generic FE vector)
Definition at line 637 of file BCBase.hpp.
|
private |
Pointer to a user given BC vector.
Definition at line 639 of file BCBase.hpp.
|
private |
Definition at line 641 of file BCBase.hpp.
|
private |
True if a FE BCVector has been provided.
True if the BCBase is based on a BCFunctionUDepBase function, False otherwise
Definition at line 643 of file BCBase.hpp.
|
private |
set of pointers to identifiers allowing the user to get hold the DOF to which the BC applies
Definition at line 645 of file BCBase.hpp.
|
private |
container for id's when the list is finalized
Definition at line 647 of file BCBase.hpp.
|
private |
boundary condition offset
Definition at line 649 of file BCBase.hpp.
|
private |
True, when M_idVector is finalized.
Definition at line 651 of file BCBase.hpp.