From fbdcc9dde1e10b64b54513d4915ebdf48a2247a5 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Mon, 28 Aug 2023 18:53:16 +0200 Subject: Remove AddToMultiFabMap functions from WarpX class (#4242) * Remove AddToMultiFabMap functions from WarpX class * fixed bug --- Source/WarpX.H | 20 -------------------- Source/WarpX.cpp | 6 +++--- 2 files changed, 3 insertions(+), 23 deletions(-) (limited to 'Source') 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 multifab_map; static std::map 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& 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& mf) { - imultifab_map[name] = mf.get(); - } - std::array 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(); } -- cgit v1.2.3