20 #ifndef LIBMESH_MESHLESS_INTERPOLATION_FUNCTION_H 21 #define LIBMESH_MESHLESS_INTERPOLATION_FUNCTION_H 24 #include "libmesh/function_base.h" 25 #include "libmesh/meshfree_interpolation.h" 26 #include "libmesh/threads.h" 48 mutable std::vector<Point>
_pts;
49 mutable std::vector<Number>
_vals;
77 virtual std::unique_ptr<FunctionBase<Number>>
clone ()
const;
108 Threads::spin_mutex::scoped_lock lock(
_mutex);
113 return _vals.front();
124 output(0) = (*this)(p, time);
144 std::unique_ptr<FunctionBase<Number>>
147 return std::make_unique<MeshlessInterpolationFunction>(
_mfi,
_mutex);
154 #endif // LIBMESH_MESHLESS_INTERPOLATION_FUNCTION_H const std::vector< std::string > & field_variables() const
void clear()
Clears the function.
std::vector< Point > _pts
void resize(const unsigned int n)
Resize the vector.
std::vector< Number > _vals
void init()
The actual initialization process.
The libMesh namespace provides an interface to certain functionality in the library.
Number operator()(const Point &p, const Real time=0.)
virtual void interpolate_field_data(const std::vector< std::string > &field_names, const std::vector< Point > &tgt_pts, std::vector< Number > &tgt_vals) const =0
Interpolate source data at target points.
Base class to support various mesh-free interpolation methods.
Threads::spin_mutex & _mutex
const MeshfreeInterpolation & _mfi
MeshlessInterpolationFunction(const MeshfreeInterpolation &mfi, Threads::spin_mutex &mutex)
Constructor.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Defines a dense vector for use in Finite Element-type computations.
virtual std::unique_ptr< FunctionBase< Number > > clone() const
Returns a new deep copy of the function.
Base class for functors that can be evaluated at a point and (optionally) time.
A Point defines a location in LIBMESH_DIM dimensional Real space.