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 : #include <utility>
8 :
9 : #include "DataStructures/DataBox/PrefixHelpers.hpp"
10 : #include "DataStructures/Tensor/IndexType.hpp"
11 : #include "DataStructures/Tensor/TypeAliases.hpp"
12 : #include "Domain/Structure/Direction.hpp"
13 : #include "Domain/Structure/DirectionalId.hpp"
14 : #include "Domain/Structure/DirectionalIdMap.hpp"
15 : #include "Domain/Structure/ElementId.hpp"
16 : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/System.hpp"
17 : #include "NumericalAlgorithms/LinearOperators/PartialDerivatives.hpp"
18 : #include "Utilities/Gsl.hpp"
19 : #include "Utilities/TMPL.hpp"
20 :
21 : /// \cond
22 : class DataVector;
23 : template <size_t Dim>
24 : class Mesh;
25 : template <typename TagsList>
26 : class Variables;
27 : namespace evolution::dg::subcell {
28 : class GhostData;
29 : } // namespace evolution::dg::subcell
30 : /// \endcond
31 :
32 : namespace grmhd::GhValenciaDivClean::fd {
33 : /*!
34 : * \brief Compute partial derivatives of the spacetime variables \f$g_{ab}\f$,
35 : * \f$\Phi_{iab}\f$, and \f$\Pi_{ab}\f$.
36 : *
37 : * The derivatives are computed using FD of order deriv_order
38 : */
39 : template <typename System>
40 1 : void spacetime_derivatives(
41 : gsl::not_null<Variables<
42 : db::wrap_tags_in<::Tags::deriv, typename System::gradients_tags,
43 : tmpl::size_t<3>, Frame::Inertial>>*>
44 : result,
45 : const Variables<typename System::variables_tag::tags_list>&
46 : volume_evolved_variables,
47 : const DirectionalIdMap<3, evolution::dg::subcell::GhostData>&
48 : all_ghost_data,
49 : const size_t& deriv_order, const Mesh<3>& volume_mesh,
50 : const InverseJacobian<DataVector, 3, Frame::ElementLogical,
51 : Frame::Inertial>&
52 : cell_centered_logical_to_inertial_inv_jacobian,
53 : const tnsr::I<DataVector, 3, Frame::Inertial>& inertial_coords);
54 : } // namespace grmhd::GhValenciaDivClean::fd
|