libMesh
|
This class provides a wrapper with which to evaluate a (libMesh-style) function pointer in a FunctionBase-compatible interface. More...
#include <wrapped_functor.h>
Public Member Functions | |
WrappedFunctor (const FunctionBase< Output > &func) | |
Constructor to wrap FunctionBase functors in a FEMFunctionBase compatible shim. More... | |
WrappedFunctor (const System &sys, Output fptr(const Point &p, const Parameters ¶meters, const std::string &sys_name, const std::string &unknown_name)=nullptr, const Parameters *parameters=nullptr, unsigned int varnum=0) | |
Constructor to wrap scalar-valued function pointers. More... | |
WrappedFunctor (const WrappedFunctor &)=delete | |
This class can't be copy constructed or assigned because it contains a unique_ptr member. More... | |
WrappedFunctor & | operator= (const WrappedFunctor &)=delete |
WrappedFunctor (WrappedFunctor &&)=default | |
The remaining 5 special functions can be defaulted. More... | |
WrappedFunctor & | operator= (WrappedFunctor &&)=default |
virtual | ~WrappedFunctor ()=default |
virtual void | init () override |
Any post-construction initialization. More... | |
virtual void | init_context (const FEMContext &c) override |
Tell the context we don't need anything from it. More... | |
virtual std::unique_ptr< FEMFunctionBase< Output > > | clone () const override |
virtual Output | operator() (const FEMContext &, const Point &p, const Real time=0.) override |
virtual void | operator() (const FEMContext &, const Point &p, const Real time, DenseVector< Output > &output) override |
Evaluation function for time-dependent vector-valued functions. More... | |
virtual Output | component (const FEMContext &, unsigned int i, const Point &p, Real time=0.) override |
void | operator() (const FEMContext &, const Point &p, DenseVector< Output > &output) |
Evaluation function for time-independent vector-valued functions. More... | |
Protected Attributes | |
std::unique_ptr< FunctionBase< Output > > | _func |
This class provides a wrapper with which to evaluate a (libMesh-style) function pointer in a FunctionBase-compatible interface.
All overridden virtual functions are documented in fem_function_base.h.
Definition at line 47 of file wrapped_functor.h.
|
inline |
Constructor to wrap FunctionBase functors in a FEMFunctionBase compatible shim.
Definition at line 55 of file wrapped_functor.h.
|
inline |
Constructor to wrap scalar-valued function pointers.
Definition at line 62 of file wrapped_functor.h.
|
delete |
This class can't be copy constructed or assigned because it contains a unique_ptr member.
|
default |
The remaining 5 special functions can be defaulted.
|
virtualdefault |
|
inlineoverridevirtual |
The new copy should be as "deep" as necessary to allow independent destruction and simultaneous evaluations of the copies in different threads.
Implements libMesh::FEMFunctionBase< Output >.
Definition at line 95 of file wrapped_functor.h.
|
inlineoverridevirtual |
i
at coordinate p
and time time
.Reimplemented from libMesh::FEMFunctionBase< Output >.
Definition at line 111 of file wrapped_functor.h.
References libMesh::WrappedFunctor< Output >::_func.
|
inlineoverridevirtual |
Any post-construction initialization.
Reimplemented from libMesh::FEMFunctionBase< Output >.
Definition at line 88 of file wrapped_functor.h.
References libMesh::WrappedFunctor< Output >::_func.
|
overridevirtual |
Tell the context we don't need anything from it.
Reimplemented from libMesh::FEMFunctionBase< Output >.
Definition at line 124 of file wrapped_functor.h.
References dim, libMesh::FEMContext::elem_dimensions(), libMesh::FEMContext::get_element_fe(), libMesh::FEAbstract::get_nothing(), libMesh::make_range(), and libMesh::DiffContext::n_vars().
|
inlineoverridevirtual |
p
and time time
, which defaults to zero.Pure virtual, so you have to override it.
Implements libMesh::FEMFunctionBase< Output >.
Definition at line 100 of file wrapped_functor.h.
References libMesh::WrappedFunctor< Output >::_func.
|
inlineinherited |
Evaluation function for time-independent vector-valued functions.
Sets output values in the passed-in output
DenseVector.
Definition at line 149 of file fem_function_base.h.
|
inlineoverridevirtual |
Evaluation function for time-dependent vector-valued functions.
Sets output values in the passed-in output
DenseVector.
Pure virtual, so you have to override it.
Implements libMesh::FEMFunctionBase< Output >.
Definition at line 105 of file wrapped_functor.h.
References libMesh::WrappedFunctor< Output >::_func.
|
delete |
|
default |
|
protected |
Definition at line 119 of file wrapped_functor.h.
Referenced by libMesh::WrappedFunctor< Output >::component(), libMesh::WrappedFunctor< Output >::init(), and libMesh::WrappedFunctor< Output >::operator()().