Skip to content

Commit

Permalink
MultiFabRegister: Clang-Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Sep 17, 2024
1 parent f4bcea5 commit fc9cc97
Showing 1 changed file with 37 additions and 44 deletions.
81 changes: 37 additions & 44 deletions Source/ablastr/fields/MultiFabRegister.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,15 @@ namespace ablastr::fields
// allocate
const auto tag = amrex::MFInfo().SetTag(name);
auto [it, success] = m_mf_register.emplace(
std::make_pair(
name,
MultiFabOwner{
{ba, dm, ncomp, ngrow, tag},
std::nullopt, // scalar: no direction
level,
remake,
redistribute_on_remake,
"" // we own the memory
}
)
name,
MultiFabOwner{
{ba, dm, ncomp, ngrow, tag},
std::nullopt, // scalar: no direction
level,
remake,
redistribute_on_remake,
"" // we own the memory
}
);
if (!success) {
throw std::runtime_error("MultiFabRegister::alloc_init failed for " + name);
Expand Down Expand Up @@ -94,17 +92,15 @@ namespace ablastr::fields
// allocate
const auto tag = amrex::MFInfo().SetTag(name);
auto [it, success] = m_mf_register.emplace(
std::make_pair(
name,
MultiFabOwner{
{ba, dm, ncomp, ngrow, tag},
dir,
level,
remake,
redistribute_on_remake,
"" // we own the memory
}
)
name,
MultiFabOwner{
{ba, dm, ncomp, ngrow, tag},
dir,
level,
remake,
redistribute_on_remake,
"" // we own the memory
}
);
if (!success) {
throw std::runtime_error("MultiFabRegister::alloc_init failed for " + name);
Expand Down Expand Up @@ -168,17 +164,16 @@ namespace ablastr::fields

// allocate
auto [it, success] = m_mf_register.emplace(
std::make_pair(
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
}
)
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
}

);
if (!success) {
throw std::runtime_error("MultiFabRegister::alias_init failed for " + new_name);
Expand Down Expand Up @@ -229,17 +224,15 @@ namespace ablastr::fields

// allocate
auto [it, success] = m_mf_register.emplace(
std::make_pair(
new_name,
MultiFabOwner{
{mf_alias, amrex::make_alias, 0, mf_alias.nComp()},
dir,
level,
alias.m_remake,
alias.m_redistribute_on_remake,
alias_name
}
)
new_name,
MultiFabOwner{
{mf_alias, amrex::make_alias, 0, mf_alias.nComp()},
dir,
level,
alias.m_remake,
alias.m_redistribute_on_remake,
alias_name
}
);
if (!success) {
throw std::runtime_error("MultiFabRegister::alias_init failed for " + new_name);
Expand Down

0 comments on commit fc9cc97

Please sign in to comment.