Gyselalib++
 
Loading...
Searching...
No Matches
poisson_like_rhs_function.hpp
1// SPDX-License-Identifier: MIT
2#pragma once
3
4#include <ddc/ddc.hpp>
5
6#include "geometry.hpp"
7#include "spline_interpolator_2d_rp.hpp"
8
9
10
15template <class RadialExtrapolationRule>
17{
18public:
20 using evaluator_type = ddc::SplineEvaluator2D<
21 Kokkos::DefaultHostExecutionSpace,
22 Kokkos::HostSpace,
25 GridR,
27 RadialExtrapolationRule,
28 RadialExtrapolationRule,
29 ddc::PeriodicExtrapolationRule<Theta>,
30 ddc::PeriodicExtrapolationRule<Theta>,
31 GridR,
32 GridTheta>;
33
34private:
35 host_t<ConstSpline2D> const m_coefs;
36 evaluator_type const& m_evaluator;
37
38public:
47 PoissonLikeRHSFunction(host_t<ConstSpline2D> coefs, evaluator_type const& evaluator)
48 : m_coefs(coefs)
49 , m_evaluator(evaluator)
50 {
51 }
52
61 double operator()(CoordRTheta const& coord_rp) const
62 {
63 return m_evaluator(coord_rp, m_coefs);
64 }
65};
Type of right-hand side (rhs) function of the Poisson equation.
Definition poisson_like_rhs_function.hpp:17
double operator()(CoordRTheta const &coord_rp) const
Get the value of the function at a given coordinate.
Definition poisson_like_rhs_function.hpp:61
ddc::SplineEvaluator2D< Kokkos::DefaultHostExecutionSpace, Kokkos::HostSpace, BSplinesR, BSplinesTheta, GridR, GridTheta, RadialExtrapolationRule, RadialExtrapolationRule, ddc::PeriodicExtrapolationRule< Theta >, ddc::PeriodicExtrapolationRule< Theta >, GridR, GridTheta > evaluator_type
The type of the 2D Spline Evaluator used by this class.
Definition poisson_like_rhs_function.hpp:32
PoissonLikeRHSFunction(host_t< ConstSpline2D > coefs, evaluator_type const &evaluator)
Instantiate a PoissonLikeRHSFunction.
Definition poisson_like_rhs_function.hpp:47
Definition geometry.hpp:93
Definition geometry.hpp:100
Definition geometry.hpp:116
Definition geometry.hpp:119