| 
    libMesh
    
   | 
 
Wrap a libMesh-style function pointer into a FunctionBase object. More...
#include <wrapped_function.h>
Public Member Functions | |
| WrappedFunction (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... | |
| WrappedFunction (WrappedFunction &&)=default | |
| The move/copy ctor and destructor are defaulted for this class.  More... | |
| WrappedFunction (const WrappedFunction &)=default | |
| virtual | ~WrappedFunction ()=default | 
| WrappedFunction & | operator= (const WrappedFunction &)=delete | 
| This class contains a const reference so it can't be assigned.  More... | |
| WrappedFunction & | operator= (WrappedFunction &&)=delete | 
| 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... | |
| virtual Output | component (unsigned int i, const Point &p, Real time=0.) override | 
| virtual void | init () | 
| The actual initialization process.  More... | |
| virtual void | clear () | 
| Clears the function.  More... | |
| void | operator() (const Point &p, DenseVector< Output > &output) | 
| Evaluation function for time-independent vector-valued functions.  More... | |
| 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 | 
Protected Attributes | |
| const System & | _sys | 
| Output(* | _fptr )(const Point &p, const Parameters ¶meters, const std::string &sys_name, const std::string &unknown_name) | 
| const Parameters * | _parameters | 
| unsigned int | _varnum | 
| 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... | |
Wrap a libMesh-style function pointer into a FunctionBase object.
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 function_base.h.
Definition at line 51 of file wrapped_function.h.
      
  | 
  inline | 
Constructor to wrap scalar-valued function pointers.
Definition at line 58 of file wrapped_function.h.
References libMesh::FunctionBase< Output >::_initialized, libMesh::WrappedFunction< Output >::_parameters, libMesh::System::get_equation_systems(), and libMesh::EquationSystems::parameters.
      
  | 
  default | 
The move/copy ctor and destructor are defaulted for this class.
      
  | 
  default | 
      
  | 
  virtualdefault | 
      
  | 
  inlinevirtualinherited | 
Clears the function.
Reimplemented in libMesh::MeshFunction, libMesh::AnalyticFunction< Output >, libMesh::ParsedFunction< Output, OutputGradient >, libMesh::ParsedFunction< T >, libMesh::MeshlessInterpolationFunction, libMesh::MeshlessInterpolationFunction, and ExampleOneFunction.
Definition at line 91 of file function_base.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 137 of file wrapped_function.h.
      
  | 
  inlineoverridevirtual | 
i at coordinate p and time time.Reimplemented from libMesh::FunctionBase< Output >.
Definition at line 187 of file wrapped_function.h.
References libMesh::libmesh_assert(), n_vars, and libMesh::SCALAR.
      
  | 
  inlinevirtualinherited | 
The actual initialization process.
Reimplemented in libMesh::MeshFunction, libMesh::AnalyticFunction< Output >, libMesh::ParsedFunction< Output, OutputGradient >, libMesh::ParsedFunction< T >, libMesh::MeshlessInterpolationFunction, libMesh::MeshlessInterpolationFunction, and ExampleOneFunction.
Definition at line 86 of file function_base.h.
      
  | 
  inlineinherited | 
true when this object is properly initialized and ready for use, false otherwise. Definition at line 205 of file function_base.h.
      
  | 
  inlineinherited | 
true when the function this object represents is actually time-dependent, false otherwise. Definition at line 219 of file function_base.h.
Referenced by libMesh::CompositeFunction< Output >::attach_subfunction(), CompositeFunctionTest::testTimeDependence(), and ParsedFunctionTest::testTimeDependence().
      
  | 
  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 146 of file wrapped_function.h.
References libMesh::libmesh_assert(), n_vars, libMesh::SCALAR, and libMesh::DenseVector< T >::size().
      
  | 
  inlineoverridevirtual | 
p and time time, which defaults to zero.Pure virtual, so you have to override it.
Implements libMesh::FunctionBase< Output >.
Definition at line 122 of file wrapped_function.h.
References libMesh::libmesh_assert().
      
  | 
  inlineinherited | 
Evaluation function for time-independent vector-valued functions.
Sets output values in the passed-in output DenseVector. 
Definition at line 240 of file function_base.h.
      
  | 
  delete | 
This class contains a const reference so it can't be assigned.
      
  | 
  delete | 
      
  | 
  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 212 of file function_base.h.
      
  | 
  protected | 
Definition at line 105 of file wrapped_function.h.
      
  | 
  protectedinherited | 
When init() was called so that everything is ready for calls to operator() (...), then this bool is true. 
Definition at line 179 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 184 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 173 of file function_base.h.
      
  | 
  protected | 
Definition at line 110 of file wrapped_function.h.
Referenced by libMesh::WrappedFunction< Output >::WrappedFunction().
      
  | 
  protected | 
Definition at line 103 of file wrapped_function.h.
      
  | 
  protected | 
Definition at line 112 of file wrapped_function.h.
 1.8.16