OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Member Functions | Protected Attributes | List of all members
interpolation::Interpolator3dGridTo1d Class Referenceabstract

#include <Interpolator3dGridTo1d.h>

Inheritance diagram for interpolation::Interpolator3dGridTo1d:
Inheritance graph
[legend]
Collaboration diagram for interpolation::Interpolator3dGridTo1d:
Collaboration graph
[legend]

Public Member Functions

 Interpolator3dGridTo1d (ThreeDGrid *grid, double ***F)
 
 Interpolator3dGridTo1d ()
 
virtual ~Interpolator3dGridTo1d ()
 
virtual void function (const Mesh::Iterator &point, double *value) const
 
virtual void function (const double Point[3], double Value[1]) const =0
 
virtual Interpolator3dGridTo1dclone () const =0
 
int getNumberOfXCoords () const
 
int getNumberOfYCoords () const
 
int getNumberOfZCoords () const
 
unsigned int getPointDimension () const
 
unsigned int getValueDimension () const
 
ThreeDGridgetMesh () const
 
void setGrid (ThreeDGrid *grid)
 
void setX (int nCoords, double *x)
 
void setY (int nCoords, double *y)
 
void setZ (int nCoords, double *z)
 
void setF (double ***inF)
 
void deleteFunc (double ***func)
 
double *** function () const
 
void setAll (ThreeDGrid *grid, double ***F)
 
void clear ()
 
- Public Member Functions inherited from interpolation::VectorMap
virtual void function (const double *point, double *value) const =0
 
virtual void functionAppend (const std::vector< std::vector< double > > &point_vec, std::vector< std::vector< double > > &value_vec) const
 
virtual bool checkPoint (const std::vector< double > &point) const
 
virtual bool checkValue (const std::vector< double > &value) const
 
virtual ~VectorMap ()
 

Protected Attributes

ThreeDGridcoordinates_m
 
double *** f_m
 

Detailed Description

Interpolator3dGridTo1d is an abstraction for lookup on a 3D mesh to get a 1D value.

Interpolator3dGridTo1d abstracts the lookup from a 3D mesh to get a 1D value This is a building block for higher dimension (e.g. field vector lookup) where we can do multiple lookups one for each field, at the cost of doing multiple access/interpolation operations to the grid.

Definition at line 44 of file Interpolator3dGridTo1d.h.

Constructor & Destructor Documentation

◆ Interpolator3dGridTo1d() [1/2]

interpolation::Interpolator3dGridTo1d::Interpolator3dGridTo1d ( ThreeDGrid grid,
double ***  F 
)
inline

Constructor for grids with constant spacing

Parameters
grid3d mesh on which data is stored - adds a reference to *this into the mesh smart pointer thing.
Ffunction data with points on each element of the grid. Indexing goes like [index_x][index_y][index_z]. Interpolator3dGridTo1d now owns this memory

Definition at line 143 of file Interpolator3dGridTo1d.h.

References setAll().

Here is the call graph for this function:

◆ Interpolator3dGridTo1d() [2/2]

interpolation::Interpolator3dGridTo1d::Interpolator3dGridTo1d ( )
inline

Default constructor - initialises data to NULL

Note I have no NULL checking on most member functions so be careful

Definition at line 148 of file Interpolator3dGridTo1d.h.

◆ ~Interpolator3dGridTo1d()

interpolation::Interpolator3dGridTo1d::~Interpolator3dGridTo1d ( )
inlinevirtual

Deletes F data and removes *this from ThreeDGrid smart pointer thing.

Definition at line 152 of file Interpolator3dGridTo1d.h.

References clear().

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void interpolation::Interpolator3dGridTo1d::clear ( )
inline

Clear all private data

Definition at line 216 of file Interpolator3dGridTo1d.h.

References coordinates_m, deleteFunc(), f_m, and interpolation::ThreeDGrid::remove().

Referenced by ~Interpolator3dGridTo1d().

Here is the call graph for this function:

◆ clone()

virtual Interpolator3dGridTo1d* interpolation::Interpolator3dGridTo1d::clone ( ) const
pure virtual

◆ deleteFunc()

void interpolation::Interpolator3dGridTo1d::deleteFunc ( double ***  func)

Delete any existing function data

Definition at line 31 of file Interpolator3dGridTo1d.cpp.

References getNumberOfXCoords(), and getNumberOfYCoords().

Referenced by clear(), and setF().

Here is the call graph for this function:

◆ function() [1/3]

double *** interpolation::Interpolator3dGridTo1d::function ( ) const
inline

Return a pointer to the function data

Definition at line 207 of file Interpolator3dGridTo1d.h.

References f_m.

◆ function() [2/3]

virtual void interpolation::Interpolator3dGridTo1d::function ( const double  Point[3],
double  Value[1] 
) const
pure virtual

Get the interpolated function data

Implemented in interpolation::TriLinearInterpolator.

◆ function() [3/3]

