ImpactX
AmrCoreData.H
Go to the documentation of this file.
1 /* Copyright 2022-2023 The Regents of the University of California, through Lawrence
2  * Berkeley National Laboratory (subject to receipt of any required
3  * approvals from the U.S. Dept. of Energy). All rights reserved.
4  *
5  * This file is part of ImpactX.
6  *
7  * Authors: Axel Huebl
8  * License: BSD-3-Clause-LBNL
9  */
10 #ifndef IMPACTX_AMR_CORE_DATA_H
11 #define IMPACTX_AMR_CORE_DATA_H
12 
13 #include <AMReX_AmrCore.H>
14 #include <AMReX_AmrMesh.H>
15 #include <AMReX_BoxArray.H>
17 #include <AMReX_Geometry.H>
18 #include <AMReX_REAL.H>
19 #include <AMReX_TagBox.H>
20 
21 
23 {
33  class AmrCoreData final
34  : public amrex::AmrCore
35  {
36  public:
37  AmrCoreData (
38  amrex::Geometry const& level_0_geom,
39  amrex::AmrInfo const& amr_info
40  );
41  AmrCoreData (
42  amrex::RealBox const & rb,
43  int max_level_in,
44  amrex::Vector<int> const & n_cell_in,
45  int coord,
46  amrex::Vector<amrex::IntVect> const & ref_ratios,
48  );
49 
50  AmrCoreData (AmrCoreData&& rhs) = default;
51  AmrCoreData& operator= (AmrCoreData&& rhs) = default;
52 
53  AmrCoreData (const AmrCoreData& rhs) = delete;
54  AmrCoreData& operator= (const AmrCoreData& rhs) = delete;
55 
56  ~AmrCoreData() = default;
57 
58  private:
59  void ErrorEst (
60  [[maybe_unused]] int lev,
61  [[maybe_unused]] amrex::TagBoxArray& tags,
62  [[maybe_unused]] amrex::Real time,
63  [[maybe_unused]] int ngrow) override;
64 
66  [[maybe_unused]] int lev,
67  [[maybe_unused]] amrex::Real time,
68  [[maybe_unused]] const amrex::BoxArray& ba,
69  [[maybe_unused]] const amrex::DistributionMapping& dm) override;
70 
72  [[maybe_unused]] int lev,
73  [[maybe_unused]] amrex::Real time,
74  [[maybe_unused]] const amrex::BoxArray& ba,
75  [[maybe_unused]] const amrex::DistributionMapping& dm) override;
76 
77  void RemakeLevel (
78  [[maybe_unused]] int lev,
79  [[maybe_unused]] amrex::Real time,
80  [[maybe_unused]] const amrex::BoxArray& ba,
81  [[maybe_unused]] const amrex::DistributionMapping& dm) override;
82 
83  void ClearLevel ([[maybe_unused]] int lev) override;
84  };
85 
86 } // namespace impactx::initialization
87 
88 #endif // IMPACTX_AMR_CORE_DATA_H
Definition: AmrCoreData.cpp:15
Definition: AmrCoreData.H:33
void RemakeLevel([[maybe_unused]] int lev, [[maybe_unused]] amrex::Real time, [[maybe_unused]] const amrex::BoxArray &ba, [[maybe_unused]] const amrex::DistributionMapping &dm) override
Definition: AmrCoreData.cpp:68
void MakeNewLevelFromScratch([[maybe_unused]] int lev, [[maybe_unused]] amrex::Real time, [[maybe_unused]] const amrex::BoxArray &ba, [[maybe_unused]] const amrex::DistributionMapping &dm) override
Definition: AmrCoreData.cpp:48
AmrCoreData(amrex::Geometry const &level_0_geom, amrex::AmrInfo const &amr_info)
Definition: AmrCoreData.cpp:17
void ClearLevel([[maybe_unused]] int lev) override
Definition: AmrCoreData.cpp:78
AmrCoreData & operator=(AmrCoreData &&rhs)=default
void ErrorEst([[maybe_unused]] int lev, [[maybe_unused]] amrex::TagBoxArray &tags, [[maybe_unused]] amrex::Real time, [[maybe_unused]] int ngrow) override
Definition: AmrCoreData.cpp:38
std::array< T, N > Array
void MakeNewLevelFromCoarse([[maybe_unused]] int lev, [[maybe_unused]] amrex::Real time, [[maybe_unused]] const amrex::BoxArray &ba, [[maybe_unused]] const amrex::DistributionMapping &dm) override
Definition: AmrCoreData.cpp:58