LifeV
|
BCFunctionBase - class that holds the function used for prescribing boundary conditions. More...
#include <BCFunction.hpp>
Protected Attributes | |
function_Type | M_userDefinedFunction |
user defined function More... | |
Public Types | |
typedef std::function< Real(const Real &, const Real &, const Real &, const Real &, const ID &) > | function_Type |
typedef std::shared_ptr< BCFunctionBase > | BCFunctionBasePtr_Type |
Constructors & Destructor | |
BCFunctionBase () | |
Empty Constructor. More... | |
BCFunctionBase (function_Type userDefinedFunction) | |
Constructor for a user defined function. More... | |
BCFunctionBase (const BCFunctionBase &bcFunctionBase) | |
Copy Constructor. More... | |
virtual | ~BCFunctionBase () |
Destructor. More... | |
Operators | |
virtual BCFunctionBase & | operator= (const BCFunctionBase &bcFunctionBase) |
Assignment Operator. More... | |
Real | operator() (const Real &t, const Real &x, const Real &y, const Real &z, const ID &component) const |
Overloading function operator by calling M_userDefinedFunction. More... | |
Set Methods | |
void | setFunction (function_Type userDefinedFunction) |
Set the user defined function. More... | |
Get Methods | |
const function_Type & | Function () const |
Get the function. More... | |
Methods | |
virtual BCFunctionBasePtr_Type | clone () const |
Clone the current object. More... | |
BCFunctionBase - class that holds the function used for prescribing boundary conditions.
This class holds the function used for prescribing Essential or Natural boundary conditions. The data functions given by the user must have the following signature.
Real f(const Real& time, const Real& x, const Real& y, const Real& z, const ID& component).
In the case of Essential boundary condition, we want to prescribe
u = f
on part of the boundary, where u
is the solution and f
the user defined function. In the case of Natural boundary condition, we want to add the to the right hand side of the equation the following term:
( f, phi )_bd
Here ( . , . )_bd denote the L^2 inner product on the boundary, phi is the test function
Functions f and is set using the correct constructor or using setFunction(f)
.
To get the function f use getFunction()
, to evaluate it use the operator()
.
This is the base class for other BCFunctionXXX classes. Inheritance is used to hold specific boundary condition data.
Definition at line 77 of file BCFunction.hpp.
typedef std::function<Real ( const Real&, const Real&, const Real&, const Real&, const ID& ) > function_Type |
Definition at line 84 of file BCFunction.hpp.
typedef std::shared_ptr<BCFunctionBase> BCFunctionBasePtr_Type |
Definition at line 85 of file BCFunction.hpp.
|
inline |
Empty Constructor.
The user must supply a function by calling setFunction(..)
Definition at line 96 of file BCFunction.hpp.
BCFunctionBase | ( | function_Type | userDefinedFunction | ) |
Constructor for a user defined function.
userDefinedFunction | the user defined function |
Definition at line 56 of file BCFunction.cpp.
BCFunctionBase | ( | const BCFunctionBase & | bcFunctionBase | ) |
Copy Constructor.
bcFunctionBase | The BCFunctionBase |
Definition at line 62 of file BCFunction.cpp.
|
inlinevirtual |
Destructor.
Definition at line 112 of file BCFunction.hpp.
|
virtual |
Assignment Operator.
bcFunctionBase | The BCFunctionBase |
Definition at line 75 of file BCFunction.cpp.
|
inline |
Overloading function operator by calling M_userDefinedFunction.
t | Time |
x | Coordinate x |
y | Coordinate y |
z | Coordinate z |
component | The Component of the vector function |
Definition at line 136 of file BCFunction.hpp.
|
inline |
Set the user defined function.
userDefinedFunction | the user defined function |
Definition at line 152 of file BCFunction.hpp.
|
inline |
Get the function.
Definition at line 166 of file BCFunction.hpp.
|
inlinevirtual |
Clone the current object.
Reimplemented in BCFunctionRobin.
Definition at line 180 of file BCFunction.hpp.
|
protected |
user defined function
Definition at line 192 of file BCFunction.hpp.