Reconstructor.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <memory>
7 #include <pup.h>
8 
10 #include "Utilities/TMPL.hpp"
11 
12 namespace NewtonianEuler::fd {
13 /// \cond
14 template <size_t Dim>
15 class AoWeno53Prim;
16 template <size_t Dim>
17 class MonotisedCentralPrim;
18 /// \endcond
19 
20 /*!
21  * \brief The base class from which all reconstruction schemes must inherit
22  *
23  * Currently we have hard-coded reconstructing \f$\rho, p, v^i\f$. However, the
24  * DG-subcell solver is coded generally enough that an efficient implementation
25  * of reconstructing the conserved or characteristic variables is also possible.
26  * It is not yet clear how much info about what is being reconstructed is needed
27  * at compile time and so we currently append `Prim` to the end of the
28  * reconstruction schemes to clarify that they are reconstructing the primitive
29  * variables. Ideally the choice of what variables to reconstruct can be made by
30  * a runtime argument to the individual reconstruction schemes.
31  */
32 template <size_t Dim>
33 class Reconstructor : public PUP::able {
34  public:
35  Reconstructor() = default;
36  Reconstructor(const Reconstructor&) = default;
37  Reconstructor& operator=(const Reconstructor&) = default;
38  Reconstructor(Reconstructor&&) = default;
39  Reconstructor& operator=(Reconstructor&&) = default;
40  ~Reconstructor() override = default;
41 
42  /// \cond
43  explicit Reconstructor(CkMigrateMessage* msg) noexcept;
45  /// \endcond
46 
47  using creatable_classes =
48  tmpl::list<AoWeno53Prim<Dim>, MonotisedCentralPrim<Dim>>;
49 
50  virtual std::unique_ptr<Reconstructor<Dim>> get_clone() const noexcept = 0;
51 
52  virtual size_t ghost_zone_size() const noexcept = 0;
53 
54  void pup(PUP::er& p) override;
55 };
56 } // namespace NewtonianEuler::fd
CharmPupable.hpp
NewtonianEuler::fd::MonotisedCentralPrim
Monotised central reconstruction. See fd::reconstruction::monotised_central() for details.
Definition: MonotisedCentral.hpp:55
WRAPPED_PUPable_abstract
#define WRAPPED_PUPable_abstract(className)
Wraps the Charm++ macro, see the Charm++ documentation.
Definition: CharmPupable.hpp:41
NewtonianEuler::fd
Finite difference functionality for Newtonian Euler.
Definition: AoWeno.hpp:25
memory
std::unique_ptr
TMPL.hpp
NewtonianEuler::fd::Reconstructor
The base class from which all reconstruction schemes must inherit.
Definition: Reconstructor.hpp:33