LogicalCoordinates.hpp
Go to the documentation of this file.
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 /// \file
5 /// Defines functions logical_coordinates and interface_logical_coordinates
6 
7 #pragma once
8 
9 #include <cstddef>
10 
13 #include "Utilities/TMPL.hpp"
14 
15 /// \cond
16 namespace Tags {
17 template<size_t Dim>
18 struct Mesh;
19 template <size_t, typename>
20 struct Coordinates; // IWYU pragma: keep
21 } // namespace Tags
22 template <size_t Dim>
23 class Mesh;
24 class DataVector;
25 template <size_t Dim>
26 class Direction;
27 /// \endcond
28 
29 /*!
30  * \ingroup ComputationalDomainGroup
31  * \brief Compute the logical coordinates in an Element.
32  *
33  * \details The logical coordinates are the collocation points associated to the
34  * spectral basis functions and quadrature of the \p mesh.
35  *
36  * \returns logical-frame vector holding coordinates
37  *
38  * \example
39  * \snippet Test_LogicalCoordinates.cpp logical_coordinates_example
40  */
41 template <size_t VolumeDim>
42 tnsr::I<DataVector, VolumeDim, Frame::Logical> logical_coordinates(
43  const Mesh<VolumeDim>& mesh) noexcept;
44 
45 /*!
46  * \ingroup ComputationalDomainGroup
47  * \brief Compute the logical coordinates on a face of an Element.
48  *
49  * \returns logical-frame vector holding coordinates
50  *
51  * \example
52  * \snippet Test_LogicalCoordinates.cpp interface_logical_coordinates_example
53  */
54 template <size_t VolumeDim>
55 tnsr::I<DataVector, VolumeDim, Frame::Logical> interface_logical_coordinates(
56  const Mesh<VolumeDim - 1>& mesh,
57  const Direction<VolumeDim>& direction) noexcept;
58 
59 namespace Tags {
60 /// \ingroup DataBoxTagsGroup
61 /// \ingroup ComputationalDomainGroup
62 /// The logical coordinates in the Element
63 template <size_t VolumeDim>
64 struct LogicalCoordinates : Coordinates<VolumeDim, Frame::Logical>,
66  using argument_tags = tmpl::list<Tags::Mesh<VolumeDim>>;
67  static constexpr auto function = logical_coordinates<VolumeDim>;
68 };
69 } // namespace Tags
Marks a DataBoxTag as being a compute item that executes a function.
Definition: DataBoxTag.hpp:155
Holds the number of grid points, basis, and quadrature in each direction of the computational grid...
Definition: Mesh.hpp:49
A particular Side along a particular coordinate Axis.
Definition: Direction.hpp:23
The logical coordinates in the Element.
Definition: LogicalCoordinates.hpp:64
Definition: DataBoxTag.hpp:29
Defines a list of useful type aliases for tensors.
tnsr::I< DataVector, VolumeDim, Frame::Logical > logical_coordinates(const Mesh< VolumeDim > &mesh) noexcept
Compute the logical coordinates in an Element.
Definition: LogicalCoordinates.cpp:20
The coordinates in a given frame.
Definition: Tags.hpp:95
Stores a collection of function values.
Definition: DataVector.hpp:46
tnsr::I< DataVector, VolumeDim, Frame::Logical > interface_logical_coordinates(const Mesh< VolumeDim - 1 > &mesh, const Direction< VolumeDim > &direction) noexcept
Compute the logical coordinates on a face of an Element.
Definition: LogicalCoordinates.cpp:36
Wraps the template metaprogramming library used (brigand)
Defines classes SimpleTag, PrefixTag, ComputeTag and several functions for retrieving tag info...