22 #ifndef bempp_interpolated_function_hpp
23 #define bempp_interpolated_function_hpp
25 #include "../common/common.hpp"
27 #include "function.hpp"
29 #include "../grid/vtk_writer.hpp"
30 #include "../fiber/scalar_traits.hpp"
32 #include "../common/armadillo_fwd.hpp"
40 template <
typename ValueType>
class InterpolatedFunction;
50 template <
typename ValueType>
56 enum InterpolationMethod {
62 const arma::Mat<ValueType>& vertexValues,
63 InterpolationMethod method = LINEAR);
68 virtual int worldDimension()
const;
69 virtual int codomainDimension()
const;
70 virtual void addGeometricalDependencies(
size_t& geomDeps)
const;
73 arma::Mat<ValueType>& result)
const;
95 const char* fileNamesBase,
const char* filesPath = 0,
118 ValueType other)
const;
125 arma::Mat<ValueType> m_vertexValues;
126 InterpolationMethod m_method;
132 template <
typename ValueType>
142 template <
typename ValueType>
146 return operator*(rhs, lhs);
Traits of scalar types.
Definition: scalar_traits.hpp:40
const InterpolatedFunction< ValueType > operator*(const InterpolatedFunction< ValueType > &lhs, ValueType rhs)
Return an InterpolatedFunction representing the function lhs multiplied by the scalar rhs...
Definition: interpolated_function.hpp:143
OutputType
How data should be stored in a VTK file.
Definition: vtk_writer.hpp:46
InterpolatedFunction(const Grid &grid, const arma::Mat< ValueType > &vertexValues, InterpolationMethod method=LINEAR)
Construct function given its values at vertices of a grid.
Definition: interpolated_function.cpp:37
Storage of geometrical data.
Definition: geometrical_data.hpp:54
Function defined by its values at a set of interpolation points and an interpolation method...
Definition: interpolated_function.hpp:51
Abstract wrapper of a grid.
Definition: grid.hpp:50
Function to be used as a source term.
Definition: function.hpp:39
const InterpolatedFunction< ValueType > operator*(ValueType lhs, const InterpolatedFunction< ValueType > &rhs)
Return an InterpolatedFunction representing the function rhs multiplied by the scalar lhs...
Definition: interpolated_function.hpp:133
InterpolatedFunction< ValueType > & operator+=(const InterpolatedFunction< ValueType > &rhs)
Copy vertex values from a function defined on a subset of the surface of the interpolation grid...
Definition: interpolated_function.cpp:136
Output to the file is in ascii.
Definition: vtk_writer.hpp:48
const Grid & grid() const
Interpolation grid.
Definition: interpolated_function.cpp:54
void exportToVtk(const char *dataLabel, const char *fileNamesBase, const char *filesPath=0, VtkWriter::OutputType type=VtkWriter::ASCII) const
Definition: interpolated_function.cpp:95