19 #include "Numerics/Transform2GridFunctor.h" 31 double f(
double r) {
return r * r; }
33 double df(
double r) {
return 2 * r; }
41 auto agrid = std::make_unique<LogGrid<double>>();
42 agrid->
set(0.1, 10, 10);
43 OutputType output(std::move(agrid));
45 Transform2GridFunctor<Input, OutputType> transform(
input, output);
49 transform.generate(rmin, rmax, npts);
50 CHECK(output.splint(0.1) == Approx(0.01));
51 CHECK(output.splint(0.15) == Approx(0.0225));
52 CHECK(output.splint(7.0) == Approx(49.0));
53 CHECK(output.splint(10) == Approx(100.0));
One-Dimensional linear-grid.
helper functions for EinsplineSetBuilder
TEST_CASE("complex_helper", "[type_traits]")
An abstract base class to implement a One-Dimensional grid.
void set(Vector< Td > &data)
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
testing::ValidSpinDensityInput input