virtual Numberoperator() (const Point &p, const Real time=0.)=0
void operator() (const Point &p, DenseVector< Number > &output)
virtual void operator() (const Point &p, const Real time, DenseVector< Number > &output)=0
bool initialized () const
Protected Member Functions
FunctionBase (const FunctionBase *master=NULL)
Protected Attributes
const FunctionBase * _master
bool _initialized
Detailed Description
This is the base class for functor-like classes. These entities are functions (in the mathematical sense) of time and space, $ f(mathbf{x},t) = mbox{ exttt{v}} $, where v may be either a Number or a DenseVector<Number>. Children of this base class implement different styles of data retrieval for these functions. Use the constructors of the derived classes for creating new objects. The required input of each derived class thwarts the effective use of the commonly used build() member. But afterwards the virtual members allow the convenient and libMesh-common usage through a FunctionBase*.
true when this object is properly initialized and ready for use, false otherwise.
Definition at line 144 of file function_base.h.
References _initialized.
Referenced by MeshFunction::disable_out_of_mesh_mode(), MeshFunction::enable_out_of_mesh_mode(), MeshFunction::get_point_locator(), MeshFunction::gradient(), MeshFunction::hessian(), MeshFunction::operator()(), and AnalyticFunction::operator()().
{
return (this->_initialized);
}
void FunctionBase::operator() (const Point &p, DenseVector< Number > &output) [inline]Return function for vectors. Returns in output the values of the data at the coordinate p.
Definition at line 152 of file function_base.h.
References operator()().
{
// Call the time-dependent function with t=0.
this->operator()(p, 0., output);
}
virtual void FunctionBase::operator() (const Point &p, const Realtime, DenseVector< Number > &output) [pure virtual]Return function for vectors. Returns in output the values of the data at the coordinate p and for time time. Purely virtual, so you have to overload it. Note that this cannot be a const method, check MeshFunction.
Implemented in MeshFunction, and AnalyticFunction.
virtual Number FunctionBase::operator() (const Point &p, const Realtime = 0.) [pure virtual]Returns:
the scalar value at coordinate p and time time, which defaults to zero. Purely virtual, so you have to overload it. Note that this cannot be a const method, check MeshFunction.
Implemented in MeshFunction, and AnalyticFunction.
Referenced by operator()().
Member Data Documentation
bool FunctionBase::_initialized [protected]When init() was called so that everything is ready for calls to operator() (...), then this bool is true.
Definition at line 136 of file function_base.h.
Referenced by AnalyticFunction::AnalyticFunction(), MeshFunction::clear(), MeshFunction::init(), AnalyticFunction::init(), and initialized().
const FunctionBase* FunctionBase::_master [protected]Const pointer to our master, initialized to NULL. There may be cases where multiple functions are required, but to save memory, one master handles some centralized data.
Definition at line 130 of file function_base.h.
Referenced by MeshFunction::clear(), MeshFunction::gradient(), MeshFunction::hessian(), MeshFunction::init(), MeshFunction::operator()(), and MeshFunction::~MeshFunction().
Author
Generated automatically by Doxygen for libMesh from the source code.