LifeV
BCFunctionUDepBase Class Reference

BCFunctionUDepBase - class that holds the function used for prescribing boundary conditions. More...

#include <BCFunction.hpp>

+ Inheritance diagram for BCFunctionUDepBase:
+ Collaboration diagram for BCFunctionUDepBase:

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< BCFunctionUDepBaseBCFunctionUDepBasePtr_Type
 

Operators

virtual BCFunctionUDepBaseoperator= (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_TypeFunction () const
 Get the function. More...
 

Detailed Description

BCFunctionUDepBase - class that holds the function used for prescribing boundary conditions.

Author
Miguel Fernandez

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.

Member Typedef Documentation

◆ function_Type

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.

◆ BCFunctionUDepBasePtr_Type

Definition at line 388 of file BCFunction.hpp.

Constructor & Destructor Documentation

◆ BCFunctionUDepBase() [1/3]

BCFunctionUDepBase ( )
inline

Empty Constructor.

The user must supply a function by calling setFunction(..)

Definition at line 396 of file BCFunction.hpp.

◆ BCFunctionUDepBase() [2/3]

BCFunctionUDepBase ( const function_Type userDefinedFunction)

Constructor for a user defined function.

Parameters
userDefinedFunctionthe user defined function

Definition at line 164 of file BCFunction.cpp.

+ Here is the caller graph for this function:

◆ BCFunctionUDepBase() [3/3]

BCFunctionUDepBase ( const BCFunctionUDepBase bcFunctionUDepBase)

Copy Constructor.

Parameters
bcFunctionBaseThe BCFunctionBase

Definition at line 169 of file BCFunction.cpp.

+ Here is the caller graph for this function:

◆ ~BCFunctionUDepBase()

virtual ~BCFunctionUDepBase ( )
inlinevirtual

Destructor.

Definition at line 413 of file BCFunction.hpp.

Member Function Documentation

◆ operator=()

BCFunctionUDepBase & operator= ( const BCFunctionUDepBase bcFunctionUDepBase)
virtual

Assignment Operator.

Parameters
bcFunctionUDepBaseThe BCFunctionUDepBase
Returns
Reference to a new BCFunctionUDepBase object with the same content of bcFunctionUDepBase

Definition at line 180 of file BCFunction.cpp.

+ Here is the caller graph for this function:

◆ operator()()

Real operator() ( const Real t,
const Real x,
const Real y,
const Real z,
const ID component,
const Real feVectorEvaluatedInThisPoint 
) const
inline

Overloading function operator by calling M_userDefinedFunction.

Parameters
tTime
xCoordinate x
yCoordinate y
zCoordinate z
componentThe Component of the vector function
feVectorEvaluatedInThisPointThe FE vector evaluated in the point (x, y, z) at time t.
Returns
The selected component of the user defined function evaluated in (t,x,y,z)

Definition at line 437 of file BCFunction.hpp.

◆ clone()

virtual BCFunctionUDepBasePtr_Type clone ( ) const
inlinevirtual

Clone the current object.

Returns
Pointer to the cloned object

Reimplemented in BCFunctionUDepRobin.

Definition at line 452 of file BCFunction.hpp.

◆ setFunction()

void setFunction ( const function_Type userDefinedFunction)
inline

Set the user defined function.

Parameters
userDefinedFunctionthe user defined function

Definition at line 468 of file BCFunction.hpp.

+ Here is the caller graph for this function:

◆ Function()

const function_Type& Function ( ) const
inline

Get the function.

Returns
Reference to M_userDefinedFunction

Definition at line 484 of file BCFunction.hpp.

Field Documentation

◆ M_userDefinedFunction

function_Type M_userDefinedFunction
protected

user defined function

Definition at line 493 of file BCFunction.hpp.


The documentation for this class was generated from the following files: