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  void Advance ( const amrex::Real&, const SolverChoice& ) override
58  {
59  amrex::Abort("Do not use this advance() for Lagrangian microphysics.");
60  }
61 
62  void SetCurrentLevel (const int&) override {}
63  void InitLevel (const int, const amrex::MultiFab&) override {}
64  int getDiagnosticsInterval () const override { return 0; }
65 
66  /*! \brief advance the moisture model by one time step */
67  virtual void
68  Advance (const amrex::Real&, /* dt */
69  const int&, /* iter */
70  const amrex::Real&, /* time */
71  amrex::Vector<amrex::Vector<amrex::MultiFab>>&, /* state variables */
72  const amrex::Vector<std::unique_ptr<amrex::MultiFab>>&, /* terrain */
73  const amrex::GpuArray<ERF_BC, AMREX_SPACEDIM*2>& ) { }
74 
75 protected:
76 
77 private:
78  const std::string m_name = "null"; /*!< name of the moisture model */
79 };
80 
81 #endif
82 #endif
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Definition: ERF_NullMoist.H:8
virtual void SetCurrentLevel(const int &)
Definition: ERF_NullMoist.H:99
virtual int getDiagnosticsInterval() const
Definition: ERF_NullMoist.H:107
virtual void InitLevel(const int, const amrex::MultiFab &)
Definition: ERF_NullMoist.H:103
virtual void Advance(const amrex::Real &, const SolverChoice &)
Definition: ERF_NullMoist.H:29
Definition: ERF_DataStruct.H:130