Functor for linear interpolation on a regular grid. More...
#include <LinInterpGrid.h>
Public Types | |
typedef base_type::argument_type | argument_type |
The argument type is a Cartesian point. | |
typedef base_type::result_type | result_type |
The result type is the field. | |
typedef T | Number |
The number type. | |
typedef F | Field |
The field type. | |
typedef geom::RegularGrid< N, Number > | Grid |
A regular grid. | |
typedef ads::Array< N, Field, A > | FieldArray |
The field array. | |
typedef Grid::Point | Point |
A Cartesian point. | |
typedef Grid::BBox | BBox |
A bounding box. | |
typedef FieldArray::index_type | index_type |
The (multi) index type. | |
typedef FieldArray::size_type | size_type |
The size type. | |
typedef FieldArray::unqualified_value_type | unqualified_Field |
The unqalified field type. | |
Public Member Functions | |
Constructors etc. | |
LinInterpGrid () | |
Default constructor. | |
template<bool A2> | |
LinInterpGrid (const ads::Array< N, Field, A2 > &fields, const BBox domain) | |
Construct from the field array and the Cartesian domain. | |
template<bool A2> | |
void | build (const ads::Array< N, Field, A2 > &fields, const BBox domain) |
Build from the field array and the Cartesian domain. | |
LinInterpGrid (const LinInterpGrid &x) | |
Copy constructor. | |
LinInterpGrid & | operator= (const LinInterpGrid &x) |
Assignment operator. | |
~LinInterpGrid () | |
Destructor. Deletes memory only if it was allocated internally. | |
Interpolation. | |
result_type | operator() (argument_type x) const |
Interpolate the field at the specified point. | |
Accessors. | |
const FieldArray & | fields () const |
Return the field array. | |
const BBox & | domain () const |
Return the Cartesian domain. | |
Manipulators | |
FieldArray & | fields () |
Return the field array. | |
void | set_domain (const BBox &domain) |
Set the Cartesian domain. | |
void | resize (const index_type &extents) |
Resize the fields array. | |
Static Public Member Functions | |
Static member functions. | |
static int | space_dimension () |
Return the dimension of the space. |
Functor for linear interpolation on a regular grid.
N | is the space dimension. | |
F | is the field type. By default it is double. | |
A | determines whether the grid will allocate memory its own memory or use externally allocated memory. By default A is true. | |
T | is the number type. By default it is double. |
LinInterpGrid< N, F, A, T >::LinInterpGrid | ( | const ads::Array< N, Field, A2 > & | fields, | |
const BBox | domain | |||
) | [inline] |
Construct from the field array and the Cartesian domain.
fields | is the array of fields. | |
domain | is the Cartesian domain. |
void LinInterpGrid< N, F, A, T >::build | ( | const ads::Array< N, Field, A2 > & | fields, | |
const BBox | domain | |||
) | [inline] |
Build from the field array and the Cartesian domain.
fields | is the array of fields. | |
domain | is the Cartesian domain. |
FieldArray& LinInterpGrid< N, F, A, T >::fields | ( | ) | [inline] |
Return the field array.