$extrastylesheet
#include <const_function.h>

Public Member Functions | |
| ConstFunction (const Output &c) | |
| virtual Output | operator() (const Point &, const Real=0) |
| virtual void | operator() (const Point &, const Real, DenseVector< Output > &output) |
| virtual UniquePtr < FunctionBase< Output > > | clone () const |
| virtual void | init () |
| virtual void | clear () |
| void | operator() (const Point &p, DenseVector< Output > &output) |
| virtual Output | component (unsigned int i, const Point &p, Real time=0.) |
| bool | initialized () const |
Protected Attributes | |
| const FunctionBase * | _master |
| bool | _initialized |
Private Attributes | |
| Output | _c |
Definition at line 33 of file const_function.h.
| libMesh::ConstFunction< Output >::ConstFunction | ( | const Output & | c | ) | [inline, explicit] |
Definition at line 37 of file const_function.h.
References libMesh::FunctionBase< Output >::_initialized.
: _c(c) { this->_initialized = true; }
| virtual void libMesh::FunctionBase< Output >::clear | ( | ) | [inline, virtual, inherited] |
Clears the function.
Reimplemented in libMesh::ParsedFunction< Output, OutputGradient >, libMesh::MeshFunction, and libMesh::AnalyticFunction< Output >.
Definition at line 90 of file function_base.h.
{}
| virtual UniquePtr<FunctionBase<Output> > libMesh::ConstFunction< Output >::clone | ( | ) | const [inline, virtual] |
Returns a new copy of the function. The new copy should be as ``deep'' as necessary to allow independent destruction and simultaneous evaluations of the copies in different threads.
Implements libMesh::FunctionBase< Output >.
Reimplemented in libMesh::ZeroFunction< Output >.
Definition at line 52 of file const_function.h.
References libMesh::ConstFunction< Output >::_c.
{
return UniquePtr<FunctionBase<Output> >
(new ConstFunction<Output>(_c));
}
| Output libMesh::FunctionBase< Output >::component | ( | unsigned int | i, |
| const Point & | p, | ||
| Real | time = 0. |
||
| ) | [inline, virtual, inherited] |
i at coordinate p and time time. Subclasses aren't required to overload this, since the default implementation is based on the full vector evaluation, which is often correct. Subclasses are recommended to overload this, since the default implementation is based on a vector evaluation, which is usually unnecessarily inefficient. Reimplemented in libMesh::ParsedFunction< Output, OutputGradient >, libMesh::CompositeFunction< Output >, and libMesh::WrappedFunction< Output >.
Definition at line 207 of file function_base.h.
Referenced by libMesh::ProjectSolution::operator()(), libMesh::ProjectFEMSolution::operator()(), and libMesh::BoundaryProjectSolution::operator()().
{
DenseVector<Output> outvec(i+1);
(*this)(p, time, outvec);
return outvec(i);
}
| virtual void libMesh::FunctionBase< Output >::init | ( | ) | [inline, virtual, inherited] |
The actual initialization process.
Reimplemented in libMesh::ParsedFunction< Output, OutputGradient >, libMesh::MeshFunction, and libMesh::AnalyticFunction< Output >.
Definition at line 85 of file function_base.h.
{}
| bool libMesh::FunctionBase< Output >::initialized | ( | ) | const [inline, inherited] |
true when this object is properly initialized and ready for use, false otherwise. Definition at line 198 of file function_base.h.
{
return (this->_initialized);
}
| virtual Output libMesh::ConstFunction< Output >::operator() | ( | const Point & | p, |
| const Real | time = 0 |
||
| ) | [inline, virtual] |
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. Implements libMesh::FunctionBase< Output >.
Definition at line 39 of file const_function.h.
References libMesh::ConstFunction< Output >::_c.
{ return _c; }
| virtual void libMesh::ConstFunction< Output >::operator() | ( | const Point & | p, |
| const Real | time, | ||
| DenseVector< Output > & | output | ||
| ) | [inline, 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. Can optionally provide subdomain_ids which will restrict the function to operate on elements with subdomain id contained in the set. This is useful in cases where there are multiple dimensioned elements, for example.
Implements libMesh::FunctionBase< Output >.
Definition at line 43 of file const_function.h.
References libMesh::ConstFunction< Output >::_c, and libMesh::DenseVector< T >::size().
{
unsigned int size = output.size();
for (unsigned int i=0; i != size; ++i)
output(i) = _c;
}
| void libMesh::FunctionBase< Output >::operator() | ( | const Point & | p, |
| DenseVector< Output > & | output | ||
| ) | [inline, inherited] |
Return function for vectors. Returns in output the values of the data at the coordinate p.
Definition at line 220 of file function_base.h.
{
// Call the time-dependent function with t=0.
this->operator()(p, 0., output);
}
Output libMesh::ConstFunction< Output >::_c [private] |
Definition at line 58 of file const_function.h.
Referenced by libMesh::ConstFunction< Output >::clone(), and libMesh::ConstFunction< Output >::operator()().
bool libMesh::FunctionBase< Output >::_initialized [protected, inherited] |
When init() was called so that everything is ready for calls to operator() (...), then this bool is true.
Definition at line 170 of file function_base.h.
Referenced by libMesh::AnalyticFunction< Output >::AnalyticFunction(), libMesh::ConstFunction< Output >::ConstFunction(), libMesh::ParsedFunction< Output, OutputGradient >::ParsedFunction(), and libMesh::WrappedFunction< Output >::WrappedFunction().
const FunctionBase* libMesh::FunctionBase< Output >::_master [protected, inherited] |
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 164 of file function_base.h.