ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_NullMoistLagrangian.H
Go to the documentation of this file.
1 /*! @file ERF_NullMoistLagrangian.H
2  * \brief Contains the Lagrangian moisture model base class */
3 
4 #ifndef ERF_NULLMOISTLAGRANGIAN_H
5 #define ERF_NULLMOISTLAGRANGIAN_H
6 
7 #ifdef ERF_USE_PARTICLES
8 
9 #include <AMReX_AmrParGDB.H>
10 #include "ERF_IndexDefines.H"
11 #include "ERF_NullMoist.H"
12 
13 /* forward declaration */
14 class ERFPC;
15 
16 /*! \brief Base class for a Lagrangian moisture model
17  *
18  * Extends #NullMoist for a Lagrangian model */
19 class NullMoistLagrangian : public NullMoist {
20 
21 public:
22 
23  /*! \brief Null constructor */
24  NullMoistLagrangian () {}
25 
26  /*! \brief Default destructor */
27  virtual ~NullMoistLagrangian () = default;
28 
29  /*! \brief Initialize particles at AMR level */
30  virtual
31  void InitParticles ( const int, std::unique_ptr<amrex::MultiFab>& ) { }
32 
33  /*! \brief Restart particles */
34  virtual
35  void RestartParticles ( amrex::ParGDBBase*, const std::string& ) { }
36 
37  /*! \brief get the particle container */
38  virtual ERFPC* getParticleContainer ()
39  {
40  return nullptr;
41  }
42 
43  /*! \brief get the name */
44  virtual const std::string& getName () const
45  {
46  return m_name;
47  }
48 
49  /*! \brief finish initializations steps that require flow variables */
50  virtual void FinishInit (const int&, /* AMR level */
51  amrex::MultiFab&, /* Conserved state variable */
52  const amrex::Vector<std::unique_ptr<amrex::MultiFab>>& /*terrain*/) {}
53 
54  /*! \brief average down moisture multifabs from finest_level to 0 */
55  virtual void AverageDownMicroVars (const int /*finest_level*/) {}
56 
57  /*! \brief drop the fields of a level that a regrid removes */
58  virtual void ClearLevel (const int /*lev*/) {}
59 
60  /*! \brief diagnostics of the state of all levels at a step */
61  virtual void Diagnostics (const int&, /* step */
62  const amrex::Real&, /* time */
63  const amrex::Vector<std::unique_ptr<amrex::MultiFab>>&, /* terrain */
64  const int /* file name digits */) {}
65 
66  virtual bool Qstate_Is_Diagnostic (int /*q*/) const { return false; }
67 
68  virtual void Update_Diagnostic_State (amrex::MultiFab&, const amrex::MultiFab&) {}
69 
70  void Advance ( const amrex::Real&, const SolverChoice& ) override
71  {
72  amrex::Abort("Do not use this advance() for Lagrangian microphysics.");
73  }
74 
75  void SetCurrentLevel (const int&) override {}
76  void InitLevel (const int, const amrex::MultiFab&) override {}
77  int getDiagnosticsInterval () const override { return 0; }
78 
79  /*! \brief advance the moisture model by one time step */
80  virtual void
81  Advance (const amrex::Real&, /* dt */
82  const int&, /* iter */
83  const amrex::Real&, /* time */
84  amrex::Vector<amrex::Vector<amrex::MultiFab>>&, /* state variables */
85  const amrex::Vector<std::unique_ptr<amrex::MultiFab>>&, /* terrain */
86  const amrex::GpuArray<ERF_BC, AMREX_SPACEDIM*2>& ) { }
87 
88 protected:
89 
90 private:
91  const std::string m_name = "null"; /*!< name of the moisture model */
92 };
93 
94 #endif
95 #endif
Definition: ERF_NullMoist.H:11
virtual void SetCurrentLevel(const int &lev)
Definition: ERF_NullMoist.H:115
virtual int getDiagnosticsInterval() const
Definition: ERF_NullMoist.H:127
virtual void InitLevel(const int, const amrex::MultiFab &)
Definition: ERF_NullMoist.H:123
virtual void Advance(const amrex::Real &, const SolverChoice &)
Definition: ERF_NullMoist.H:32
Definition: ERF_DataStruct.H:743