diff options
author | 2023-08-28 18:53:16 +0200 | |
---|---|---|
committer | 2023-08-28 09:53:16 -0700 | |
commit | fbdcc9dde1e10b64b54513d4915ebdf48a2247a5 (patch) | |
tree | a097f8e986197ca0ab97e9cdf978a0acaa385f74 | |
parent | 84a1a6c479753d8636ee9d26d621581ced2aab3b (diff) | |
download | WarpX-fbdcc9dde1e10b64b54513d4915ebdf48a2247a5.tar.gz WarpX-fbdcc9dde1e10b64b54513d4915ebdf48a2247a5.tar.zst WarpX-fbdcc9dde1e10b64b54513d4915ebdf48a2247a5.zip |
Remove AddToMultiFabMap functions from WarpX class (#4242)
* Remove AddToMultiFabMap functions from WarpX class
* fixed bug
-rw-r--r-- | Source/WarpX.H | 20 | ||||
-rw-r--r-- | Source/WarpX.cpp | 6 |
2 files changed, 3 insertions, 23 deletions
diff --git a/Source/WarpX.H b/Source/WarpX.H index 47021cbd6..9c0d9e301 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -439,26 +439,6 @@ public: static std::map<std::string, amrex::MultiFab *> multifab_map; static std::map<std::string, amrex::iMultiFab *> imultifab_map; - /** - * \brief - * Add the MultiFab to the map of MultiFabs - * \param name The name of the MultiFab use to reference the MultiFab - * \param mf The MultiFab to be added to the map (via a pointer to it) - */ - static void AddToMultiFabMap(const std::string& name, const std::unique_ptr<amrex::MultiFab>& mf) { - multifab_map[name] = mf.get(); - } - - /** - * \brief - * Add the iMultiFab to the map of MultiFabs - * \param name The name of the iMultiFab use to reference the iMultiFab - * \param mf The iMultiFab to be added to the map (via a pointer to it) - */ - static void AddToMultiFabMap(const std::string& name, const std::unique_ptr<amrex::iMultiFab>& mf) { - imultifab_map[name] = mf.get(); - } - std::array<const amrex::MultiFab* const, 3> get_array_Bfield_aux (const int lev) const { return { diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 2e787b68d..31fef18cb 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -3166,7 +3166,7 @@ WarpX::AllocInitMultiFab ( if (initial_value) { mf->setVal(*initial_value); } - WarpX::AddToMultiFabMap(name_with_suffix, mf); + multifab_map[name_with_suffix] = mf.get(); } void @@ -3186,7 +3186,7 @@ WarpX::AllocInitMultiFab ( if (initial_value) { mf->setVal(*initial_value); } - WarpX::AddToMultiFabMap(name_with_suffix, mf); + imultifab_map[name_with_suffix] = mf.get(); } void @@ -3204,5 +3204,5 @@ WarpX::AliasInitMultiFab ( if (initial_value) { mf->setVal(*initial_value); } - WarpX::AddToMultiFabMap(name_with_suffix, mf); + multifab_map[name_with_suffix] = mf.get(); } |