Derivatives.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 
12 
13 /// \cond
14 namespace Frame {
15 struct Inertial;
16 } // namespace Frame
17 /// \endcond
18 
19 namespace Elliptic {
20 namespace Initialization {
21 /*!
22  * \brief Initializes the DataBox tags related to derivatives of the system
23  * variables
24  *
25  * We have to initialize these separately from
26  * `Elliptic::Initialization::System` since the `variables_tag` is the linear
27  * solver operand, which is added by the linear solver initialization.
28  *
29  * With:
30  * - `inv_jac_tag` = `Tags::InverseJacobian<
31  * Tags::ElementMap<Dim>, Tags::Coordinates<Dim, Frame::Logical>>`
32  *
33  * Uses:
34  * - System:
35  * - `volume_dim`
36  * - `variables_tag`
37  * - `gradient_tags`
38  *
39  * DataBox:
40  * - Adds:
41  * - `Tags::DerivCompute<variables_tag, inv_jac_tag, gradient_tags>>`
42  */
43 template <typename SystemType>
44 struct Derivatives {
45  static constexpr size_t Dim = SystemType::volume_dim;
46  using inv_jac_tag =
49 
50  using simple_tags = db::AddSimpleTags<>;
51  using compute_tags = db::AddComputeTags<
52  Tags::DerivCompute<typename SystemType::variables_tag, inv_jac_tag,
53  typename SystemType::gradient_tags>>;
54 
55  template <typename TagsList>
56  static auto initialize(db::DataBox<TagsList>&& box) noexcept {
57  return db::create_from<db::RemoveTags<>, simple_tags, compute_tags>(
58  std::move(box));
59  }
60 };
61 } // namespace Initialization
62 } // namespace Elliptic
Items for initializing the DataBoxes of parallel components.
Definition: ConservativeSystem.hpp:21
Definition: ComputeOperatorAction.hpp:28
Computes the inverse Jacobian of the map held by MapTag at the coordinates held by SourceCoordsTag...
Definition: Tags.hpp:125
Defines classes and functions used for manipulating DataBox&#39;s.
tmpl::flatten< tmpl::list< Tags... > > AddSimpleTags
List of Tags to add to the DataBox.
Definition: DataBox.hpp:1227
Defines functions computing partial derivatives.
Indicates the Frame that a TensorIndexType is in.
Definition: IndexType.hpp:36
Definition: InterpolationTargetWedgeSectionTorus.hpp:24
Compute the spatial derivatives of tags in a Variables.
Definition: PartialDerivatives.hpp:150
The coordinates in a given frame.
Definition: Tags.hpp:95
Initializes the DataBox tags related to derivatives of the system variables.
Definition: Derivatives.hpp:44
Defines classes SimpleTag, PrefixTag, ComputeTag and several functions for retrieving tag info...
Defines functions and tags for taking a divergence.
tmpl::flatten< tmpl::list< Tags... > > AddComputeTags
List of Compute Item Tags to add to the DataBox.
Definition: DataBox.hpp:1234