|
libMesh
|
Wraps a function pointer into a FunctionBase object. More...
#include <analytic_function.h>
Public Types | |
| typedef Output(* | OutputFunction) (const Point &p, const Real time) |
| Scalar return value function pointer type. More... | |
| typedef void(* | OutputVectorFunction) (DenseVector< Output > &output, const Point &p, const Real time) |
| Vector return value function pointer type. More... | |
Public Member Functions | |
| AnalyticFunction (OutputFunction fptr) | |
| Constructor. More... | |
| AnalyticFunction (OutputVectorFunction fptr) | |
| Constructor. More... | |
| AnalyticFunction (AnalyticFunction &&)=default | |
| The 5 special functions can be defaulted for this class. More... | |
| AnalyticFunction (const AnalyticFunction &)=default | |
| AnalyticFunction & | operator= (const AnalyticFunction &)=default |
| AnalyticFunction & | operator= (AnalyticFunction &&)=default |
| virtual | ~AnalyticFunction ()=default |
| virtual void | init () override |
| The actual initialization process. More... | |
| virtual void | clear () override |
| Clears the function. More... | |
| virtual std::unique_ptr< FunctionBase< Output > > | clone () const override |
| virtual Output | operator() (const Point &p, const Real time=0.) override |
| virtual void | operator() (const Point &p, const Real time, DenseVector< Output > &output) override |
| Evaluation function for time-dependent vector-valued functions. More... | |
| void | operator() (const Point &p, DenseVector< Output > &output) |
| Evaluation function for time-independent vector-valued functions. More... | |
| virtual Output | component (unsigned int i, const Point &p, Real time=0.) |
| bool | initialized () const |
| void | set_is_time_dependent (bool is_time_dependent) |
| Function to set whether this is a time-dependent function or not. More... | |
| bool | is_time_dependent () const |
Public Attributes | |
| OutputFunction | _number_fptr |
| Pointer to user-provided function that computes the boundary values when an analytical expression is available. More... | |
| OutputVectorFunction | _vector_fptr |
| Pointer to user-provided vector valued function. More... | |
Protected Attributes | |
| const FunctionBase * | _master |
Const pointer to our master, initialized to nullptr. More... | |
| bool | _initialized |
When init() was called so that everything is ready for calls to operator() (...), then this bool is true. More... | |
| bool | _is_time_dependent |
| Cache whether or not this function is actually time-dependent. More... | |
Wraps a function pointer into a FunctionBase object.
This class provides function-like objects for which an analytical expression can be provided. The user may either provide a function pointer that returns a vector or a number. All overridden virtual functions are documented in function_base.h.
Definition at line 48 of file analytic_function.h.
| typedef Output(* libMesh::AnalyticFunction< Output >::OutputFunction) (const Point &p, const Real time) |
Scalar return value function pointer type.
Definition at line 53 of file analytic_function.h.
| typedef void(* libMesh::AnalyticFunction< Output >::OutputVectorFunction) (DenseVector< Output > &output, const Point &p, const Real time) |
Vector return value function pointer type.
Definition at line 62 of file analytic_function.h.
| libMesh::AnalyticFunction< Output >::AnalyticFunction | ( | OutputFunction | fptr | ) |
Constructor.
Takes a function pointer for scalar return values.
Definition at line 134 of file analytic_function.h.
References libMesh::FunctionBase< Output >::_initialized, fptr(), and libMesh::libmesh_assert().
|
inline |
Constructor.
Takes a function pointer for vector valued functions.
Definition at line 147 of file analytic_function.h.
References libMesh::FunctionBase< Output >::_initialized, fptr(), and libMesh::libmesh_assert().
|
default |
The 5 special functions can be defaulted for this class.
|
default |
|
virtualdefault |
|
inlineoverridevirtual |
Clears the function.
Reimplemented from libMesh::FunctionBase< Output >.
Definition at line 172 of file analytic_function.h.
|
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::FunctionBase< Output >.
Definition at line 187 of file analytic_function.h.
|
inlinevirtualinherited |
i at coordinate p and time time.i+1 which will result in unexpected behaviour if operator() makes any access beyond that limit. Reimplemented in TripleFunction, libMesh::CompositeFunction< Output >, SolutionGradient< dim >, SolutionGradient< dim >, SolutionGradient< dim >, libMesh::ParsedFunction< Output, OutputGradient >, libMesh::ParsedFunction< T >, SolutionGradient< dim >, libMesh::WrappedFunction< Output >, SolutionGradient< dim >, SolutionGradient< dim >, SolutionGradient< dim >, SolutionFunction< dim >, PeriodicQuadFunction, SolutionFunction< dim >, SolutionFunction< dim >, SolutionFunction< dim >, SolutionFunction< dim >, SolutionFunction< dim >, and SolutionFunction< dim >.
Definition at line 232 of file function_base.h.
|
overridevirtual |
The actual initialization process.
Reimplemented from libMesh::FunctionBase< Output >.
Definition at line 159 of file analytic_function.h.
References libMesh::libmesh_assert().
|
inlineinherited |
true when this object is properly initialized and ready for use, false otherwise. Definition at line 210 of file function_base.h.
Referenced by libMesh::MeshFunction::MeshFunction().
|
inlineinherited |
true when the function this object represents is actually time-dependent, false otherwise. Definition at line 224 of file function_base.h.
Referenced by libMesh::CompositeFunction< Output >::attach_subfunction(), CompositeFunctionTest::testTimeDependence(), and ParsedFunctionTest::testTimeDependence().
|
inlineoverridevirtual |
p and time time, which defaults to zero.Pure virtual, so you have to override it.
Implements libMesh::FunctionBase< Output >.
Definition at line 111 of file analytic_function.h.
References libMesh::initialized(), and libMesh::libmesh_assert().
|
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::FunctionBase< Output >.
Definition at line 122 of file analytic_function.h.
References libMesh::initialized(), and libMesh::libmesh_assert().
|
inlineinherited |
Evaluation function for time-independent vector-valued functions.
Sets output values in the passed-in output DenseVector.
Definition at line 245 of file function_base.h.
|
default |
|
default |
|
inlineinherited |
Function to set whether this is a time-dependent function or not.
This is intended to be only used by subclasses who cannot natively determine time-dependence. In such a case, this function should be used immediately following construction.
Definition at line 217 of file function_base.h.
|
protectedinherited |
When init() was called so that everything is ready for calls to operator() (...), then this bool is true.
Definition at line 184 of file function_base.h.
Referenced by libMesh::AnalyticFunction< Output >::AnalyticFunction(), libMesh::ConstFunction< Output >::ConstFunction(), and libMesh::WrappedFunction< Output >::WrappedFunction().
|
protectedinherited |
Cache whether or not this function is actually time-dependent.
Definition at line 189 of file function_base.h.
Referenced by libMesh::CompositeFunction< Output >::attach_subfunction(), and libMesh::ConstFunction< Output >::ConstFunction().
|
protectedinherited |
Const pointer to our master, initialized to nullptr.
There may be cases where multiple functions are required, but to save memory, one master handles some centralized data.
Definition at line 178 of file function_base.h.
| OutputFunction libMesh::AnalyticFunction< Output >::_number_fptr |
Pointer to user-provided function that computes the boundary values when an analytical expression is available.
Definition at line 84 of file analytic_function.h.
| OutputVectorFunction libMesh::AnalyticFunction< Output >::_vector_fptr |
Pointer to user-provided vector valued function.
Definition at line 89 of file analytic_function.h.
1.8.14