Skip to content

Commit

Permalink
Clang-Tidy changes in Src/F_Interfaces (#3474)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang authored Aug 4, 2023
1 parent 933ec97 commit 559766e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Src/F_Interfaces/AmrCore/AMReX_FlashFluxRegister.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void FlashFluxRegister::define (const BoxArray& fba, const BoxArray& cba,
bl[dir].push_back(amrex::coarsen(amrex::bdryNode(ccbx,face.first),
ref_ratio));
procmap[dir].push_back(fdm[i]);
if (fdm[i] == myproc) my_global_indices[dir].push_back(i);
if (fdm[i] == myproc) { my_global_indices[dir].push_back(i); }
}
}

Expand Down Expand Up @@ -140,7 +140,7 @@ void FlashFluxRegister::define (const BoxArray& fba, const BoxArray& cba,
const int dir = face.coordDir();
bl[dir].push_back(amrex::bdryNode(ccbx,face));
procmap[dir].push_back(cdm[i]);
if (cdm[i] == myproc) my_global_indices[dir].push_back(i);
if (cdm[i] == myproc) { my_global_indices[dir].push_back(i); }
}
}

Expand Down
3 changes: 2 additions & 1 deletion Src/F_Interfaces/AmrCore/AMReX_fluxregister_fi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ extern "C"
bx.shiftHalf(dir,-1);

BL_ASSERT(flux_reg->nComp() == nfluxes);
if (zeroFirst)
if (zeroFirst) {
flux_reg->FineSetVal(dir, boxno, 0, flux_reg->nComp(), 0.0, RunOn::Cpu);
}
const FArrayBox fab(bx, nfluxes, const_cast<Real*>(fabdata));
flux_reg->FineAdd(fab, dir, boxno, 0, 0, flux_reg->nComp(), scale, RunOn::Cpu);
}
Expand Down
3 changes: 2 additions & 1 deletion Src/F_Interfaces/Base/AMReX_distromap_fi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ extern "C" {
{
Long dmsize = dm->size();
AMREX_ASSERT(plen >= dmsize);
for (int i = 0; i < dmsize && i < plen; ++i)
for (int i = 0; i < dmsize && i < plen; ++i) {
pmap[i] = (*dm)[i];
}
}

void amrex_fi_print_distromap (const DistributionMapping* dm)
Expand Down
3 changes: 2 additions & 1 deletion Src/F_Interfaces/Base/AMReX_geometry_fi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ extern "C"
void amrex_fi_geometry_get_pmask (int is_per[3])
{
Geometry* gg = AMReX::top()->getDefaultGeometry();
for (int i = 0; i < BL_SPACEDIM; ++i)
for (int i = 0; i < BL_SPACEDIM; ++i) {
is_per[i] = gg->isPeriodic(i);
}
}

void amrex_fi_geometry_get_probdomain (Real problo[3], Real probhi[3])
Expand Down
6 changes: 3 additions & 3 deletions Src/F_Interfaces/LinearSolvers/AMReX_abeclaplacian_fi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ extern "C" {
int max_coarsening_level)
{
LPInfo info;
if (metric_term >= 0) info.setMetricTerm(metric_term);
if (agglomeration >= 0) info.setAgglomeration(agglomeration);
if (consolidation >= 0) info.setConsolidation(consolidation);
if (metric_term >= 0) { info.setMetricTerm(metric_term); }
if (agglomeration >= 0) { info.setAgglomeration(agglomeration); }
if (consolidation >= 0) { info.setConsolidation(consolidation); }
info.setMaxCoarseningLevel(max_coarsening_level);
Vector<Geometry> g;
Vector<BoxArray> b;
Expand Down
6 changes: 3 additions & 3 deletions Src/F_Interfaces/LinearSolvers/AMReX_poisson_fi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ extern "C" {
int max_coarsening_level)
{
LPInfo info;
if (metric_term >= 0) info.setMetricTerm(metric_term);
if (agglomeration >= 0) info.setAgglomeration(agglomeration);
if (consolidation >= 0) info.setConsolidation(consolidation);
if (metric_term >= 0) { info.setMetricTerm(metric_term); }
if (agglomeration >= 0) { info.setAgglomeration(agglomeration); }
if (consolidation >= 0) { info.setConsolidation(consolidation); }
info.setMaxCoarseningLevel(max_coarsening_level);
Vector<Geometry> g;
Vector<BoxArray> b;
Expand Down

0 comments on commit 559766e

Please sign in to comment.