Go to the documentation of this file.
   20 #ifndef LIBMESH_ANALYTIC_FUNCTION_H 
   21 #define LIBMESH_ANALYTIC_FUNCTION_H 
   24 #include "libmesh/function_base.h" 
   47 template <
typename Output=Number>
 
   91   virtual void init () 
override;
 
   93   virtual void clear () 
override;
 
   95   virtual std::unique_ptr<FunctionBase<Output>> 
clone () 
const override;
 
   98                              const Real time=0.) 
override;
 
  109 template <
typename Output>
 
  115   return (this->_number_fptr(p, time));
 
  120 template <
typename Output>
 
  127   this->_vector_fptr(output, p, time);
 
  133 template <
typename Output>
 
  137   _vector_fptr (nullptr)
 
  145 template <
typename Output>
 
  149   _number_fptr (nullptr),
 
  158 template <
typename Output>
 
  162   libmesh_assert ((_number_fptr != 
nullptr) || (_vector_fptr != 
nullptr));
 
  165   this->_initialized = 
true;
 
  170 template <
typename Output>
 
  175   _number_fptr = 
nullptr;
 
  176   _vector_fptr = 
nullptr;
 
  179   this->_initialized = 
false;
 
  184 template <
typename Output>
 
  186 std::unique_ptr<FunctionBase<Output>>
 
  189   return std::unique_ptr<FunctionBase<Output>>
 
  199 #endif // LIBMESH_ANALYTIC_FUNCTION_H 
  
Base class for functors that can be evaluated at a point and (optionally) time.
 
OutputFunction _number_fptr
Pointer to user-provided function that computes the boundary values when an analytical expression is ...
 
The libMesh namespace provides an interface to certain functionality in the library.
 
virtual void init() override
The actual initialization process.
 
virtual ~AnalyticFunction()=default
 
virtual Output operator()(const Point &p, const Real time=0.) override
 
OutputVectorFunction _vector_fptr
Pointer to user-provided vector valued function.
 
bool _initialized
When init() was called so that everything is ready for calls to operator() (...), then this bool is t...
 
Wraps a function pointer into a FunctionBase object.
 
A Point defines a location in LIBMESH_DIM dimensional Real space.
 
virtual std::unique_ptr< FunctionBase< Output > > clone() const override
 
virtual void clear() override
Clears the function.
 
bool initialized()
Checks that library initialization has been done.
 
AnalyticFunction(OutputFunction fptr)
Constructor.
 
AnalyticFunction & operator=(const AnalyticFunction &)=default
 
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
 
void(* OutputVectorFunction)(DenseVector< Output > &output, const Point &p, const Real time)
Vector return value function pointer type.
 
Number fptr(const Point &p, const Parameters &, const std::string &libmesh_dbg_var(sys_name), const std::string &unknown_name)
 
Output(* OutputFunction)(const Point &p, const Real time)
Scalar return value function pointer type.