From f8fa6e132e4967c98374bb1d1c88848e567a7578 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sat, 21 Sep 2024 22:39:31 -0700 Subject: [PATCH] `MultiFabRegister`: Const & Clean - do not copy strings - include cleaning - finalize doxygen comments --- Source/ablastr/fields/MultiFabRegister.H | 158 ++++++------ Source/ablastr/fields/MultiFabRegister.cpp | 225 +++++++++--------- .../ablastr/fields/MultiFabRegister_string.H | 101 ++++---- 3 files changed, 237 insertions(+), 247 deletions(-) diff --git a/Source/ablastr/fields/MultiFabRegister.H b/Source/ablastr/fields/MultiFabRegister.H index ec088a74863..74d82758ec6 100644 --- a/Source/ablastr/fields/MultiFabRegister.H +++ b/Source/ablastr/fields/MultiFabRegister.H @@ -1,27 +1,27 @@ -/* Copyright 2024 The ABLAST Community +/* Copyright 2024 The ABLASTR Community * - * This file is part of WarpX. + * This file is part of ABLASTR. * * License: BSD-3-Clause-LBNL - * Authors: Axel Huebl, ... + * Authors: Axel Huebl */ #ifndef ABLASTR_FIELDS_MF_REGISTER_H #define ABLASTR_FIELDS_MF_REGISTER_H -#include #include #include #include #include #include #include +#include +#include #include #include #include #include #include -#include #include #include @@ -193,12 +193,12 @@ namespace ablastr::fields amrex::DistributionMapping const & dm, int ncomp, amrex::IntVect const & ngrow, - std::optional initial_value = std::nullopt, + std::optional initial_value = std::nullopt, bool remake = true, bool redistribute_on_remake = true ) { - return alloc_init( + return alloc_init( getExtractedName(name), level, ba, @@ -238,12 +238,12 @@ namespace ablastr::fields amrex::DistributionMapping const & dm, int ncomp, amrex::IntVect const & ngrow, - std::optional initial_value = std::nullopt, + std::optional initial_value = std::nullopt, bool remake = true, bool redistribute_on_remake = true ) { - return alloc_init( + return alloc_init( getExtractedName(name), dir, level, @@ -274,10 +274,10 @@ namespace ablastr::fields N new_name, A alias_name, int level, - std::optional initial_value = std::nullopt + std::optional initial_value = std::nullopt ) { - return alias_init( + return alias_init( getExtractedName(new_name), getExtractedName(alias_name), level, @@ -304,10 +304,10 @@ namespace ablastr::fields A alias_name, Direction dir, int level, - std::optional initial_value = std::nullopt + std::optional initial_value = std::nullopt ) { - return alias_init( + return alias_init( getExtractedName(new_name), getExtractedName(alias_name), dir, @@ -345,7 +345,7 @@ namespace ablastr::fields int level ) const { - return has( + return has( getExtractedName(name), level ); @@ -366,7 +366,7 @@ namespace ablastr::fields int level ) const { - return has( + return has( getExtractedName(name), dir, level @@ -386,7 +386,7 @@ namespace ablastr::fields int level ) const { - return has_vector( + return has_vector( getExtractedName(name), level ); @@ -396,8 +396,8 @@ namespace ablastr::fields * * This throws a runtime error if the requested field is not present. * - * @param name the name to check if registered - * @param level the MR level to check + * @param name the name of the field + * @param level the MR level * @return a non-owning pointer to the MultiFab (field) */ template @@ -407,7 +407,7 @@ namespace ablastr::fields int level ) { - return get( + return get( getExtractedName(name), level ); @@ -417,9 +417,9 @@ namespace ablastr::fields * * This throws a runtime error if the requested field is not present. * - * @param name the name to check if registered + * @param name the name of the field * @param dir the field component for vector fields ("direction" of the unit vector) - * @param level the MR level to check + * @param level the MR level * @return a non-owning pointer to the MultiFab (field) */ template @@ -430,7 +430,7 @@ namespace ablastr::fields int level ) { - return get( + return get( getExtractedName(name), dir, level @@ -441,8 +441,8 @@ namespace ablastr::fields * * This throws a runtime error if the requested field is not present. * - * @param name the name to check if registered - * @param level the MR level to check + * @param name the name of the field + * @param level the MR level * @return a non-owning pointer to the MultiFab (field) */ template @@ -452,7 +452,7 @@ namespace ablastr::fields int level ) const { - return get( + return get( getExtractedName(name), level ); @@ -462,9 +462,9 @@ namespace ablastr::fields * * This throws a runtime error if the requested field is not present. * - * @param name the name to check if registered + * @param name the name of the field * @param dir the field component for vector fields ("direction" of the unit vector) - * @param level the MR level to check + * @param level the MR level * @return a non-owning pointer to the MultiFab (field) */ template @@ -475,20 +475,20 @@ namespace ablastr::fields int level ) const { - return get( + return get( getExtractedName(name), dir, level ); } - /** title + /** Return the MultiFab of a scalar field on all MR levels. * - * Same as get above, but returns all levels for a name. + * This throws a runtime error if the requested field is not present. * - * @param name ... - * @param finest_level ... - * @return ... + * @param name the name of the field + * @param finest_level the highest MR level to return + * @return non-owning pointers to the MultiFab (field) on all levels */ //@{ template @@ -498,7 +498,7 @@ namespace ablastr::fields int finest_level ) { - return get_mr_levels( + return get_mr_levels( getExtractedName(name), finest_level ); @@ -510,7 +510,7 @@ namespace ablastr::fields int finest_level ) const { - return get_mr_levels( + return get_mr_levels( getExtractedName(name), finest_level ); @@ -521,9 +521,9 @@ namespace ablastr::fields * * Same as get above, but returns all levels for a name. * - * @param name ... - * @param level ... - * @return ... + * @param name the name of the field + * @param level the MR level + * @return non-owning pointers to all components of a vector field */ //@{ template @@ -533,7 +533,7 @@ namespace ablastr::fields int level ) { - return get_alldirs( + return get_alldirs( getExtractedName(name), level ); @@ -545,7 +545,7 @@ namespace ablastr::fields int level ) const { - return get_alldirs( + return get_alldirs( getExtractedName(name), level ); @@ -557,9 +557,9 @@ namespace ablastr::fields * Out loop: MR levels. * Inner loop: directions (components). * - * @param name ... - * @param finest_level ... - * @return ... + * @param name the name of the field + * @param finest_level the highest MR level to return + * @return non-owning pointers to all components of a vector field on all MR levels */ //@{ template @@ -569,7 +569,7 @@ namespace ablastr::fields int finest_level ) { - return get_mr_levels_alldirs( + return get_mr_levels_alldirs( getExtractedName(name), finest_level ); @@ -581,30 +581,24 @@ namespace ablastr::fields int finest_level ) const { - return get_mr_levels_alldirs( + return get_mr_levels_alldirs( getExtractedName(name), finest_level ); } //@} - /** title + /** List the internal names of all registered fields. * - * body body - * body - * - * @return ... + * @return all currently allocated and registered fields */ [[nodiscard]] std::vector list () const; - /** title - * - * body body - * body + /** Deallocate and remove a scalar field. * - * @param name ... - * @param level ... + * @param name the name of the field + * @param level the MR level */ template void @@ -613,17 +607,14 @@ namespace ablastr::fields int level ) { - erase(getExtractedName(name), level); + erase(getExtractedName(name), level); } - /** title - * - * body body - * body + /** Deallocate and remove a vector field component. * - * @param name ... - * @param dir ... - * @param level ... + * @param name the name of the field + * @param dir the field component for vector fields ("direction" of the unit vector) + * @param level the MR level */ template void @@ -633,7 +624,7 @@ namespace ablastr::fields int level ) { - erase(getExtractedName(name), dir, level); + erase(getExtractedName(name), dir, level); } /** Erase all MultiFabs on a specific MR level. @@ -660,14 +651,11 @@ namespace ablastr::fields amrex::DistributionMapping const & new_dm ); - /** title - * - * body body - * body + /** Create the register name of scalar field and MR level * - * @param name ... - * @param level ... - * @return ... + * @param name the name of the field + * @param level the MR level + * @return internal name of the field in the register */ [[nodiscard]] std::string mf_name ( @@ -675,15 +663,12 @@ namespace ablastr::fields int level ) const; - /** title + /** Create the register name of vector field, component direction and MR level * - * body body - * body - * - * @param name ... - * @param dir ... - * @param level ... - * @return ... + * @param name the name of the field + * @param dir the field component for vector fields ("direction" of the unit vector) + * @param level the MR level + * @return internal name of the field in the register */ [[nodiscard]] std::string mf_name ( @@ -695,11 +680,11 @@ namespace ablastr::fields private: amrex::MultiFab * internal_get ( - const std::string& key + std::string const & key ); [[nodiscard]] amrex::MultiFab const * internal_get ( - const std::string& key + std::string const & key ) const; /** data storage: ownership and lifetime control */ @@ -707,15 +692,18 @@ namespace ablastr::fields std::string, MultiFabOwner > m_mf_register; + + /** the three directions of a vector field */ + std::vector m_all_dirs = {Direction{0}, Direction{1}, Direction{2}}; }; - /** TODO: temporary, remove me + /** Little temporary helper function to pass temporary MultiFabs as VectorField. * - * @return + * @return pointers to externally managed vector field components (3 MultiFab) */ VectorField a2m ( - const std::array< std::unique_ptr, 3 > & old_vectorfield + std::array< std::unique_ptr, 3 > const & old_vectorfield ); } // namespace ablastr::fields diff --git a/Source/ablastr/fields/MultiFabRegister.cpp b/Source/ablastr/fields/MultiFabRegister.cpp index 27407ad70f2..2f3b4fb3a97 100644 --- a/Source/ablastr/fields/MultiFabRegister.cpp +++ b/Source/ablastr/fields/MultiFabRegister.cpp @@ -1,29 +1,35 @@ -/* Copyright 2024 The ABLAST Community +/* Copyright 2024 The ABLASTR Community * - * This file is part of WarpX. + * This file is part of ABLASTR. * * License: BSD-3-Clause-LBNL - * Authors: Axel Huebl, ... + * Authors: Axel Huebl */ #include "MultiFabRegister.H" -#include "ablastr/utils/TextMsg.H" +#include -#include +#include +#include +#include +#include +#include +#include +#include namespace ablastr::fields { template<> amrex::MultiFab* - MultiFabRegister::alloc_init ( - std::string name, + MultiFabRegister::alloc_init ( + std::string const & name, int level, amrex::BoxArray const & ba, amrex::DistributionMapping const & dm, int ncomp, amrex::IntVect const & ngrow, - std::optional initial_value, + std::optional initial_value, bool remake, bool redistribute_on_remake ) @@ -34,12 +40,12 @@ namespace ablastr::fields } // fully qualified name - name = mf_name(name, level); + std::string const internal_name = mf_name(name, level); // allocate - const auto tag = amrex::MFInfo().SetTag(name); + const auto tag = amrex::MFInfo().SetTag(internal_name); auto [it, success] = m_mf_register.emplace( - name, + internal_name, MultiFabOwner{ {ba, dm, ncomp, ngrow, tag}, std::nullopt, // scalar: no direction @@ -50,10 +56,10 @@ namespace ablastr::fields } ); if (!success) { - throw std::runtime_error("MultiFabRegister::alloc_init failed for " + name); + throw std::runtime_error("MultiFabRegister::alloc_init failed for " + internal_name); } - // a short-hand alias for the code below + // a shorthand alias for the code below amrex::MultiFab & mf = it->second.m_mf; // initialize with value @@ -66,15 +72,15 @@ namespace ablastr::fields template<> amrex::MultiFab* - MultiFabRegister::alloc_init ( - std::string name, + MultiFabRegister::alloc_init ( + std::string const & name, Direction dir, int level, amrex::BoxArray const & ba, amrex::DistributionMapping const & dm, int ncomp, amrex::IntVect const & ngrow, - std::optional initial_value, + std::optional initial_value, bool remake, bool redistribute_on_remake ) @@ -89,12 +95,12 @@ namespace ablastr::fields } // fully qualified name - name = mf_name(name, dir, level); + std::string const internal_name = mf_name(name, dir, level); // allocate - const auto tag = amrex::MFInfo().SetTag(name); + const auto tag = amrex::MFInfo().SetTag(internal_name); auto [it, success] = m_mf_register.emplace( - name, + internal_name, MultiFabOwner{ {ba, dm, ncomp, ngrow, tag}, dir, @@ -105,10 +111,10 @@ namespace ablastr::fields } ); if (!success) { - throw std::runtime_error("MultiFabRegister::alloc_init failed for " + name); + throw std::runtime_error("MultiFabRegister::alloc_init failed for " + internal_name); } - // a short-hand alias for the code below + // a shorthand alias for the code below amrex::MultiFab & mf = it->second.m_mf; // initialize with value @@ -136,11 +142,11 @@ namespace ablastr::fields template<> amrex::MultiFab* - MultiFabRegister::alias_init ( - std::string new_name, - std::string alias_name, + MultiFabRegister::alias_init ( + std::string const & new_name, + std::string const & alias_name, int level, - std::optional initial_value + std::optional initial_value ) { // checks @@ -160,30 +166,30 @@ namespace ablastr::fields } // fully qualified name - new_name = mf_name(new_name, level); - alias_name = mf_name(alias_name, level); + std::string const internal_new_name = mf_name(new_name, level); + std::string const internal_alias_name = mf_name(alias_name, level); - MultiFabOwner & alias = m_mf_register[alias_name]; + MultiFabOwner & alias = m_mf_register[internal_alias_name]; amrex::MultiFab & mf_alias = alias.m_mf; // allocate auto [it, success] = m_mf_register.emplace( - new_name, + internal_new_name, MultiFabOwner{ {mf_alias, amrex::make_alias, 0, mf_alias.nComp()}, std::nullopt, // scalar: no direction level, alias.m_remake, alias.m_redistribute_on_remake, - alias_name + internal_alias_name } ); if (!success) { - throw std::runtime_error("MultiFabRegister::alias_init failed for " + new_name); + throw std::runtime_error("MultiFabRegister::alias_init failed for " + internal_new_name); } - // a short-hand alias for the code below + // a shorthand alias for the code below amrex::MultiFab & mf = it->second.m_mf; // initialize with value @@ -196,12 +202,12 @@ namespace ablastr::fields template<> amrex::MultiFab* - MultiFabRegister::alias_init ( - std::string new_name, - std::string alias_name, + MultiFabRegister::alias_init ( + std::string const & new_name, + std::string const & alias_name, Direction dir, int level, - std::optional initial_value + std::optional initial_value ) { // checks @@ -221,26 +227,26 @@ namespace ablastr::fields } // fully qualified name - new_name = mf_name(new_name, dir, level); - alias_name = mf_name(alias_name, dir, level); + std::string const internal_new_name = mf_name(new_name, dir, level); + std::string const internal_alias_name = mf_name(alias_name, dir, level); - MultiFabOwner & alias = m_mf_register[alias_name]; + MultiFabOwner & alias = m_mf_register[internal_alias_name]; amrex::MultiFab & mf_alias = alias.m_mf; // allocate auto [it, success] = m_mf_register.emplace( - new_name, + internal_new_name, MultiFabOwner{ {mf_alias, amrex::make_alias, 0, mf_alias.nComp()}, dir, level, alias.m_remake, alias.m_redistribute_on_remake, - alias_name + internal_alias_name } ); if (!success) { - throw std::runtime_error("MultiFabRegister::alias_init failed for " + new_name); + throw std::runtime_error("MultiFabRegister::alias_init failed for " + internal_new_name); } // a short-hand alias for the code below @@ -312,40 +318,39 @@ namespace ablastr::fields template<> bool - MultiFabRegister::has ( - std::string name, + MultiFabRegister::has ( + std::string const & name, int level ) const { - name = mf_name(name, level); + std::string const internal_name = mf_name(name, level); - return m_mf_register.count(name) > 0; + return m_mf_register.count(internal_name) > 0; } template<> bool - MultiFabRegister::has ( - std::string name, + MultiFabRegister::has ( + std::string const & name, Direction dir, int level ) const { - name = mf_name(name, dir, level); + std::string const internal_name = mf_name(name, dir, level); - return m_mf_register.count(name) > 0; + return m_mf_register.count(internal_name) > 0; } template<> bool - MultiFabRegister::has_vector ( - std::string name, + MultiFabRegister::has_vector ( + std::string const & name, int level ) const { - const std::vector all_dirs = {Direction{0}, Direction{1}, Direction{2}}; - unsigned long count = 0; - for (const Direction& dir : all_dirs) { + for (Direction const & dir : m_all_dirs) + { std::string const internal_name = mf_name(name, dir, level); count += m_mf_register.count(internal_name); } @@ -355,7 +360,7 @@ namespace ablastr::fields amrex::MultiFab* MultiFabRegister::internal_get ( - const std::string& key + std::string const & key ) { if (m_mf_register.count(key) == 0) { @@ -370,7 +375,7 @@ namespace ablastr::fields amrex::MultiFab const * MultiFabRegister::internal_get ( - const std::string& key + std::string const & key ) const { if (m_mf_register.count(key) == 0) { @@ -385,54 +390,54 @@ namespace ablastr::fields template<> amrex::MultiFab* - MultiFabRegister::get ( - std::string name, + MultiFabRegister::get ( + std::string const & name, int level ) { - name = mf_name(name, level); - return internal_get(name); + std::string const internal_name = mf_name(name, level); + return internal_get(internal_name); } template<> amrex::MultiFab* - MultiFabRegister::get ( - std::string name, + MultiFabRegister::get ( + std::string const & name, Direction dir, int level ) { - name = mf_name(name, dir, level); - return internal_get(name); + std::string const internal_name = mf_name(name, dir, level); + return internal_get(internal_name); } template<> amrex::MultiFab const * - MultiFabRegister::get ( - std::string name, + MultiFabRegister::get ( + std::string const & name, int level ) const { - name = mf_name(name, level); - return internal_get(name); + std::string const internal_name = mf_name(name, level); + return internal_get(internal_name); } template<> amrex::MultiFab const * - MultiFabRegister::get ( - std::string name, + MultiFabRegister::get ( + std::string const & name, Direction dir, int level ) const { - name = mf_name(name, dir, level); - return internal_get(name); + std::string const internal_name = mf_name(name, dir, level); + return internal_get(internal_name); } template<> MultiLevelScalarField - MultiFabRegister::get_mr_levels ( - std::string name, + MultiFabRegister::get_mr_levels ( + std::string const & name, int finest_level ) { @@ -447,8 +452,8 @@ namespace ablastr::fields template<> ConstMultiLevelScalarField - MultiFabRegister::get_mr_levels ( - std::string name, + MultiFabRegister::get_mr_levels ( + std::string const & name, int finest_level ) const { @@ -463,19 +468,16 @@ namespace ablastr::fields template<> VectorField - MultiFabRegister::get_alldirs ( - std::string name, + MultiFabRegister::get_alldirs ( + std::string const & name, int level ) { - // TODO: Technically, we should search field_on_level via std::unique_copy - const std::vector all_dirs = {Direction{0}, Direction{1}, Direction{2}}; - // insert a new level VectorField vectorField; // insert components - for (const Direction& dir : all_dirs) + for (Direction const & dir : m_all_dirs) { vectorField[dir] = get(name, dir, level); } @@ -484,19 +486,16 @@ namespace ablastr::fields template<> ConstVectorField - MultiFabRegister::get_alldirs ( - std::string name, + MultiFabRegister::get_alldirs ( + std::string const & name, int level ) const { - // TODO: Technically, we should search field_on_level via std::unique_copy - const std::vector all_dirs = {Direction{0}, Direction{1}, Direction{2}}; - // insert a new level ConstVectorField vectorField; // insert components - for (const Direction& dir: all_dirs) + for (Direction const & dir : m_all_dirs) { vectorField[dir] = get(name, dir, level); } @@ -505,24 +504,21 @@ namespace ablastr::fields template<> MultiLevelVectorField - MultiFabRegister::get_mr_levels_alldirs ( - std::string name, + MultiFabRegister::get_mr_levels_alldirs ( + std::string const & name, int finest_level ) { MultiLevelVectorField field_on_level; field_on_level.reserve(finest_level+1); - // TODO: Technically, we should search field_on_level via std::unique_copy - const std::vector all_dirs = {Direction{0}, Direction{1}, Direction{2}}; - for (int lvl = 0; lvl <= finest_level; lvl++) { // insert a new level field_on_level.push_back(VectorField{}); // insert components - for (const Direction& dir : all_dirs) + for (Direction const & dir : m_all_dirs) { field_on_level[lvl][dir] = get(name, dir, lvl); } @@ -532,24 +528,21 @@ namespace ablastr::fields template<> ConstMultiLevelVectorField - MultiFabRegister::get_mr_levels_alldirs ( - std::string name, + MultiFabRegister::get_mr_levels_alldirs ( + std::string const & name, int finest_level ) const { ConstMultiLevelVectorField field_on_level; field_on_level.reserve(finest_level+1); - // TODO: Technically, we should search field_on_level via std::unique_copy - const std::vector all_dirs = {Direction{0}, Direction{1}, Direction{2}}; - for (int lvl = 0; lvl <= finest_level; lvl++) { // insert a new level field_on_level.push_back(ConstVectorField{}); // insert components - for (const Direction& dir : all_dirs) + for (Direction const & dir : m_all_dirs) { field_on_level[lvl][dir] = get(name, dir, lvl); } @@ -569,33 +562,33 @@ namespace ablastr::fields template<> void - MultiFabRegister::erase ( - std::string name, + MultiFabRegister::erase ( + std::string const & name, int level ) { - name = mf_name(name, level); + std::string const internal_name = mf_name(name, level); - if (m_mf_register.count(name) != 1) { - throw std::runtime_error("MultiFabRegister::erase name does not exist in register: " + name); + if (m_mf_register.count(internal_name) != 1) { + throw std::runtime_error("MultiFabRegister::erase name does not exist in register: " + internal_name); } - m_mf_register.erase(name); + m_mf_register.erase(internal_name); } template<> void - MultiFabRegister::erase ( - std::string name, + MultiFabRegister::erase ( + std::string const & name, Direction dir, int level ) { - name = mf_name(name, dir, level); + std::string const internal_name = mf_name(name, dir, level); - if (m_mf_register.count(name) != 1) { - throw std::runtime_error("MultiFabRegister::erase name does not exist in register: " + name); + if (m_mf_register.count(internal_name) != 1) { + throw std::runtime_error("MultiFabRegister::erase name does not exist in register: " + internal_name); } - m_mf_register.erase(name); + m_mf_register.erase(internal_name); } void @@ -645,15 +638,15 @@ namespace ablastr::fields VectorField a2m ( - const std::array< std::unique_ptr, 3 > & old_vectorfield + std::array< std::unique_ptr, 3 > const & old_vectorfield ) { - const std::vector all_dirs = {Direction{0}, Direction{1}, Direction{2}}; + std::vector const all_dirs = {Direction{0}, Direction{1}, Direction{2}}; VectorField field_on_level; // insert components - for (const auto dir : {0, 1, 2}) + for (auto const dir : {0, 1, 2}) { field_on_level[Direction{dir}] = old_vectorfield[dir].get(); } diff --git a/Source/ablastr/fields/MultiFabRegister_string.H b/Source/ablastr/fields/MultiFabRegister_string.H index f4139c7a540..8ef8ccb2b2f 100644 --- a/Source/ablastr/fields/MultiFabRegister_string.H +++ b/Source/ablastr/fields/MultiFabRegister_string.H @@ -1,6 +1,6 @@ -/* Copyright 2024 The ABLAST Community +/* Copyright 2024 The ABLASTR Community * - * This file is part of WarpX. + * This file is part of ABLASTR. * It adds unique string key access to the MultiFabRegister. * * License: BSD-3-Clause-LBNL @@ -11,162 +11,171 @@ #include "MultiFabRegister.H" +#include +#include +#include +#include +#include + +#include +#include + namespace ablastr::fields { template<> amrex::MultiFab* - MultiFabRegister::alloc_init ( - std::string name, + MultiFabRegister::alloc_init ( + std::string const & name, int level, amrex::BoxArray const & ba, amrex::DistributionMapping const & dm, int ncomp, amrex::IntVect const & ngrow, - std::optional initial_value, + std::optional initial_value, bool remake, bool redistribute_on_remake ); template<> amrex::MultiFab* - MultiFabRegister::alloc_init ( - std::string name, + MultiFabRegister::alloc_init ( + std::string const & name, Direction dir, int level, amrex::BoxArray const & ba, amrex::DistributionMapping const & dm, int ncomp, amrex::IntVect const & ngrow, - std::optional initial_value, + std::optional initial_value, bool remake, bool redistribute_on_remake ); template<> amrex::MultiFab* - MultiFabRegister::alias_init ( - std::string new_name, - std::string alias_name, + MultiFabRegister::alias_init ( + std::string const & new_name, + std::string const & alias_name, int level, - std::optional initial_value + std::optional initial_value ); template<> amrex::MultiFab* - MultiFabRegister::alias_init ( - std::string new_name, - std::string alias_name, + MultiFabRegister::alias_init ( + std::string const & new_name, + std::string const & alias_name, Direction dir, int level, - std::optional initial_value + std::optional initial_value ); template<> bool - MultiFabRegister::has ( - std::string name, + MultiFabRegister::has ( + std::string const & name, int level ) const; template<> bool - MultiFabRegister::has ( - std::string name, + MultiFabRegister::has ( + std::string const & name, Direction dir, int level ) const; template<> bool - MultiFabRegister::has_vector ( - std::string name, + MultiFabRegister::has_vector ( + std::string const & name, int level ) const; template<> amrex::MultiFab* - MultiFabRegister::get ( - std::string name, + MultiFabRegister::get ( + std::string const & name, int level ); template<> amrex::MultiFab* - MultiFabRegister::get ( - std::string name, + MultiFabRegister::get ( + std::string const & name, Direction dir, int level ); template<> amrex::MultiFab const* - MultiFabRegister::get ( - std::string name, + MultiFabRegister::get ( + std::string const & name, int level ) const; template<> amrex::MultiFab const * - MultiFabRegister::get ( - std::string name, + MultiFabRegister::get ( + std::string const & name, Direction dir, int level ) const; template<> MultiLevelScalarField - MultiFabRegister::get_mr_levels ( - std::string name, + MultiFabRegister::get_mr_levels ( + std::string const & name, int finest_level ); template<> ConstMultiLevelScalarField - MultiFabRegister::get_mr_levels ( - std::string name, + MultiFabRegister::get_mr_levels ( + std::string const & name, int finest_level ) const; template<> VectorField - MultiFabRegister::get_alldirs ( - std::string name, + MultiFabRegister::get_alldirs ( + std::string const & name, int level ); template<> ConstVectorField - MultiFabRegister::get_alldirs ( - std::string name, + MultiFabRegister::get_alldirs ( + std::string const & name, int level ) const; template<> MultiLevelVectorField - MultiFabRegister::get_mr_levels_alldirs ( - std::string name, + MultiFabRegister::get_mr_levels_alldirs ( + std::string const & name, int finest_level ); template<> ConstMultiLevelVectorField - MultiFabRegister::get_mr_levels_alldirs ( - std::string name, + MultiFabRegister::get_mr_levels_alldirs ( + std::string const & name, int finest_level ) const; template<> void - MultiFabRegister::erase ( - std::string name, + MultiFabRegister::erase ( + std::string const & name, int level ); template<> void - MultiFabRegister::erase ( - std::string name, + MultiFabRegister::erase ( + std::string const & name, Direction dir, int level );