Gyselalib++
i_interpolator_2d_rp.hpp
1 // SPDX-License-Identifier: MIT
2 #pragma once
3 
4 #include <memory>
5 
6 #include "geometry.hpp"
7 
8 
9 
18 {
19 public:
20  virtual ~IInterpolatorRTheta() = default;
21 
34  virtual host_t<DFieldRTheta> operator()(
35  host_t<DFieldRTheta> inout_data,
36  host_t<ConstFieldRTheta<CoordRTheta>> coordinates) const = 0;
37 };
38 
39 
40 
55 {
56 public:
57  ~IPreallocatableInterpolatorRTheta() override = default;
58 
69  virtual std::unique_ptr<IInterpolatorRTheta> preallocate() const = 0;
70 
71  host_t<DFieldRTheta> operator()(
72  host_t<DFieldRTheta> const inout_data,
73  host_t<ConstFieldRTheta<CoordRTheta>> const coordinates) const override
74  {
75  return (*preallocate())(inout_data, coordinates);
76  }
77 };
A class which provides an interpolating function.
Definition: i_interpolator_2d_rp.hpp:18
virtual host_t< DFieldRTheta > operator()(host_t< DFieldRTheta > inout_data, host_t< ConstFieldRTheta< CoordRTheta >> coordinates) const =0
Approximate the value of a function at a set of coordinates using the current values at a known set o...
A class which provides access to an interpolating function which can be preallocated where useful.
Definition: i_interpolator_2d_rp.hpp:55
virtual std::unique_ptr< IInterpolatorRTheta > preallocate() const =0
Allocate an instance of a pointer to an InterpolatorRTheta.
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 o...
Definition: i_interpolator_2d_rp.hpp:71