Skip to content

Commit 8b3e65b

Browse files
committed
some more progress
1 parent c41ab83 commit 8b3e65b

6 files changed

Lines changed: 18 additions & 12 deletions

File tree

.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ Checks: >
1313
-cppcoreguidelines-init-variables,
1414
-cppcoreguidelines-interfaces-global-init,
1515
-cppcoreguidelines-macro-usage,
16-
-cppcoreguidelines-no-malloc,
1716
-cppcoreguidelines-non-private-member-variables-in-classes,
1817
-cppcoreguidelines-owning-memory,
1918
-cppcoreguidelines-pro-*,
2019
misc-*,
2120
-misc-const-correctness,
2221
-misc-include-cleaner,
22+
-misc-use-internal-linkage,
2323
-misc-non-private-member-variables-in-classes,
2424
-misc-no-recursion,
2525
modernize-*,

Source/BaseStateGeometry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void BaseStateGeometry::Init(const int max_radial_level_in,
4848
// compute center(:)
4949
if (octant) {
5050
for (auto i = 0; i < 3; ++i) {
51-
if (!(spherical && AMREX_SPACEDIM == 3 && probLo[i] == 0.0)) {
51+
if (!(spherical && AMREX_SPACEDIM == 3 && probLo[i] == 0.0)) { // NOLINT(misc-redundant-expression)
5252
Abort("ERROR: octant requires spherical with prob_lo = 0.0");
5353
}
5454
center[i] = 0.0;

Source/MaestroAverage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void Maestro::Average(const Vector<MultiFab>& phi, BaseState<Real>& phibar,
3838
// compute number of cells at any given height for each level
3939
if (AMREX_SPACEDIM == 2) {
4040
ncell(lev) = domainBox.bigEnd(0) + 1;
41-
} else if (AMREX_SPACEDIM == 3) {
41+
} else if (AMREX_SPACEDIM == 3) { // NOLINT(misc-redundant-expression)
4242
ncell(lev) =
4343
(domainBox.bigEnd(0) + 1) * (domainBox.bigEnd(1) + 1);
4444
}

Source/MaestroEvolve.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ void Maestro::Evolve() {
1414
amrex::Print() << amrex::Font::Bold << amrex::FGColor::Green << "Beginning main evolution" << amrex::ResetDisplay << std::endl;
1515

1616
// check to make sure spherical is only used for 3d
17-
if (spherical && AMREX_SPACEDIM != 3) {
17+
#if AMREX_SPACEDIM < 3
18+
if (spherical) {
1819
Abort("spherical = 1 and dm != 3");
1920
}
21+
#endif
2022

2123
// index for diag array buffer
2224
int diag_index = 0;

Source/PhysBCFunctMaestro.H

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44
#include <AMReX_PhysBCFunct.H>
55

66
extern "C" {
7-
typedef void (*BndryFuncDefaultMaestro)(
8-
const amrex::Array4<amrex::Real>& scal, const amrex::Box& bx,
9-
const amrex::Box& domainBox, const amrex::Real* dx, const amrex::BCRec bcs,
10-
const amrex::Real* gridlo, const int comp);
7+
using BndryFuncDefaultMaestro =
8+
void (*)(const amrex::Array4<amrex::Real>& scal,
9+
const amrex::Box& bx,
10+
const amrex::Box& domainBox,
11+
const amrex::Real* dx,
12+
const amrex::BCRec bcs,
13+
const amrex::Real* gridlo,
14+
const int comp);
1115
}
1216

1317
/// This version calls function working on array

Util/model_parser/ModelParser.H

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
/// Define Real vector types for CUDA-compatability. If `AMREX_USE_CUDA`, then
1212
/// this will be stored in CUDA managed memory.
1313
#ifdef AMREX_USE_CUDA
14-
typedef amrex::Gpu::ManagedVector<amrex::Real> RealVector;
15-
typedef amrex::Gpu::ManagedVector<int> IntVector;
14+
using RealVector = amrex::Gpu::ManagedVector<amrex::Real>;
15+
using IntVector = amrex::Gpu::ManagedVector<int>;
1616
#else
17-
typedef amrex::Vector<amrex::Real> RealVector;
18-
typedef amrex::Vector<int> IntVector;
17+
using RealVector = amrex::Vector<amrex::Real>;
18+
using IntVector = amrex::Vector<int>;
1919
#endif
2020

2121
class ModelParser {

0 commit comments

Comments
 (0)