Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <cstddef>
7 :
8 : #include "DataStructures/Tensor/TypeAliases.hpp"
9 :
10 : /// \cond
11 : class DataVector;
12 : template <size_t Dim>
13 : class Mesh;
14 : template <size_t Dim>
15 : class Direction;
16 : namespace gsl {
17 : template <typename T>
18 : class not_null;
19 : } // namespace gsl
20 : /// \endcond
21 :
22 : namespace evolution::dg::subcell::fd {
23 : /// @{
24 : /*!
25 : * \brief Computes the logical coordinates of ghost grid points for a given
26 : * direction and ghost zone size.
27 : *
28 : * Let `d` be the axis dimension of the `direction`. The returned coordinate has
29 : * extents that is same as the volume mesh extents but `[d]`-th value
30 : * replaced by the ghost zone size.
31 : *
32 : * For instance if the (volume) subcell mesh has extents \f$(6,6,6)\f$, ghost
33 : * zone size is 2, and the `direction` is along Xi axis, the resulting
34 : * coordinates computed by this function has extents \f$(2,6,6)\f$.
35 : *
36 : */
37 : template <size_t Dim>
38 1 : void ghost_zone_logical_coordinates(
39 : const gsl::not_null<tnsr::I<DataVector, Dim, Frame::ElementLogical>*>
40 : ghost_logical_coords,
41 : const Mesh<Dim>& subcell_mesh, const size_t ghost_zone_size,
42 : const Direction<Dim>& direction);
43 :
44 : template <size_t Dim>
45 1 : tnsr::I<DataVector, Dim, Frame::ElementLogical> ghost_zone_logical_coordinates(
46 : const Mesh<Dim>& subcell_mesh, const size_t ghost_zone_size,
47 : const Direction<Dim>& direction);
48 : /// @}
49 : } // namespace evolution::dg::subcell::fd
|