Skip to content

Commit

Permalink
Align the constructors of the different DiscreteDomain
Browse files Browse the repository at this point in the history
  • Loading branch information
tpadioleau committed Jan 9, 2025
1 parent b06383d commit b42bf03
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
7 changes: 3 additions & 4 deletions include/ddc/discrete_domain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,9 @@ class DiscreteDomain<>

KOKKOS_DEFAULTED_FUNCTION constexpr DiscreteDomain() = default;

// Construct a DiscreteDomain from a reordered copy of `domain`
template <class... ODDims>
KOKKOS_FUNCTION constexpr explicit DiscreteDomain(
[[maybe_unused]] DiscreteDomain<ODDims...> const& domain)
/// Construct a DiscreteDomain by copies and merge of domains
template <class... DDoms, class = std::enable_if_t<(is_discrete_domain_v<DDoms> && ...)>>
KOKKOS_FUNCTION constexpr explicit DiscreteDomain([[maybe_unused]] DDoms const&... domains)
{
}

Expand Down
3 changes: 1 addition & 2 deletions tests/splines/batched_2d_spline_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ void Batched2dSplineTest()
// The following line creates a discrete domain over all dimensions (DDims...) where we immediately
// remove the dimensions DDimI1 and DDimI2.
ddc::remove_dims_of_t<ddc::DiscreteDomain<DDims...>, DDimI1, DDimI2> const dom_vals_tmp(
ddc::DiscreteDomain<DDims...>(
ddc::DiscreteDomain<DDims>(DElem<DDims>(0), DVect<DDims>(ncells))...));
ddc::DiscreteDomain<DDims>(DElem<DDims>(0), DVect<DDims>(ncells))...);
ddc::DiscreteDomain<DDims...> const
dom_vals(dom_vals_tmp, interpolation_domain1, interpolation_domain2);

Expand Down
3 changes: 1 addition & 2 deletions tests/splines/batched_spline_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ void BatchedSplineTest()
// The following line creates a discrete domain over all dimensions (DDims...) where we immediately
// remove the dimension DDimI.
ddc::remove_dims_of_t<ddc::DiscreteDomain<DDims...>, DDimI> const dom_vals_tmp(
ddc::DiscreteDomain<DDims...>(
ddc::DiscreteDomain<DDims>(DElem<DDims>(0), DVect<DDims>(ncells))...));
ddc::DiscreteDomain<DDims>(DElem<DDims>(0), DVect<DDims>(ncells))...);
ddc::DiscreteDomain<DDims...> const dom_vals(dom_vals_tmp, interpolation_domain);

#if defined(BC_HERMITE)
Expand Down
3 changes: 1 addition & 2 deletions tests/splines/extrapolation_rule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ void ExtrapolationRuleSplineTest()
// The following line creates a discrete domain over all dimensions (DDims...) where we immediately
// remove the dimensions DDimI1 and DDimI2.
ddc::remove_dims_of_t<ddc::DiscreteDomain<DDims...>, DDimI1, DDimI2> const dom_vals_tmp(
ddc::DiscreteDomain<DDims...>(
ddc::DiscreteDomain<DDims>(DElem<DDims>(0), DVect<DDims>(ncells))...));
ddc::DiscreteDomain<DDims>(DElem<DDims>(0), DVect<DDims>(ncells))...);
ddc::DiscreteDomain<DDims...> const dom_vals(dom_vals_tmp, interpolation_domain);

// Create a SplineBuilder over BSplines<I> and batched along other dimensions using some boundary conditions
Expand Down

0 comments on commit b42bf03

Please sign in to comment.