virtual void interpolation::Interpolator3dGridTo1d::function ( const Mesh::Iterator point,
double *  value 
) const
inlinevirtual

Call function at a particular point in the mesh

Reimplemented from interpolation::VectorMap.

Reimplemented in interpolation::TriLinearInterpolator.

Definition at line 66 of file Interpolator3dGridTo1d.h.

References interpolation::VectorMap::function().

Referenced by interpolation::Interpolator3dGridTo3d::function().

Here is the call graph for this function:

◆ getMesh()

ThreeDGrid * interpolation::Interpolator3dGridTo1d::getMesh ( ) const
inlinevirtual

Return a pointer to the mesh

Reimplemented from interpolation::VectorMap.

Definition at line 176 of file Interpolator3dGridTo1d.h.

References coordinates_m.

◆ getNumberOfXCoords()

int interpolation::Interpolator3dGridTo1d::getNumberOfXCoords ( ) const
inline

Number of x coordinates in the grid

Definition at line 156 of file Interpolator3dGridTo1d.h.

References coordinates_m, and interpolation::ThreeDGrid::xSize().

Referenced by deleteFunc().

Here is the call graph for this function:

◆ getNumberOfYCoords()

int interpolation::Interpolator3dGridTo1d::getNumberOfYCoords ( ) const
inline

Number of y coordinates in the grid

Definition at line 160 of file Interpolator3dGridTo1d.h.

References coordinates_m, and interpolation::ThreeDGrid::ySize().

Referenced by deleteFunc().

Here is the call graph for this function:

◆ getNumberOfZCoords()

int interpolation::Interpolator3dGridTo1d::getNumberOfZCoords ( ) const
inline

Number of z coordinates in the grid

Definition at line 164 of file Interpolator3dGridTo1d.h.

References coordinates_m, and interpolation::ThreeDGrid::zSize().

Here is the call graph for this function:

◆ getPointDimension()

unsigned int interpolation::Interpolator3dGridTo1d::getPointDimension ( ) const
inlinevirtual

Dimension of input points

Implements interpolation::VectorMap.

Definition at line 168 of file Interpolator3dGridTo1d.h.

◆ getValueDimension()

unsigned int interpolation::Interpolator3dGridTo1d::getValueDimension ( ) const
inlinevirtual

Dimension of output values

Implements interpolation::VectorMap.

Definition at line 172 of file Interpolator3dGridTo1d.h.

◆ setAll()

void interpolation::Interpolator3dGridTo1d::setAll ( ThreeDGrid grid,
double ***  F 
)
inline

Set function and mesh data

Definition at line 211 of file Interpolator3dGridTo1d.h.

References setF(), and setGrid().

Referenced by Interpolator3dGridTo1d().

Here is the call graph for this function:

◆ setF()

void interpolation::Interpolator3dGridTo1d::setF ( double ***  inF)
inline

Set function data, deleting any existing function data

Definition at line 180 of file Interpolator3dGridTo1d.h.

References deleteFunc(), and f_m.

Referenced by setAll().

Here is the call graph for this function:

◆ setGrid()

void interpolation::Interpolator3dGridTo1d::setGrid ( ThreeDGrid grid)
inline

Reset the mesh

Removes reference to this from mesh smart pointer if appropriate

Definition at line 185 of file Interpolator3dGridTo1d.h.

References interpolation::ThreeDGrid::add(), coordinates_m, and interpolation::ThreeDGrid::remove().

Referenced by setAll().

Here is the call graph for this function:

◆ setX()

void interpolation::Interpolator3dGridTo1d::setX ( int  nCoords,
double *  x 
)
inline

Set x coordinates in the mesh to an arbitrary set of points

If mesh is NULL, does nothing

Definition at line 192 of file Interpolator3dGridTo1d.h.

References coordinates_m, and interpolation::ThreeDGrid::setX().

Here is the call graph for this function:

◆ setY()

void interpolation::Interpolator3dGridTo1d::setY ( int  nCoords,
double *  y 
)
inline

Set y coordinates in the mesh to an arbitrary set of points

If mesh is NULL, does nothing

Definition at line 197 of file Interpolator3dGridTo1d.h.

References coordinates_m, and interpolation::ThreeDGrid::setY().

Here is the call graph for this function:

◆ setZ()

void interpolation::Interpolator3dGridTo1d::setZ ( int  nCoords,
double *  z 
)
inline

Set z coordinates in the mesh to an arbitrary set of points

If mesh is NULL, does nothing

Definition at line 202 of file Interpolator3dGridTo1d.h.

References coordinates_m, and interpolation::ThreeDGrid::setZ().

Here is the call graph for this function:

Member Data Documentation

◆ coordinates_m

ThreeDGrid* interpolation::Interpolator3dGridTo1d::coordinates_m
protected

◆ f_m

double*** interpolation::Interpolator3dGridTo1d::f_m
protected

The documentation for this class was generated from the following files: