6#ifndef __FIBER_ARRAYINTERPOLATOR_HPP
7#define __FIBER_ARRAYINTERPOLATOR_HPP
10#include <memcore/RefPtr.hpp>
11#include <memcore/Interface.hpp>
13#include <fiber/vector/MultiArray.hpp>
39 virtual bool getInterpolatedValue(
double result[],
int nElements,
const double coords[],
int nCoords)
const = 0;
58 bool getInterpolatedValue(
double result[],
int nElements,
const double coords[],
int nCoords)
const override
63 return getValue( result, nElements, *
static_cast<IpolPoint_t*
>(coords) );
68template <
int N,
class T>
69 class CubicInterpolator :
public DimensionalInterpolator
74 typedef Interpolate<N, T, CubicIpol<T>,
double> CubicIpol_t;
80 ~StorageInterpolator()
83 int FieldRank()
const override
85 typedef FiberInfo<T> FiberInfo_t;
86 return FiberInfo_t::MULTIPLICITY;
90 bool getValue(
double result[],
int nElements,
const IpolPoint_t&P)
const override
95 CubicIpol_t ccip(myMemArray->myMultiArray, P);
96 const T&t = ccip.eval();
98 typedef FiberInfo<T> FiberInfo_t;
100 for(; i<FiberInfo_t::MULTIPLICITY; i++)
102 result[i] = FiberInfo_t::getComponent(t, i);
A field's interpolator is an interface for this specific field.
Definition ArrayInterpolator.hpp:29
virtual int CoordRank() const =0
Number of dimensions of the base manifold.
virtual int FieldRank() const =0
Number of elements per point.
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Abstract N-dimensional interpolator class.
Definition ArrayInterpolator.hpp:47
int CoordRank() const override
Number of dimensions of the base manifold.
Definition ArrayInterpolator.hpp:53
const T & getValue(index_t i) const
Get the value, readonly.
Definition vector/Iterator.hpp:718
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2