LifeV
|
BCFunctionUDepBase - class that holds the function used for prescribing boundary conditions. More...
#include <BCFunction.hpp>
Public Member Functions | |
BCFunctionUDepBase () | |
Empty Constructor. More... | |
BCFunctionUDepBase (const function_Type &userDefinedFunction) | |
Constructor for a user defined function. More... | |
BCFunctionUDepBase (const BCFunctionUDepBase &bcFunctionUDepBase) | |
Copy Constructor. More... | |
virtual | ~BCFunctionUDepBase () |
Destructor. More... | |
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 &, const Real &) > | function_Type |
typedef std::shared_ptr< BCFunctionUDepBase > | BCFunctionUDepBasePtr_Type |
Operators | |
virtual BCFunctionUDepBase & | operator= (const BCFunctionUDepBase &bcFunctionUDepBase) |
Assignment Operator. More... | |
Real | operator() (const Real &t, const Real &x, const Real &y, const Real &z, const ID &component, const Real &feVectorEvaluatedInThisPoint) const |
Overloading function operator by calling M_userDefinedFunction. More... | |
Methods | |
virtual BCFunctionUDepBasePtr_Type | clone () const |
Clone the current object. More... | |
Set Methods | |
void | setFunction (const function_Type &userDefinedFunction) |
Set the user defined function. More... | |
Get Methods | |
const function_Type & | Function () const |
Get the function. More... | |
BCFunctionUDepBase - class that holds the function used for prescribing boundary conditions.
This class holds the function used for prescribing Essential or Natural boundary conditions in the case in which the function depend on a FE vector (usually the solution at the previous iteration).
The data functions given by the user must have the following signature
Real f(const Real& t, const Real& x, const Real& y, const Real& z, const ID& component, const Real& feVectorEvaluatedInThisPoint)
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
Functions f is set using the correct constructor or using setFunction(f)
.
To get the function f use getFunction()
, to evaluate it use the operator()
.
Definition at line 380 of file BCFunction.hpp.
typedef std::function<Real ( const Real&, const Real&, const Real&, const Real&, const ID&, const Real& ) > function_Type |
Definition at line 387 of file BCFunction.hpp.
typedef std::shared_ptr<BCFunctionUDepBase> BCFunctionUDepBasePtr_Type |
Definition at line 388 of file BCFunction.hpp.
|
inline |
Empty Constructor.
The user must supply a function by calling setFunction(..)
Definition at line 396 of file BCFunction.hpp.
BCFunctionUDepBase | ( | const function_Type & | userDefinedFunction | ) |
Constructor for a user defined function.
userDefinedFunction | the user defined function |
Definition at line 164 of file BCFunction.cpp.
BCFunctionUDepBase | ( | const BCFunctionUDepBase & | bcFunctionUDepBase | ) |
Copy Constructor.
bcFunctionBase | The BCFunctionBase |
Definition at line 169 of file BCFunction.cpp.
|
inlinevirtual |
Destructor.
Definition at line 413 of file BCFunction.hpp.
|
virtual |
Assignment Operator.
bcFunctionUDepBase | The BCFunctionUDepBase |
Definition at line 180 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 |
feVectorEvaluatedInThisPoint | The FE vector evaluated in the point (x, y, z) at time t. |
Definition at line 437 of file BCFunction.hpp.
|
inlinevirtual |
Clone the current object.
Reimplemented in BCFunctionUDepRobin.
Definition at line 452 of file BCFunction.hpp.
|
inline |
Set the user defined function.
userDefinedFunction | the user defined function |
Definition at line 468 of file BCFunction.hpp.
|
inline |
Get the function.
Definition at line 484 of file BCFunction.hpp.
|
protected |
user defined function
Definition at line 493 of file BCFunction.hpp.