Gyselalib++
IPreallocatableInterpolatorRTheta Class Referenceabstract

A class which provides access to an interpolating function which can be preallocated where useful. More...

Inheritance diagram for IPreallocatableInterpolatorRTheta:
IInterpolatorRTheta PreallocatableSplineInterpolatorRTheta< ddc::NullExtrapolationRule > PreallocatableSplineInterpolatorRTheta< RadialExtrapolationRule >

Public Member Functions

virtual std::unique_ptr< IInterpolatorRThetapreallocate () const =0
 Allocate an instance of a pointer to an InterpolatorRTheta. More...
 
host_t< DFieldRTheta > operator() (host_t< DFieldRTheta > const inout_data, host_t< ConstFieldRTheta< CoordRTheta >> const coordinates) const override
 Approximate the value of a function at a set of coordinates using the current values at a known set of interpolation points. More...
 

Detailed Description

A class which provides access to an interpolating function which can be preallocated where useful.

An abstract class which implements a preallocate function returning a pointer to an InterpolatorRTheta. A pointer to an InterpolatorRTheta is used so that the returned object can be any sub-class of IInterpolatorRTheta. The type (and thus the implementation of the operator) will be determined when the pointer is dereferenced.

The preallocate function should be used to allocate an instance of the IInterpolatorRTheta before using it repeatedly. Once the preallocated object goes out of scope it will be deallocated. This means that objects of this class take up little or no space in memory.

Member Function Documentation

◆ preallocate()

virtual std::unique_ptr<IInterpolatorRTheta> IPreallocatableInterpolatorRTheta::preallocate ( ) const
pure virtual

Allocate an instance of a pointer to an InterpolatorRTheta.

Allocate and return an instance of a pointer to a sub-class of IInterpolatorRTheta.

Returns
A pointer to an InterpolatorRTheta.
See also
IInterpolatorRTheta

Implemented in PreallocatableSplineInterpolatorRTheta< RadialExtrapolationRule >, and PreallocatableSplineInterpolatorRTheta< ddc::NullExtrapolationRule >.

◆ operator()()

host_t<DFieldRTheta> IPreallocatableInterpolatorRTheta::operator() ( host_t< DFieldRTheta > const  inout_data,
host_t< ConstFieldRTheta< CoordRTheta >> const  coordinates 
) const
inlineoverridevirtual

Approximate the value of a function at a set of coordinates using the current values at a known set of interpolation points.

Parameters
[in,out]inout_dataOn input: an array containing the value of the function at the interpolation points. On output: an array containing the value of the function at the coordinates.
[in]coordinatesThe coordinates where the function should be evaluated.
Returns
A reference to the inout_data array containing the value of the function at the coordinates.

Implements IInterpolatorRTheta.


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