36 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__USER_DATA__IDW_USER_DATA__
37 #define __H__UG__LIB_DISC__SPATIAL_DISC__USER_DATA__IDW_USER_DATA__
93 template <
int WDim,
typename TPntIterator,
typename TData = number>
99 static const int dim = WDim;
145 template <
int WDim,
typename TData = number>
152 static const int dim = WDim;
209 typedef typename std::vector<data_item>::const_iterator pnt_iter_type;
const TData & value(size_t s, size_t ip) const
returns the value at ip
Definition: user_data.h:512
number time() const
get the current evaluation time
Definition: user_data.h:285
Class for inverse distance weighting based on a general data type.
Definition: invdist_user_data.h:95
static void compute(data_type &res, const MathVector< dim > &pos, t_pnt_iter pnt_beg, t_pnt_iter pnt_end, number order, number small_dist=1e-7)
computes the interpolation basing on all the interpolation points
Definition: invdist_user_data_impl.h:44
TPntIterator t_pnt_iter
type of the interpolation point iterator
Definition: invdist_user_data.h:102
static const int dim
dimensionality of the space (i.e. of the coordinate vectors)
Definition: invdist_user_data.h:99
TData data_type
type of the data to extrapolate
Definition: invdist_user_data.h:105
UserData interface for the IDW interpolation.
Definition: invdist_user_data.h:148
void append(const MathVector< dim > &x, const data_type &val)
appends an interpolation point to the list
Definition: invdist_user_data.h:202
static const int dim
dimensionality of the space (i.e. of the coordinate vectors)
Definition: invdist_user_data.h:152
IDWUserData(number order, number R)
class constructor that creates an empty object with given parameters
Definition: invdist_user_data.h:177
void clear()
deletes all the interpolation points from the list
Definition: invdist_user_data.h:193
void load_data_from(std::istream &in)
loads data from a given stream (and appends the loaded points to the current list)
Definition: invdist_user_data_impl.h:131
~IDWUserData()
virtual destructor
Definition: invdist_user_data.h:182
std::vector< data_item > m_data
interpolation points
Definition: invdist_user_data.h:216
number m_order
order of the interpolation
Definition: invdist_user_data.h:217
TData data_type
type of the data to extrapolate
Definition: invdist_user_data.h:155
void evaluate(data_type &value, const MathVector< dim > &x, number time, int si) const
evaluates the data at a given point
Definition: invdist_user_data.h:207
void set_order(number order)
sets the order of the interpolation
Definition: invdist_user_data.h:190
void set_radius(number R)
sets the radius of the neighbourhood where the interpolation points are taken from
Definition: invdist_user_data.h:187
number m_R
radius of the neighbourhood to look for the interpolation points in (0 == infinite)
Definition: invdist_user_data.h:218
IDWUserData()
class constructor that creates an empty object with default parameters
Definition: invdist_user_data.h:172
Definition: std_glob_pos_data.h:55
double number
Definition: types.h:124
type of a interpolation point data item
Definition: invdist_user_data.h:161
data_type value
value at that point
Definition: invdist_user_data.h:163
MathVector< dim > pos
(global) geometrical coordinates of the point
Definition: invdist_user_data.h:162
data_item(const MathVector< dim > &x, const data_type &v)
Definition: invdist_user_data.h:165
data_item(const data_item &dat)
Definition: invdist_user_data.h:166