Block-Structured AMR Software Framework
AMReX_LevelBld.H
Go to the documentation of this file.
1 
2 #ifndef AMREX_LEVELBLD_H_
3 #define AMREX_LEVELBLD_H_
4 #include <AMReX_Config.H>
5 
6 #include <AMReX_REAL.H>
7 #include <AMReX_Box.H>
8 #include <AMReX_Geometry.H>
9 #include <AMReX_Amr.H>
10 #include <AMReX_AmrLevel.H>
11 
12 namespace amrex {
13 
14 
21 class LevelBld
22 {
23 public:
24 
25  virtual ~LevelBld () = default;
26  LevelBld () noexcept = default;
27  LevelBld (LevelBld const&) = default;
28  LevelBld (LevelBld &&) noexcept = default;
29  LevelBld& operator= (LevelBld const&) = default;
30  LevelBld& operator= (LevelBld &&) noexcept = default;
31 
38  virtual void variableSetUp () = 0;
39  virtual void variableSetUpForNewCompProcs () { }
40 
46  virtual void variableCleanUp () = 0;
47 
55  virtual AmrLevel* operator() () = 0;
56 
71  virtual AmrLevel* operator() (Amr& papa,
72  int lev,
73  const Geometry& geom_lev,
74  const BoxArray& ba,
75  const DistributionMapping& dm,
76  Real time) = 0;
77 };
78 
79 }
80 
81 #endif /*_LEVELBLD_H_*/
Virtual base class for managing individual levels. AmrLevel functions both as a container for state d...
Definition: AMReX_AmrLevel.H:38
Manage hierarchy of levels for time-dependent AMR computations.
Definition: AMReX_Amr.H:35
A collection of Boxes stored in an Array.
Definition: AMReX_BoxArray.H:550
Calculates the distribution of FABs to MPI processes.
Definition: AMReX_DistributionMapping.H:41
Rectangular problem domain geometry.
Definition: AMReX_Geometry.H:73
Builds problem-specific AmrLevels.
Definition: AMReX_LevelBld.H:22
virtual ~LevelBld()=default
LevelBld() noexcept=default
virtual void variableCleanUp()=0
Perform any problem-dependent cleanup. This is a pure virtual function and hence MUST be implemented ...
virtual void variableSetUp()=0
Perform any problem-dependent setup such as physical boundary condition and derived quantities....
virtual AmrLevel * operator()()=0
This is a virtual constructor for types derived from AmrLevel. The derived type is initialized with t...
virtual void variableSetUpForNewCompProcs()
Definition: AMReX_LevelBld.H:39
Definition: AMReX_Amr.cpp:49