24 using std::stringstream;
33 grid.
set(0.0, 1.0, 3);
38 CHECK(grid.
dh() == Approx(0.5));
39 CHECK(grid.
dr(1) == Approx(0.5));
42 TEST_CASE(
"double_1d_grid_functor_vs_n",
"[numerics]")
44 for (
int n = 2;
n < 5;
n++)
46 stringstream sec_name;
47 sec_name <<
"grid size " <<
n;
48 SECTION(sec_name.str())
51 grid.
set(0.0, 1.0,
n);
55 CHECK(grid.
dh() == Approx(1.0 / (
n - 1)));
56 CHECK(grid.
dr(0) == Approx(1.0 / (
n - 1)));
T rmin() const
return the first grid point
One-Dimensional linear-grid.
void set(T ri, T rf, int n) override
Set the grid given the parameters.
helper functions for EinsplineSetBuilder
Implement One-Dimensional function on a radial grid.
std::unique_ptr< OneDimGridBase< T, CT > > makeClone() const override
TEST_CASE("complex_helper", "[type_traits]")
T dh() const
return the differential spacing of the grid
Decalaration of One-Dimesional grids.
REQUIRE(std::filesystem::exists(filename))
int size() const
returns the size of the grid
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
T rmax() const
return the last grid point