Coordinates.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 
8 #include "DataStructures/DataBox/Tag.hpp"
11 #include "Evolution/DgSubcell/Tags/Mesh.hpp"
12 #include "Utilities/GetOutput.hpp"
13 
14 /// \cond
15 class DataVector;
16 template <size_t Dim>
17 class Mesh;
18 namespace gsl {
19 template <typename>
20 struct not_null;
21 } // namespace gsl
22 /// \endcond
23 
25 /// The coordinates in a given frame.
26 template <size_t Dim, typename Frame>
28  static std::string name() noexcept {
29  return get_output(Frame{}) + "Coordinates";
30  }
31  using type = tnsr::I<DataVector, Dim, Frame>;
32 };
33 
34 /// The logical coordinates on the subcell grid
35 template <size_t VolumeDim>
36 struct LogicalCoordinatesCompute : Coordinates<VolumeDim, Frame::Logical>,
39  using return_type = typename base::type;
40  using argument_tags = tmpl::list<Mesh<VolumeDim>>;
41  static constexpr auto function = static_cast<void (*)(
42  gsl::not_null<return_type*>, const ::Mesh<VolumeDim>&) noexcept>(
43  &logical_coordinates<VolumeDim>);
44 };
45 } // namespace evolution::dg::subcell::Tags
db::ComputeTag
Mark a struct as a compute tag by inheriting from this.
Definition: Tag.hpp:157
std::string
evolution::dg::subcell::Tags::LogicalCoordinatesCompute
The logical coordinates on the subcell grid.
Definition: Coordinates.hpp:36
db::SimpleTag
Mark a struct as a simple tag by inheriting from this.
Definition: Tag.hpp:36
get_output
std::string get_output(const T &t) noexcept
Get the streamed output of t as a std::string
Definition: GetOutput.hpp:14
cstddef
LogicalCoordinates.hpp
DataVector
Stores a collection of function values.
Definition: DataVector.hpp:46
Mesh
Holds the number of grid points, basis, and quadrature in each direction of the computational grid.
Definition: Mesh.hpp:48
TypeAliases.hpp
Frame
Definition: IndexType.hpp:36
evolution::dg::subcell::Tags
Tags for the DG-subcell solver
Definition: ActiveGrid.hpp:9
evolution::dg::subcell::Tags::Coordinates
The coordinates in a given frame.
Definition: Coordinates.hpp:27
gsl
Implementations from the Guideline Support Library.
Definition: ReadSpecThirdOrderPiecewisePolynomial.hpp:11
gsl::not_null
Require a pointer to not be a nullptr
Definition: ReadSpecThirdOrderPiecewisePolynomial.hpp:13