ASPECT
Public Member Functions | Private Attributes | List of all members
aspect::Utilities::VectorFunctionFromVelocityFunctionObject< dim > Class Template Reference
Inheritance diagram for aspect::Utilities::VectorFunctionFromVelocityFunctionObject< dim >:
Inheritance graph
[legend]

Public Member Functions

 VectorFunctionFromVelocityFunctionObject (const unsigned int n_components, const std::function< Tensor< 1, dim >(const Point< dim > &)> &function_object)
 
double value (const Point< dim > &p, const unsigned int component=0) const override
 
void vector_value (const Point< dim > &p, Vector< double > &values) const override
 

Private Attributes

const std::function< Tensor< 1, dim >const Point< dim > &)> function_object
 

Detailed Description

template<int dim>
class aspect::Utilities::VectorFunctionFromVelocityFunctionObject< dim >

Conversion object where one can provide a function that returns a tensor for the velocity at a given point and it returns something that matches the Function interface with a number of output components equal to the number of components of the finite element in use.

Definition at line 1047 of file utilities.h.

Constructor & Destructor Documentation

§ VectorFunctionFromVelocityFunctionObject()

template<int dim>
aspect::Utilities::VectorFunctionFromVelocityFunctionObject< dim >::VectorFunctionFromVelocityFunctionObject ( const unsigned int  n_components,
const std::function< Tensor< 1, dim >(const Point< dim > &)> &  function_object 
)

Given a function object that takes a Point and returns a Tensor<1,dim>, convert this into an object that matches the Function<dim> interface.

Parameters
n_componentstotal number of components of the finite element system.
function_objectThe function that will form one component of the resulting Function object.

Member Function Documentation

§ value()

template<int dim>
double aspect::Utilities::VectorFunctionFromVelocityFunctionObject< dim >::value ( const Point< dim > &  p,
const unsigned int  component = 0 
) const
override

Return the value of the function at the given point. Returns the value the function given to the constructor produces for this point.

§ vector_value()

template<int dim>
void aspect::Utilities::VectorFunctionFromVelocityFunctionObject< dim >::vector_value ( const Point< dim > &  p,
Vector< double > &  values 
) const
override

Return all components of a vector-valued function at a given point.

values shall have the right size beforehand, i.e. #n_components.

Member Data Documentation

§ function_object

template<int dim>
const std::function<Tensor<1,dim>const Point<dim> &)> aspect::Utilities::VectorFunctionFromVelocityFunctionObject< dim >::function_object
private

The function object which we call when this class's value() or value_list() functions are called.

Definition at line 1089 of file utilities.h.


The documentation for this class was generated from the following file: