Go to the documentation of this file.
20 #ifndef LIBMESH_MESH_FUNCTION_H
21 #define LIBMESH_MESH_FUNCTION_H
24 #include "libmesh/function_base.h"
25 #include "libmesh/dense_vector.h"
26 #include "libmesh/vector_value.h"
27 #include "libmesh/tensor_value.h"
28 #include "libmesh/tree_base.h"
29 #include "libmesh/parallel_object.h"
40 template <
typename T>
class DenseVector;
41 class EquationSystems;
42 template <
typename T>
class NumericVector;
44 class PointLocatorBase;
69 const std::vector<unsigned int> & vars,
83 const unsigned int var,
121 virtual void clear ()
override;
132 virtual std::unique_ptr<FunctionBase<Number>>
clone ()
const override;
139 const Real time=0.)
override;
168 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
195 const std::set<subdomain_id_type> * subdomain_ids);
214 const std::set<subdomain_id_type> * subdomain_ids);
224 std::vector<Gradient> & output,
225 const std::set<subdomain_id_type> * subdomain_ids =
nullptr);
234 std::map<
const Elem *, std::vector<Gradient>> & output);
243 std::map<
const Elem *, std::vector<Gradient>> & output,
244 const std::set<subdomain_id_type> * subdomain_ids);
254 std::vector<Tensor> & output,
255 const std::set<subdomain_id_type> * subdomain_ids =
nullptr);
313 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
322 const std::set<subdomain_id_type> * subdomain_ids =
nullptr)
const;
376 #endif // LIBMESH_MESH_FUNCTION_H
const Elem * find_element(const Point &p, const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
Helper function to reduce code duplication.
Base class for functors that can be evaluated at a point and (optionally) time.
DenseVector< Number > _out_of_mesh_value
Value to return outside the mesh if out-of-mesh mode is enabled.
virtual void init() override
Override the FunctionBase::init() member function by calling our own and specifying the Trees::NODES ...
Number operator()(const Point &p, const Real time=0.) override
This class provides function-like objects for data distributed over a mesh.
std::set< const Elem * > find_elements(const Point &p, const std::set< subdomain_id_type > *subdomain_ids=nullptr) const
The libMesh namespace provides an interface to certain functionality in the library.
std::map< const Elem *, Gradient > discontinuous_gradient(const Point &p, const Real time=0.)
virtual std::unique_ptr< FunctionBase< Number > > clone() const override
std::map< const Elem *, Number > discontinuous_value(const Point &p, const Real time=0.)
MeshFunction & operator=(const MeshFunction &)=delete
This class contains const references so it can't be assigned.
BuildType
enum defining how to build the tree.
Tensor hessian(const Point &p, const Real time=0.)
const PointLocatorBase & get_point_locator(void) const
This class defines a vector in LIBMESH_DIM dimensional Real or Complex space.
void set_point_locator_tolerance(Real tol)
We may want to specify a tolerance for the PointLocator to use, since in some cases the point we want...
void enable_out_of_mesh_mode(const DenseVector< Number > &value)
Enables out-of-mesh mode.
This class defines a tensor in LIBMESH_DIM dimensional Real or Complex space.
A Point defines a location in LIBMESH_DIM dimensional Real space.
PointLocatorBase * _point_locator
A point locator is needed to locate the points in the mesh.
const EquationSystems & _eqn_systems
The equation systems handler, from which the data are gathered.
~MeshFunction()
Destructor.
void unset_point_locator_tolerance()
Turn off the user-specified PointLocator tolerance.
const DofMap & _dof_map
Need access to the DofMap of the other system.
This is the EquationSystems class.
const NumericVector< Number > & _vector
A reference to the vector that holds the data that is to be interpolated.
bool _out_of_mesh_mode
true if out-of-mesh mode is enabled.
This class handles the numbering of degrees of freedom on a mesh.
void disable_out_of_mesh_mode(void)
Disables out-of-mesh mode.
const std::vector< unsigned int > _system_vars
The indices of the variables within the other system for which data are to be gathered.
This is the base class from which all geometric element types are derived.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
An object whose state is distributed along a set of processors.
This is the base class for point locators.
virtual void clear() override
Clears the function.
MeshFunction(const EquationSystems &eqn_systems, const NumericVector< Number > &vec, const DofMap &dof_map, const std::vector< unsigned int > &vars, const FunctionBase< Number > *master=nullptr)
Constructor for mesh based functions with vectors as return value.
Gradient gradient(const Point &p, const Real time=0.)