Skip to content

Commit

Permalink
splines minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
blegouix authored and tpadioleau committed Feb 8, 2024
1 parent 3d671a8 commit 800d85a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
10 changes: 5 additions & 5 deletions include/ddc/kernels/splines/spline_builder_2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ template <
ddc::BoundCond BcXmax1,
ddc::BoundCond BcXmin2,
ddc::BoundCond BcXmax2,
ddc::SplineSolver Solver,
ddc::SplineSolver Solver,
class... IDimX>
class SplineBuilder2D
{
Expand All @@ -40,7 +40,7 @@ class SplineBuilder2D
IDimI2,
BcXmin2,
BcXmax2,
Solver,
Solver,
std::conditional_t<std::is_same_v<IDimX, IDimI1>, BSpline1, IDimX>...>;
using builder_deriv_type1 = ddc::SplineBuilder<
ExecSpace,
Expand All @@ -49,7 +49,7 @@ class SplineBuilder2D
IDimI1,
BcXmin1,
BcXmax1,
Solver,
Solver,
std::conditional_t<
std::is_same_v<IDimX, IDimI2>,
typename builder_type2::deriv_type,
Expand Down Expand Up @@ -216,7 +216,7 @@ template <
ddc::BoundCond BcXmax1,
ddc::BoundCond BcXmin2,
ddc::BoundCond BcXmax2,
ddc::SplineSolver Solver,
ddc::SplineSolver Solver,
class... IDimX>
template <class Layout>
void SplineBuilder2D<
Expand All @@ -230,7 +230,7 @@ void SplineBuilder2D<
BcXmax1,
BcXmin2,
BcXmax2,
Solver,
Solver,
IDimX...>::
operator()(
ddc::ChunkSpan<double, spline_domain_type, Layout, memory_space> spline,
Expand Down
9 changes: 6 additions & 3 deletions tests/splines/batched_2d_spline_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static void Batched2dSplineTest()
s_bcr,
s_bcl,
s_bcr,
ddc::SplineSolver::GINKGO,
ddc::SplineSolver::GINKGO,
IDim<X, I1, I2>...>
spline_builder(dom_vals);

Expand Down Expand Up @@ -449,8 +449,11 @@ static void Batched2dSplineTest()
ddc::Chunk Sderiv_mixed_rhs_rhs1_cpu_alloc(derivs_domain, ddc::HostAllocator<double>());
ddc::ChunkSpan Sderiv_mixed_rhs_rhs1_cpu = Sderiv_mixed_rhs_rhs1_cpu_alloc.span_view();

for (int ii = 1; ii < derivs_domain.template extent<ddc::Deriv<I1>>() + 1; ++ii) {
for (std::size_t jj = 1; jj < derivs_domain.template extent<ddc::Deriv<I2>>() + 1;
for (std::size_t ii = 1;
ii < (std::size_t)derivs_domain.template extent<ddc::Deriv<I1>>() + 1;
++ii) {
for (std::size_t jj = 1;
jj < (std::size_t)derivs_domain.template extent<ddc::Deriv<I2>>() + 1;
++jj) {
Sderiv_mixed_lhs_lhs1_cpu(
typename decltype(derivs_domain)::discrete_element_type(ii, jj))
Expand Down
2 changes: 1 addition & 1 deletion tests/splines/extrapolation_rule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static void ExtrapolationRuleSplineTest()
s_bcr1,
s_bcl2,
s_bcr2,
ddc::SplineSolver::GINKGO,
ddc::SplineSolver::GINKGO,
IDim<X, I1, I2>...>
spline_builder(dom_vals);

Expand Down

0 comments on commit 800d85a

Please sign in to comment.