9 #include "DataStructures/DataVector.hpp"
21 void lift_boundary_terms_gauss_points_impl(
23 const Mesh<Dim>& volume_mesh,
size_t dimension,
31 void lift_boundary_terms_gauss_points_impl(
33 const Mesh<Dim>& volume_mesh,
size_t dimension,
71 template <
size_t Dim,
typename DtTagsList,
typename BoundaryCorrectionTagsList>
76 const Variables<BoundaryCorrectionTagsList>& boundary_corrections,
79 ASSERT(std::all_of(volume_mesh.quadrature().begin(),
80 volume_mesh.quadrature().end(),
82 return quadrature == Spectral::Quadrature::Gauss;
84 "Must use Gauss points in all directions but got the mesh: "
86 const Mesh<Dim - 1> boundary_mesh =
88 const Mesh<1> volume_stripe_mesh =
90 const size_t num_boundary_grid_points = boundary_mesh.number_of_grid_points();
91 detail::lift_boundary_terms_gauss_points_impl(
92 make_not_null(dt_vars->data()), dt_vars->number_of_independent_components,
93 volume_mesh, direction.dimension(), volume_det_inv_jacobian,
94 num_boundary_grid_points,
95 gsl::make_span(boundary_corrections.data(), boundary_corrections.size()),
96 direction.side() == Side::Upper
99 magnitude_of_face_normal, face_det_jacobian);
142 template <
size_t Dim,
typename DtTagsList,
typename BoundaryCorrectionTagsList>
146 const Mesh<Dim>& volume_mesh,
const size_t dimension,
147 const Variables<BoundaryCorrectionTagsList>& upper_boundary_corrections,
150 const Variables<BoundaryCorrectionTagsList>& lower_boundary_corrections,
153 ASSERT(std::all_of(volume_mesh.quadrature().begin(),
154 volume_mesh.quadrature().end(),
156 return quadrature == Spectral::Quadrature::Gauss;
158 "Must use Gauss points in all directions but got the mesh: "
160 const Mesh<Dim - 1> boundary_mesh = volume_mesh.
slice_away(dimension);
162 const size_t num_boundary_grid_points = boundary_mesh.number_of_grid_points();
163 detail::lift_boundary_terms_gauss_points_impl(
164 make_not_null(dt_vars->data()), dt_vars->number_of_independent_components,
165 volume_mesh, dimension, volume_det_inv_jacobian, num_boundary_grid_points,
167 upper_boundary_corrections.size()),
169 upper_magnitude_of_face_normal, upper_face_det_jacobian,
171 lower_boundary_corrections.size()),
173 lower_magnitude_of_face_normal, lower_face_det_jacobian);