20 #ifndef __mast__mesh_field_function__ 21 #define __mast__mesh_field_function__ 28 #include "libmesh/numeric_vector.h" 29 #include "libmesh/mesh_function.h" 30 #include "libmesh/system.h" 37 class SystemInitialization;
52 const std::string& nm,
53 libMesh::ParallelType p_type);
60 const std::string& nm,
61 libMesh::ParallelType p_type);
74 virtual void operator() (
const libMesh::Point& p,
83 virtual void gradient(
const libMesh::Point& p,
111 const libMesh::Point& p,
120 const libMesh::Point& p,
132 void init(
const libMesh::NumericVector<Real>& sol,
bool reuse_vector);
139 const libMesh::NumericVector<Real>& dsol,
198 const libMesh::NumericVector<Real>*
_sol;
205 const libMesh::NumericVector<Real>& sol,
243 std::map<const MAST::FunctionBase*, MAST::MeshFieldFunction::SolFunc*>
_function_sens;
247 #endif // __mast__mesh_field_function__
virtual void perturbation_gradient(const libMesh::Point &p, const Real t, RealMatrixX &v) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
virtual void gradient(const libMesh::Point &p, const Real t, RealMatrixX &g) const
calculates the gradient of value of the function at the specified point, p, and time, t, and returns it in g.
virtual void perturbation(const libMesh::Point &p, const Real t, RealVectorX &v) const
calculates the value of perturbation in the function at the specified point, p, and time...
void init(const libMesh::NumericVector< Real > &sol, bool reuse_vector)
initializes the data structures to perform the interpolation function of sol.
void _init_sol_func(bool reuse_sol, const libMesh::NumericVector< Real > &sol, MAST::MeshFieldFunction::SolFunc &sol_func)
SolFunc * _function
current solution that is going to be interpolated
MeshFieldFunction(MAST::SystemInitialization &sys, const std::string &nm, libMesh::ParallelType p_type)
constructor
SolFunc * _perturbed_function
current perturbation solution that is going to be interpolated
This provides a wrapper FieldFunction compatible class that interpolates the solution using libMesh's...
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealVectorX &v) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
libMesh::ParallelType _p_type
type of parallel vector required for this mesh function.
virtual void clear_element_quadrature_point_solution()
clears the quadrature point solution provided by the corresponding set method above.
libMesh::MeshFunction * _func
virtual void derivative_gradient(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &v) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
libMesh::NumericVector< Real > * _cloned_sol
RealVectorX _qp_sol
quadrature point solution of the element
virtual void set_element_quadrature_point_solution(RealVectorX &sol)
When a mesh field function is attached to an assembly routine during system assembly, then the current solution can be provided by the element quadrature point update.
libMesh::MeshFunction & get_perturbed_function()
Matrix< Real, Dynamic, Dynamic > RealMatrixX
virtual void operator()(const libMesh::Point &p, const Real t, RealVectorX &v) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
This creates the base class for functions that have a saptial and temporal dependence, and provide sensitivity operations with respect to the functions and parameters.
void clear()
clear the solution
Matrix< Real, Dynamic, 1 > RealVectorX
libMesh::MeshFunction & get_function()
const libMesh::NumericVector< Real > * _sol
bool _use_qp_sol
flag is set to true when the quadrature point solution is provided by an element
void init_sens(const MAST::FunctionBase &f, const libMesh::NumericVector< Real > &dsol, bool reuse_vector)
initializes the the data structures for computation of sensitivity for the specified function...
libMesh::System * _sys
current system for which solution is to be interpolated
virtual ~MeshFieldFunction()
destructor
std::map< const MAST::FunctionBase *, MAST::MeshFieldFunction::SolFunc * > _function_sens
solution sensitivity for specified value