diff --git a/Source/WarpX.H b/Source/WarpX.H index 83b1880f2b1..a902e069c68 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -403,31 +403,6 @@ public: // Global rho nodal flag to know about rho index type when rho MultiFab is not allocated amrex::IntVect m_rho_nodal_flag; - /** - * \brief - * Allocate and optionally initialize the MultiFab. This also adds the MultiFab - * to the map of MultiFabs (used to ease the access to MultiFabs from the Python - * interface - * - * \param[out] mf The MultiFab unique pointer to be allocated - * \param[in] ba The BoxArray describing the MultiFab - * \param[in] dm The DistributionMapping describing the MultiFab - * \param[in] ncomp The number of components in the MultiFab - * \param[in] ngrow The number of guard cells in the MultiFab - * \param[in] level The refinement level - * \param[in] name The name of the MultiFab to use in the map - * \param[in] initial_value The optional initial value - */ - static void AllocInitMultiFab ( - std::unique_ptr& mf, - const amrex::BoxArray& ba, - const amrex::DistributionMapping& dm, - int ncomp, - const amrex::IntVect& ngrow, - int level, - const std::string& name, - std::optional initial_value = {}); - /** * \brief * Allocate and optionally initialize the iMultiFab. This also adds the iMultiFab @@ -453,30 +428,9 @@ public: const std::string& name, std::optional initial_value = {}); - /** - * \brief - * Create an alias of a MultiFab, adding the alias to the MultiFab map - * \param[out] mf The MultiFab to create - * \param[in] mf_to_alias The MultiFab to alias - * \param[in] scomp The starting component to be aliased - * \param[in] ncomp The number of components to alias - * \param[in] level The refinement level - * \param[in] name The name of the MultiFab to use in the map - * \param[in] initial_value optional initial value for MultiFab - */ - static void AliasInitMultiFab ( - std::unique_ptr& mf, - const amrex::MultiFab& mf_to_alias, - int scomp, - int ncomp, - int level, - const std::string& name, - std::optional initial_value); - - // Maps of all of the MultiFabs and iMultiFabs used (this can include MFs from other classes) - // This is a convenience for the Python interface, allowing all MultiFabs + // Maps of all of the iMultiFabs used (this can include MFs from other classes) + // This is a convenience for the Python interface, allowing all iMultiFabs // to be easily referenced from Python. - static std::map multifab_map; static std::map imultifab_map; /** diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 89254e05c98..250bab273d0 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -184,7 +184,6 @@ bool WarpX::safe_guard_cells = false; utils::parser::IntervalsParser WarpX::dt_update_interval; -std::map WarpX::multifab_map; std::map WarpX::imultifab_map; IntVect WarpX::filter_npass_each_dir(1); @@ -3284,26 +3283,6 @@ TagWithLevelSuffix (std::string name, int const level) return name; } -void -WarpX::AllocInitMultiFab ( - std::unique_ptr& mf, - const amrex::BoxArray& ba, - const amrex::DistributionMapping& dm, - const int ncomp, - const amrex::IntVect& ngrow, - const int level, - const std::string& name, - std::optional initial_value) -{ - const auto name_with_suffix = TagWithLevelSuffix(name, level); - const auto tag = amrex::MFInfo().SetTag(name_with_suffix); - mf = std::make_unique(ba, dm, ncomp, ngrow, tag); - if (initial_value) { - mf->setVal(*initial_value); - } - multifab_map[name_with_suffix] = mf.get(); -} - void WarpX::AllocInitMultiFab ( std::unique_ptr& mf, @@ -3324,24 +3303,6 @@ WarpX::AllocInitMultiFab ( imultifab_map[name_with_suffix] = mf.get(); } -void -WarpX::AliasInitMultiFab ( - std::unique_ptr& mf, - const amrex::MultiFab& mf_to_alias, - const int scomp, - const int ncomp, - const int level, - const std::string& name, - std::optional initial_value) -{ - const auto name_with_suffix = TagWithLevelSuffix(name, level); - mf = std::make_unique(mf_to_alias, amrex::make_alias, scomp, ncomp); - if (initial_value) { - mf->setVal(*initial_value); - } - multifab_map[name_with_suffix] = mf.get(); -} - amrex::DistributionMapping WarpX::MakeDistributionMap (int lev, amrex::BoxArray const& ba) {