diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c9ffbd3..f6f1debb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -570,7 +570,7 @@ jobs: #set -eu -o pipefail cmake --build . --parallel ${{env.NPROCS}} 2>&1 | tee -a clang-tidy-full-report.txt egrep "warning:|error:" clang-tidy-full-report.txt \ - | egrep -v "Submodules/amrex|Submodules/sundials" \ + | egrep -v "Submodules/amrex|Submodules/sundials|Submodules/AMReX-Hydro" \ | egrep -v "ld: warning:" | sort | uniq \ | awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > clang-tidy-warnings.txt - name: Full report @@ -582,7 +582,7 @@ jobs: echo "::add-matcher::.github/problem-matchers/gcc.json" cat clang-tidy-warnings.txt export return=$(tail -n 1 clang-tidy-warnings.txt | awk '{print $2}') - #exit ${return} + exit ${return} Lint-codeql: needs: Formatting runs-on: ubuntu-latest diff --git a/Exec/Cases/ChallengeProblem/EBUserDefined.H b/Exec/Cases/ChallengeProblem/EBUserDefined.H index 3e2861d2..24f2d57b 100644 --- a/Exec/Cases/ChallengeProblem/EBUserDefined.H +++ b/Exec/Cases/ChallengeProblem/EBUserDefined.H @@ -1,5 +1,5 @@ -#ifndef _EBUSERDEFINED_H_ -#define _EBUSERDEFINED_H_ +#ifndef _EBUSERDEFINED_H +#define _EBUSERDEFINED_H using namespace amrex; diff --git a/Exec/Cases/ChallengeProblem/pelelm_prob.H b/Exec/Cases/ChallengeProblem/pelelm_prob.H index ac890cb1..414f19bb 100644 --- a/Exec/Cases/ChallengeProblem/pelelm_prob.H +++ b/Exec/Cases/ChallengeProblem/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Cases/ChallengeProblem/pelelm_prob_parm.H b/Exec/Cases/ChallengeProblem/pelelm_prob_parm.H index 6b45e8a0..73b60e2d 100644 --- a/Exec/Cases/ChallengeProblem/pelelm_prob_parm.H +++ b/Exec/Cases/ChallengeProblem/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/Cases/CounterFlow/pelelm_prob.H b/Exec/Cases/CounterFlow/pelelm_prob.H index fd17d358..db264ab7 100644 --- a/Exec/Cases/CounterFlow/pelelm_prob.H +++ b/Exec/Cases/CounterFlow/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Cases/CounterFlow/pelelm_prob_parm.H b/Exec/Cases/CounterFlow/pelelm_prob_parm.H index 1ed28c20..41e9933a 100644 --- a/Exec/Cases/CounterFlow/pelelm_prob_parm.H +++ b/Exec/Cases/CounterFlow/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include diff --git a/Exec/Cases/CounterFlowSpray/pelelm_prob.H b/Exec/Cases/CounterFlowSpray/pelelm_prob.H index 6c781a82..c402a1fa 100644 --- a/Exec/Cases/CounterFlowSpray/pelelm_prob.H +++ b/Exec/Cases/CounterFlowSpray/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Cases/CounterFlowSpray/pelelm_prob_parm.H b/Exec/Cases/CounterFlowSpray/pelelm_prob_parm.H index 50f288c4..659814a4 100644 --- a/Exec/Cases/CounterFlowSpray/pelelm_prob_parm.H +++ b/Exec/Cases/CounterFlowSpray/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include diff --git a/Exec/Cases/DiffBunsen2D/pelelm_prob.H b/Exec/Cases/DiffBunsen2D/pelelm_prob.H index 9d538efb..999a0e00 100644 --- a/Exec/Cases/DiffBunsen2D/pelelm_prob.H +++ b/Exec/Cases/DiffBunsen2D/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Cases/DiffBunsen2D/pelelm_prob_parm.H b/Exec/Cases/DiffBunsen2D/pelelm_prob_parm.H index d4c6715f..7bb33afb 100644 --- a/Exec/Cases/DiffBunsen2D/pelelm_prob_parm.H +++ b/Exec/Cases/DiffBunsen2D/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include diff --git a/Exec/Cases/JetInCrossflow/pelelm_prob.H b/Exec/Cases/JetInCrossflow/pelelm_prob.H index 43642d25..32ce9803 100644 --- a/Exec/Cases/JetInCrossflow/pelelm_prob.H +++ b/Exec/Cases/JetInCrossflow/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Cases/JetInCrossflow/pelelm_prob_parm.H b/Exec/Cases/JetInCrossflow/pelelm_prob_parm.H index a3969866..450c66f5 100644 --- a/Exec/Cases/JetInCrossflow/pelelm_prob_parm.H +++ b/Exec/Cases/JetInCrossflow/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/Cases/NormalJet_OpenDomain/pelelm_prob.H b/Exec/Cases/NormalJet_OpenDomain/pelelm_prob.H index 2adc5eec..f8deabee 100644 --- a/Exec/Cases/NormalJet_OpenDomain/pelelm_prob.H +++ b/Exec/Cases/NormalJet_OpenDomain/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Cases/NormalJet_OpenDomain/pelelm_prob_parm.H b/Exec/Cases/NormalJet_OpenDomain/pelelm_prob_parm.H index 4befdbba..82654959 100644 --- a/Exec/Cases/NormalJet_OpenDomain/pelelm_prob_parm.H +++ b/Exec/Cases/NormalJet_OpenDomain/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/Cases/PremBunsen2D/pelelm_prob.H b/Exec/Cases/PremBunsen2D/pelelm_prob.H index fa6b07fe..a78036ed 100644 --- a/Exec/Cases/PremBunsen2D/pelelm_prob.H +++ b/Exec/Cases/PremBunsen2D/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Cases/PremBunsen2D/pelelm_prob_parm.H b/Exec/Cases/PremBunsen2D/pelelm_prob_parm.H index 2924c0b4..6cfb4164 100644 --- a/Exec/Cases/PremBunsen2D/pelelm_prob_parm.H +++ b/Exec/Cases/PremBunsen2D/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include diff --git a/Exec/Cases/PremBunsen3D/pelelm_prob.H b/Exec/Cases/PremBunsen3D/pelelm_prob.H index 29860026..785e7d99 100644 --- a/Exec/Cases/PremBunsen3D/pelelm_prob.H +++ b/Exec/Cases/PremBunsen3D/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Cases/PremBunsen3D/pelelm_prob_parm.H b/Exec/Cases/PremBunsen3D/pelelm_prob_parm.H index 965fa649..af98bc1d 100644 --- a/Exec/Cases/PremBunsen3D/pelelm_prob_parm.H +++ b/Exec/Cases/PremBunsen3D/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include diff --git a/Exec/Cases/SwirlFlowWallInteractions/pelelm_prob.H b/Exec/Cases/SwirlFlowWallInteractions/pelelm_prob.H index 11d17e06..7e275873 100644 --- a/Exec/Cases/SwirlFlowWallInteractions/pelelm_prob.H +++ b/Exec/Cases/SwirlFlowWallInteractions/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Cases/SwirlFlowWallInteractions/pelelm_prob_parm.H b/Exec/Cases/SwirlFlowWallInteractions/pelelm_prob_parm.H index d53e62ef..7e00c15d 100644 --- a/Exec/Cases/SwirlFlowWallInteractions/pelelm_prob_parm.H +++ b/Exec/Cases/SwirlFlowWallInteractions/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/Cases/TripleFlame/pelelm_prob.H b/Exec/Cases/TripleFlame/pelelm_prob.H index 221dbcc6..3262a7d0 100644 --- a/Exec/Cases/TripleFlame/pelelm_prob.H +++ b/Exec/Cases/TripleFlame/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Cases/TripleFlame/pelelm_prob_parm.H b/Exec/Cases/TripleFlame/pelelm_prob_parm.H index 43709404..5a3a2c54 100644 --- a/Exec/Cases/TripleFlame/pelelm_prob_parm.H +++ b/Exec/Cases/TripleFlame/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/Efield/FlameSheetIons/pelelm_prob.H b/Exec/Efield/FlameSheetIons/pelelm_prob.H index d61fb13b..70f4ea7f 100644 --- a/Exec/Efield/FlameSheetIons/pelelm_prob.H +++ b/Exec/Efield/FlameSheetIons/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Efield/FlameSheetIons/pelelm_prob_parm.H b/Exec/Efield/FlameSheetIons/pelelm_prob_parm.H index 88666a71..fd6050af 100644 --- a/Exec/Efield/FlameSheetIons/pelelm_prob_parm.H +++ b/Exec/Efield/FlameSheetIons/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include diff --git a/Exec/Efield/IonizedAirWave/pelelm_prob.H b/Exec/Efield/IonizedAirWave/pelelm_prob.H index 6c95b73e..f3ef736f 100644 --- a/Exec/Efield/IonizedAirWave/pelelm_prob.H +++ b/Exec/Efield/IonizedAirWave/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Efield/IonizedAirWave/pelelm_prob_parm.H b/Exec/Efield/IonizedAirWave/pelelm_prob_parm.H index 88666a71..fd6050af 100644 --- a/Exec/Efield/IonizedAirWave/pelelm_prob_parm.H +++ b/Exec/Efield/IonizedAirWave/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include diff --git a/Exec/Efield/PremBunsen3DKuhl/pelelm_prob.H b/Exec/Efield/PremBunsen3DKuhl/pelelm_prob.H index ca0060db..a0cc8b2b 100644 --- a/Exec/Efield/PremBunsen3DKuhl/pelelm_prob.H +++ b/Exec/Efield/PremBunsen3DKuhl/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/Efield/PremBunsen3DKuhl/pelelm_prob_parm.H b/Exec/Efield/PremBunsen3DKuhl/pelelm_prob_parm.H index 2f4ce1c7..7c9000fa 100644 --- a/Exec/Efield/PremBunsen3DKuhl/pelelm_prob_parm.H +++ b/Exec/Efield/PremBunsen3DKuhl/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include diff --git a/Exec/RegTests/EB_BackwardStepFlame/EBUserDefined.H b/Exec/RegTests/EB_BackwardStepFlame/EBUserDefined.H index a2fca369..866dc66d 100644 --- a/Exec/RegTests/EB_BackwardStepFlame/EBUserDefined.H +++ b/Exec/RegTests/EB_BackwardStepFlame/EBUserDefined.H @@ -1,5 +1,5 @@ -#ifndef _EBUSERDEFINED_H_ -#define _EBUSERDEFINED_H_ +#ifndef EBUSERDEFINED_H +#define EBUSERDEFINED_H using namespace amrex; diff --git a/Exec/RegTests/EB_BackwardStepFlame/pelelm_prob.H b/Exec/RegTests/EB_BackwardStepFlame/pelelm_prob.H index 05c1ec54..99044953 100644 --- a/Exec/RegTests/EB_BackwardStepFlame/pelelm_prob.H +++ b/Exec/RegTests/EB_BackwardStepFlame/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/EB_BackwardStepFlame/pelelm_prob_parm.H b/Exec/RegTests/EB_BackwardStepFlame/pelelm_prob_parm.H index cba3f209..d1fe830f 100644 --- a/Exec/RegTests/EB_BackwardStepFlame/pelelm_prob_parm.H +++ b/Exec/RegTests/EB_BackwardStepFlame/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include diff --git a/Exec/RegTests/EB_EnclosedFlame/pelelm_prob.H b/Exec/RegTests/EB_EnclosedFlame/pelelm_prob.H index ba4fde6d..d0b2391d 100644 --- a/Exec/RegTests/EB_EnclosedFlame/pelelm_prob.H +++ b/Exec/RegTests/EB_EnclosedFlame/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/EB_EnclosedFlame/pelelm_prob_parm.H b/Exec/RegTests/EB_EnclosedFlame/pelelm_prob_parm.H index 9c8cc16d..e273418e 100644 --- a/Exec/RegTests/EB_EnclosedFlame/pelelm_prob_parm.H +++ b/Exec/RegTests/EB_EnclosedFlame/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/RegTests/EB_EnclosedVortex/pelelm_prob.H b/Exec/RegTests/EB_EnclosedVortex/pelelm_prob.H index 24f143b0..fc405ff3 100644 --- a/Exec/RegTests/EB_EnclosedVortex/pelelm_prob.H +++ b/Exec/RegTests/EB_EnclosedVortex/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/EB_EnclosedVortex/pelelm_prob_parm.H b/Exec/RegTests/EB_EnclosedVortex/pelelm_prob_parm.H index 5ff12eb0..1900d8da 100644 --- a/Exec/RegTests/EB_EnclosedVortex/pelelm_prob_parm.H +++ b/Exec/RegTests/EB_EnclosedVortex/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/RegTests/EB_FlowPastCylinder/EBUserDefined.H b/Exec/RegTests/EB_FlowPastCylinder/EBUserDefined.H index 8591acc0..5f6b9994 100644 --- a/Exec/RegTests/EB_FlowPastCylinder/EBUserDefined.H +++ b/Exec/RegTests/EB_FlowPastCylinder/EBUserDefined.H @@ -1,5 +1,5 @@ -#ifndef _EBUSERDEFINED_H_ -#define _EBUSERDEFINED_H_ +#ifndef EBUSERDEFINED_H +#define EBUSERDEFINED_H using namespace amrex; diff --git a/Exec/RegTests/EB_FlowPastCylinder/pelelm_prob.H b/Exec/RegTests/EB_FlowPastCylinder/pelelm_prob.H index 45217b03..57bfecfe 100644 --- a/Exec/RegTests/EB_FlowPastCylinder/pelelm_prob.H +++ b/Exec/RegTests/EB_FlowPastCylinder/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/EB_FlowPastCylinder/pelelm_prob_parm.H b/Exec/RegTests/EB_FlowPastCylinder/pelelm_prob_parm.H index 48c1b82e..2c4476f1 100644 --- a/Exec/RegTests/EB_FlowPastCylinder/pelelm_prob_parm.H +++ b/Exec/RegTests/EB_FlowPastCylinder/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/RegTests/EB_PipeFlow/EBUserDefined.H b/Exec/RegTests/EB_PipeFlow/EBUserDefined.H index 35635317..d7ce0a46 100644 --- a/Exec/RegTests/EB_PipeFlow/EBUserDefined.H +++ b/Exec/RegTests/EB_PipeFlow/EBUserDefined.H @@ -1,5 +1,5 @@ -#ifndef _EBUSERDEFINED_H_ -#define _EBUSERDEFINED_H_ +#ifndef EBUSERDEFINED_H +#define EBUSERDEFINED_H using namespace amrex; diff --git a/Exec/RegTests/EB_PipeFlow/pelelm_prob.H b/Exec/RegTests/EB_PipeFlow/pelelm_prob.H index bcc0bf88..d1626130 100644 --- a/Exec/RegTests/EB_PipeFlow/pelelm_prob.H +++ b/Exec/RegTests/EB_PipeFlow/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/EB_PipeFlow/pelelm_prob_parm.H b/Exec/RegTests/EB_PipeFlow/pelelm_prob_parm.H index 688085e4..0533cafb 100644 --- a/Exec/RegTests/EB_PipeFlow/pelelm_prob_parm.H +++ b/Exec/RegTests/EB_PipeFlow/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/RegTests/EnclosedFlame/pelelm_prob.H b/Exec/RegTests/EnclosedFlame/pelelm_prob.H index 88ff6a8d..1b137e48 100644 --- a/Exec/RegTests/EnclosedFlame/pelelm_prob.H +++ b/Exec/RegTests/EnclosedFlame/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/EnclosedFlame/pelelm_prob_parm.H b/Exec/RegTests/EnclosedFlame/pelelm_prob_parm.H index a8045518..b8cd2f03 100644 --- a/Exec/RegTests/EnclosedFlame/pelelm_prob_parm.H +++ b/Exec/RegTests/EnclosedFlame/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/RegTests/EnclosedInjection/pelelm_prob.H b/Exec/RegTests/EnclosedInjection/pelelm_prob.H index eeee084b..ad290345 100644 --- a/Exec/RegTests/EnclosedInjection/pelelm_prob.H +++ b/Exec/RegTests/EnclosedInjection/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/EnclosedInjection/pelelm_prob_parm.H b/Exec/RegTests/EnclosedInjection/pelelm_prob_parm.H index 286234c3..0927b8d9 100644 --- a/Exec/RegTests/EnclosedInjection/pelelm_prob_parm.H +++ b/Exec/RegTests/EnclosedInjection/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include diff --git a/Exec/RegTests/FlameSheet/pelelm_prob.H b/Exec/RegTests/FlameSheet/pelelm_prob.H index eefd4a96..3f45ec18 100644 --- a/Exec/RegTests/FlameSheet/pelelm_prob.H +++ b/Exec/RegTests/FlameSheet/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/FlameSheet/pelelm_prob_parm.H b/Exec/RegTests/FlameSheet/pelelm_prob_parm.H index 219c9483..906b3d8e 100644 --- a/Exec/RegTests/FlameSheet/pelelm_prob_parm.H +++ b/Exec/RegTests/FlameSheet/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/RegTests/HITDecay/pelelm_prob.H b/Exec/RegTests/HITDecay/pelelm_prob.H index 9b1e2c80..eba2e0e0 100644 --- a/Exec/RegTests/HITDecay/pelelm_prob.H +++ b/Exec/RegTests/HITDecay/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/HITDecay/pelelm_prob_parm.H b/Exec/RegTests/HITDecay/pelelm_prob_parm.H index a809a4a4..333e7f40 100644 --- a/Exec/RegTests/HITDecay/pelelm_prob_parm.H +++ b/Exec/RegTests/HITDecay/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/RegTests/HotBubble/pelelm_prob.H b/Exec/RegTests/HotBubble/pelelm_prob.H index 398a2fba..40e01d94 100644 --- a/Exec/RegTests/HotBubble/pelelm_prob.H +++ b/Exec/RegTests/HotBubble/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/HotBubble/pelelm_prob_parm.H b/Exec/RegTests/HotBubble/pelelm_prob_parm.H index 6bbcc78f..23dff0f8 100644 --- a/Exec/RegTests/HotBubble/pelelm_prob_parm.H +++ b/Exec/RegTests/HotBubble/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include diff --git a/Exec/RegTests/PeriodicCases/pelelm_prob.H b/Exec/RegTests/PeriodicCases/pelelm_prob.H index d0d90d3f..38825fe5 100644 --- a/Exec/RegTests/PeriodicCases/pelelm_prob.H +++ b/Exec/RegTests/PeriodicCases/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/PeriodicCases/pelelm_prob_parm.H b/Exec/RegTests/PeriodicCases/pelelm_prob_parm.H index 2403700c..7e686981 100644 --- a/Exec/RegTests/PeriodicCases/pelelm_prob_parm.H +++ b/Exec/RegTests/PeriodicCases/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/RegTests/SprayTest/pelelm_prob.H b/Exec/RegTests/SprayTest/pelelm_prob.H index dac4d38d..34a4e9af 100644 --- a/Exec/RegTests/SprayTest/pelelm_prob.H +++ b/Exec/RegTests/SprayTest/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/SprayTest/pelelm_prob_parm.H b/Exec/RegTests/SprayTest/pelelm_prob_parm.H index 24c9928c..abe4e5e9 100644 --- a/Exec/RegTests/SprayTest/pelelm_prob_parm.H +++ b/Exec/RegTests/SprayTest/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/RegTests/TaylorGreen/pelelm_prob.H b/Exec/RegTests/TaylorGreen/pelelm_prob.H index 10b4c8f6..e16c3d2e 100644 --- a/Exec/RegTests/TaylorGreen/pelelm_prob.H +++ b/Exec/RegTests/TaylorGreen/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/TaylorGreen/pelelm_prob_parm.H b/Exec/RegTests/TaylorGreen/pelelm_prob_parm.H index 5b992598..db0fc782 100644 --- a/Exec/RegTests/TaylorGreen/pelelm_prob_parm.H +++ b/Exec/RegTests/TaylorGreen/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/RegTests/TripleFlame/pelelm_prob.H b/Exec/RegTests/TripleFlame/pelelm_prob.H index 8a307509..4d484f75 100644 --- a/Exec/RegTests/TripleFlame/pelelm_prob.H +++ b/Exec/RegTests/TripleFlame/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include "PeleLM_Index.H" #include "pelelm_prob_parm.H" diff --git a/Exec/RegTests/TripleFlame/pelelm_prob_parm.H b/Exec/RegTests/TripleFlame/pelelm_prob_parm.H index 3abe4cc8..030a6fd9 100644 --- a/Exec/RegTests/TripleFlame/pelelm_prob_parm.H +++ b/Exec/RegTests/TripleFlame/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/RegTests/TurbInflow/TurbFileHIT/HITData.H b/Exec/RegTests/TurbInflow/TurbFileHIT/HITData.H index 1eaf839a..73857782 100644 --- a/Exec/RegTests/TurbInflow/TurbFileHIT/HITData.H +++ b/Exec/RegTests/TurbInflow/TurbFileHIT/HITData.H @@ -1,5 +1,5 @@ -#ifndef HITDATA_H_ -#define HITDATA_H_ +#ifndef HITDATA_H +#define HITDATA_H #include #include diff --git a/Exec/RegTests/TurbInflow/TurbFileHIT/Utilities.H b/Exec/RegTests/TurbInflow/TurbFileHIT/Utilities.H index db814561..1306fc86 100644 --- a/Exec/RegTests/TurbInflow/TurbFileHIT/Utilities.H +++ b/Exec/RegTests/TurbInflow/TurbFileHIT/Utilities.H @@ -1,5 +1,5 @@ -#ifndef _UTILITIES_H_ -#define _UTILITIES_H_ +#ifndef _UTILITIES_H +#define _UTILITIES_H #include diff --git a/Exec/RegTests/TurbInflow/TurbFileHIT/main_K.H b/Exec/RegTests/TurbInflow/TurbFileHIT/main_K.H index 46eba7dc..3a8ff369 100644 --- a/Exec/RegTests/TurbInflow/TurbFileHIT/main_K.H +++ b/Exec/RegTests/TurbInflow/TurbFileHIT/main_K.H @@ -1,5 +1,5 @@ -#ifndef MAIN_K_H_ -#define MAIN_K_H_ +#ifndef MAIN_K_H +#define MAIN_K_H #include #include diff --git a/Exec/RegTests/TurbInflow/pelelm_prob.H b/Exec/RegTests/TurbInflow/pelelm_prob.H index 6fe10810..e40eb8ca 100644 --- a/Exec/RegTests/TurbInflow/pelelm_prob.H +++ b/Exec/RegTests/TurbInflow/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/TurbInflow/pelelm_prob_parm.H b/Exec/RegTests/TurbInflow/pelelm_prob_parm.H index 9d050612..11c250a4 100644 --- a/Exec/RegTests/TurbInflow/pelelm_prob_parm.H +++ b/Exec/RegTests/TurbInflow/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/RegTests/Unit/pelelm_prob.H b/Exec/RegTests/Unit/pelelm_prob.H index 0c1afd4c..7407ab4b 100644 --- a/Exec/RegTests/Unit/pelelm_prob.H +++ b/Exec/RegTests/Unit/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/RegTests/Unit/pelelm_prob_parm.H b/Exec/RegTests/Unit/pelelm_prob_parm.H index 29ba6201..cd788954 100644 --- a/Exec/RegTests/Unit/pelelm_prob_parm.H +++ b/Exec/RegTests/Unit/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include diff --git a/Exec/UnitTests/DodecaneLu/pelelm_prob.H b/Exec/UnitTests/DodecaneLu/pelelm_prob.H index 19b9e96e..ca0b2858 100644 --- a/Exec/UnitTests/DodecaneLu/pelelm_prob.H +++ b/Exec/UnitTests/DodecaneLu/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/UnitTests/DodecaneLu/pelelm_prob_parm.H b/Exec/UnitTests/DodecaneLu/pelelm_prob_parm.H index a8045518..b8cd2f03 100644 --- a/Exec/UnitTests/DodecaneLu/pelelm_prob_parm.H +++ b/Exec/UnitTests/DodecaneLu/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Exec/UnitTests/EB_SphericalFlame/pelelm_prob.H b/Exec/UnitTests/EB_SphericalFlame/pelelm_prob.H index 9a57a5c4..f8e2b90a 100644 --- a/Exec/UnitTests/EB_SphericalFlame/pelelm_prob.H +++ b/Exec/UnitTests/EB_SphericalFlame/pelelm_prob.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_H_ -#define PELELM_PROB_H_ +#ifndef PELELM_PROB_H +#define PELELM_PROB_H #include #include diff --git a/Exec/UnitTests/EB_SphericalFlame/pelelm_prob_parm.H b/Exec/UnitTests/EB_SphericalFlame/pelelm_prob_parm.H index 9c8cc16d..e273418e 100644 --- a/Exec/UnitTests/EB_SphericalFlame/pelelm_prob_parm.H +++ b/Exec/UnitTests/EB_SphericalFlame/pelelm_prob_parm.H @@ -1,5 +1,5 @@ -#ifndef PELELM_PROB_PARM_H_ -#define PELELM_PROB_PARM_H_ +#ifndef PELELM_PROB_PARM_H +#define PELELM_PROB_PARM_H #include #include diff --git a/Source/DiffusionOp.H b/Source/DiffusionOp.H index 969c1456..75b74314 100644 --- a/Source/DiffusionOp.H +++ b/Source/DiffusionOp.H @@ -1,5 +1,5 @@ -#ifndef DIFFUSION_OP_H_ -#define DIFFUSION_OP_H_ +#ifndef DIFFUSION_OP_H +#define DIFFUSION_OP_H #include #include diff --git a/Source/DiffusionOp.cpp b/Source/DiffusionOp.cpp index 2122c9a9..92c551cf 100644 --- a/Source/DiffusionOp.cpp +++ b/Source/DiffusionOp.cpp @@ -702,8 +702,9 @@ DiffusionOp::computeDiffFluxes( } // Average down if requested - if (do_avgDown) + if (do_avgDown) { avgDownFluxes(a_flux, flux_comp, ncomp); + } } #ifdef AMREX_USE_EB @@ -884,8 +885,9 @@ DiffusionOp::computeGradient( #else mlmg.getFluxes(a_grad, GetVecOfPtrs(phi), MLMG::Location::FaceCenter); #endif - if (do_avgDown) + if (do_avgDown) { avgDownFluxes(a_grad, 0, 1); + } } void diff --git a/Source/EBUserDefined.H b/Source/EBUserDefined.H index 31e9b9e5..18ce0863 100644 --- a/Source/EBUserDefined.H +++ b/Source/EBUserDefined.H @@ -1,5 +1,5 @@ -#ifndef _EBUSERDEFINED_H_ -#define _EBUSERDEFINED_H_ +#ifndef EBUSERDEFINED_H +#define EBUSERDEFINED_H using namespace amrex; diff --git a/Source/Efield/EOS_Extension.H b/Source/Efield/EOS_Extension.H index c1194236..9da0198a 100644 --- a/Source/Efield/EOS_Extension.H +++ b/Source/Efield/EOS_Extension.H @@ -1,5 +1,5 @@ -#ifndef _EOS_EXT_H_ -#define _EOS_EXT_H_ +#ifndef _EOS_EXT_H +#define _EOS_EXT_H #include #include diff --git a/Source/Efield/GMRES/MLGMRES.H b/Source/Efield/GMRES/MLGMRES.H index 5d818989..b48352cd 100644 --- a/Source/Efield/GMRES/MLGMRES.H +++ b/Source/Efield/GMRES/MLGMRES.H @@ -1,5 +1,5 @@ -#ifndef MLGMRES_H_ -#define MLGMRES_H_ +#ifndef MLGMRES_H +#define MLGMRES_H #include #include #include diff --git a/Source/Efield/LinOps/AMReX_MLABecCecLap_1D_K.H b/Source/Efield/LinOps/AMReX_MLABecCecLap_1D_K.H index fc08d703..1864ac27 100644 --- a/Source/Efield/LinOps/AMReX_MLABecCecLap_1D_K.H +++ b/Source/Efield/LinOps/AMReX_MLABecCecLap_1D_K.H @@ -1,5 +1,5 @@ -#ifndef AMREX_MLABECCECLAP_1D_K_H_ -#define AMREX_MLABECCECLAP_1D_K_H_ +#ifndef AMREX_MLABECCECLAP_1D_K_H +#define AMREX_MLABECCECLAP_1D_K_H namespace amrex { diff --git a/Source/Efield/LinOps/AMReX_MLABecCecLap_2D_K.H b/Source/Efield/LinOps/AMReX_MLABecCecLap_2D_K.H index 3859d2fe..2af77cdf 100644 --- a/Source/Efield/LinOps/AMReX_MLABecCecLap_2D_K.H +++ b/Source/Efield/LinOps/AMReX_MLABecCecLap_2D_K.H @@ -1,5 +1,5 @@ -#ifndef AMREX_MLABECCECLAP_2D_K_H_ -#define AMREX_MLABECCECLAP_2D_K_H_ +#ifndef AMREX_MLABECCECLAP_2D_K_H +#define AMREX_MLABECCECLAP_2D_K_H namespace amrex { diff --git a/Source/Efield/LinOps/AMReX_MLABecCecLap_3D_K.H b/Source/Efield/LinOps/AMReX_MLABecCecLap_3D_K.H index d4763ffa..c17c0a48 100644 --- a/Source/Efield/LinOps/AMReX_MLABecCecLap_3D_K.H +++ b/Source/Efield/LinOps/AMReX_MLABecCecLap_3D_K.H @@ -1,5 +1,5 @@ -#ifndef AMREX_MLABECCECLAP_3D_K_H_ -#define AMREX_MLABECCECLAP_3D_K_H_ +#ifndef AMREX_MLABECCECLAP_3D_K_H +#define AMREX_MLABECCECLAP_3D_K_H namespace amrex { diff --git a/Source/Efield/LinOps/AMReX_MLABecCecLap_K.H b/Source/Efield/LinOps/AMReX_MLABecCecLap_K.H index dbf76f3c..b8be7a81 100644 --- a/Source/Efield/LinOps/AMReX_MLABecCecLap_K.H +++ b/Source/Efield/LinOps/AMReX_MLABecCecLap_K.H @@ -1,5 +1,5 @@ -#ifndef AMREX_MLABECCECLAP_K_H_ -#define AMREX_MLABECCECLAP_K_H_ +#ifndef AMREX_MLABECCECLAP_K_H +#define AMREX_MLABECCECLAP_K_H #include diff --git a/Source/Efield/LinOps/AMReX_MLABecCecLaplacian.H b/Source/Efield/LinOps/AMReX_MLABecCecLaplacian.H index 9ed5c321..96010a08 100644 --- a/Source/Efield/LinOps/AMReX_MLABecCecLaplacian.H +++ b/Source/Efield/LinOps/AMReX_MLABecCecLaplacian.H @@ -1,5 +1,5 @@ -#ifndef AMREX_ML_ABECCECLAPLACIAN_H_ -#define AMREX_ML_ABECCECLAPLACIAN_H_ +#ifndef AMREX_ML_ABECCECLAPLACIAN_H +#define AMREX_ML_ABECCECLAPLACIAN_H #include #include diff --git a/Source/Efield/LinOps/AMReX_MLCellABecCecLap.H b/Source/Efield/LinOps/AMReX_MLCellABecCecLap.H index 8c9d1157..84490d0d 100644 --- a/Source/Efield/LinOps/AMReX_MLCellABecCecLap.H +++ b/Source/Efield/LinOps/AMReX_MLCellABecCecLap.H @@ -1,5 +1,5 @@ -#ifndef AMREX_ML_CELL_ABECCECLAP_H_ -#define AMREX_ML_CELL_ABECCECLAP_H_ +#ifndef AMREX_ML_CELL_ABECCECLAP_H +#define AMREX_ML_CELL_ABECCECLAP_H #include #include diff --git a/Source/Efield/LinOps/AMReX_MLCellABecCecLap_1D_K.H b/Source/Efield/LinOps/AMReX_MLCellABecCecLap_1D_K.H index aa16f4fd..9e6adc45 100644 --- a/Source/Efield/LinOps/AMReX_MLCellABecCecLap_1D_K.H +++ b/Source/Efield/LinOps/AMReX_MLCellABecCecLap_1D_K.H @@ -1,5 +1,5 @@ -#ifndef AMREX_MLCELLABECCECLAP_1D_K_H_ -#define AMREX_MLCELLABECCECLAP_1D_K_H_ +#ifndef AMREX_MLCELLABECCECLAP_1D_K_H +#define AMREX_MLCELLABECCECLAP_1D_K_H #include namespace amrex { diff --git a/Source/Efield/LinOps/AMReX_MLCellABecCecLap_2D_K.H b/Source/Efield/LinOps/AMReX_MLCellABecCecLap_2D_K.H index 5f2e55c9..bccc911f 100644 --- a/Source/Efield/LinOps/AMReX_MLCellABecCecLap_2D_K.H +++ b/Source/Efield/LinOps/AMReX_MLCellABecCecLap_2D_K.H @@ -1,5 +1,5 @@ -#ifndef AMREX_MLCELLABECCECLAP_2D_K_H_ -#define AMREX_MLCELLABECCECLAP_2D_K_H_ +#ifndef AMREX_MLCELLABECCECLAP_2D_K_H +#define AMREX_MLCELLABECCECLAP_2D_K_H #include namespace amrex { diff --git a/Source/Efield/LinOps/AMReX_MLCellABecCecLap_3D_K.H b/Source/Efield/LinOps/AMReX_MLCellABecCecLap_3D_K.H index a7ad98ee..2b029dd1 100644 --- a/Source/Efield/LinOps/AMReX_MLCellABecCecLap_3D_K.H +++ b/Source/Efield/LinOps/AMReX_MLCellABecCecLap_3D_K.H @@ -1,5 +1,5 @@ -#ifndef AMREX_MLCELLABECCECLAP_3D_K_H_ -#define AMREX_MLCELLABECCECLAP_3D_K_H_ +#ifndef AMREX_MLCELLABECCECLAP_3D_K_H +#define AMREX_MLCELLABECCECLAP_3D_K_H #include namespace amrex { diff --git a/Source/Efield/LinOps/AMReX_MLCellABecCecLap_K.H b/Source/Efield/LinOps/AMReX_MLCellABecCecLap_K.H index 57102c46..8b6bf68b 100644 --- a/Source/Efield/LinOps/AMReX_MLCellABecCecLap_K.H +++ b/Source/Efield/LinOps/AMReX_MLCellABecCecLap_K.H @@ -1,5 +1,5 @@ -#ifndef AMREX_MLCELLABECCECLAP_K_H_ -#define AMREX_MLCELLABECCECLAP_K_H_ +#ifndef AMREX_MLCELLABECCECLAP_K_H +#define AMREX_MLCELLABECCECLAP_K_H #include #include diff --git a/Source/Efield/LinOps/PrecondOp.H b/Source/Efield/LinOps/PrecondOp.H index baee3249..ec635c0d 100644 --- a/Source/Efield/LinOps/PrecondOp.H +++ b/Source/Efield/LinOps/PrecondOp.H @@ -1,5 +1,5 @@ -#ifndef PRECOND_OP_H_ -#define PRECOND_OP_H_ +#ifndef PRECOND_OP_H +#define PRECOND_OP_H #include #include diff --git a/Source/Efield/PeleLMEFDeriveFunc.H b/Source/Efield/PeleLMEFDeriveFunc.H index bc429ac9..50b1abee 100644 --- a/Source/Efield/PeleLMEFDeriveFunc.H +++ b/Source/Efield/PeleLMEFDeriveFunc.H @@ -1,5 +1,5 @@ -#ifndef PELELMEF_DERIVEFUNC_H_ -#define PELELMEF_DERIVEFUNC_H_ +#ifndef PELELMEF_DERIVEFUNC_H +#define PELELMEF_DERIVEFUNC_H #include #include diff --git a/Source/Efield/PeleLMEF_Constants.H b/Source/Efield/PeleLMEF_Constants.H index d6e7302e..9ee41cfb 100644 --- a/Source/Efield/PeleLMEF_Constants.H +++ b/Source/Efield/PeleLMEF_Constants.H @@ -1,5 +1,5 @@ -#ifndef PeleLMEF_Constants_H_ -#define PeleLMEF_Constants_H_ +#ifndef PeleLMEF_Constants_H +#define PeleLMEF_Constants_H #include #include diff --git a/Source/Efield/PeleLMEF_K.H b/Source/Efield/PeleLMEF_K.H index 36604ae8..0f709f9f 100644 --- a/Source/Efield/PeleLMEF_K.H +++ b/Source/Efield/PeleLMEF_K.H @@ -1,5 +1,5 @@ -#ifndef PeleLMEF_K_H_ -#define PeleLMEF_K_H_ +#ifndef PeleLMEF_K_H +#define PeleLMEF_K_H #include #include diff --git a/Source/PeleLM.H b/Source/PeleLM.H index 7ae788fd..5ad58745 100644 --- a/Source/PeleLM.H +++ b/Source/PeleLM.H @@ -1,5 +1,5 @@ -#ifndef _PeleLM_H_ -#define _PeleLM_H_ +#ifndef PeleLM_H +#define PeleLM_H // PeleLMeX includes #include "PeleLMUserKeys.H" @@ -53,7 +53,7 @@ public: PeleLM(); // destructor - virtual ~PeleLM(); + ~PeleLM() override; // Setup function void Setup(); @@ -72,31 +72,30 @@ public: //----------------------------------------------------------------------------- // Virtual AmrCore functions - virtual void - regrid(int lbase, amrex::Real time, bool initial = false) override; + void regrid(int lbase, amrex::Real time, bool initial = false) override; - virtual void MakeNewLevelFromScratch( + void MakeNewLevelFromScratch( int lev, amrex::Real time, const amrex::BoxArray& ba, const amrex::DistributionMapping& dm) override; - virtual void ErrorEst( + void ErrorEst( int lev, amrex::TagBoxArray& tags, amrex::Real time, int ng) override; - virtual void MakeNewLevelFromCoarse( + void MakeNewLevelFromCoarse( int lev, amrex::Real time, const amrex::BoxArray& ba, const amrex::DistributionMapping& dm) override; - virtual void RemakeLevel( + void RemakeLevel( int lev, amrex::Real time, const amrex::BoxArray& ba, const amrex::DistributionMapping& dm) override; - virtual void ClearLevel(int lev) override; + void ClearLevel(int lev) override; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- @@ -1731,8 +1730,8 @@ public: int m_verbose = 0; // IO options - std::string m_restart_chkfile{""}; - std::string m_restart_pltfile{""}; + std::string m_restart_chkfile; + std::string m_restart_pltfile; std::string pltfileSource{"LM"}; std::string m_plot_file{"plt"}; std::string m_check_file{"chk"}; diff --git a/Source/PeleLM.cpp b/Source/PeleLM.cpp index 69fece0b..df480629 100644 --- a/Source/PeleLM.cpp +++ b/Source/PeleLM.cpp @@ -281,8 +281,8 @@ PeleLM::averageDownState(const PeleLM::TimeStamp& a_time) { int nCompState = (m_incompressible) ? AMREX_SPACEDIM : NVAR; for (int lev = finest_level; lev > 0; --lev) { - auto ldataFine_p = getLevelDataPtr(lev, a_time); - auto ldataCrse_p = getLevelDataPtr(lev - 1, a_time); + auto* ldataFine_p = getLevelDataPtr(lev, a_time); + auto* ldataCrse_p = getLevelDataPtr(lev - 1, a_time); #ifdef AMREX_USE_EB EB_average_down( ldataFine_p->state, ldataCrse_p->state, 0, nCompState, refRatio(lev - 1)); @@ -301,8 +301,8 @@ PeleLM::averageDownScalars(const PeleLM::TimeStamp& a_time) nScal += 2; // rhoRT, nE #endif for (int lev = finest_level; lev > 0; --lev) { - auto ldataFine_p = getLevelDataPtr(lev, a_time); - auto ldataCrse_p = getLevelDataPtr(lev - 1, a_time); + auto* ldataFine_p = getLevelDataPtr(lev, a_time); + auto* ldataCrse_p = getLevelDataPtr(lev - 1, a_time); #ifdef AMREX_USE_EB EB_average_down( ldataFine_p->state, ldataCrse_p->state, DENSITY, nScal, @@ -320,8 +320,8 @@ PeleLM::averageDown( const PeleLM::TimeStamp& a_time, const int state_comp, const int ncomp) { for (int lev = finest_level; lev > 0; --lev) { - auto ldataFine_p = getLevelDataPtr(lev, a_time); - auto ldataCrse_p = getLevelDataPtr(lev - 1, a_time); + auto* ldataFine_p = getLevelDataPtr(lev, a_time); + auto* ldataCrse_p = getLevelDataPtr(lev - 1, a_time); #ifdef AMREX_USE_EB EB_average_down( ldataFine_p->state, ldataCrse_p->state, state_comp, ncomp, @@ -338,8 +338,8 @@ void PeleLM::averageDownVelocity(const PeleLM::TimeStamp& a_time) { for (int lev = finest_level; lev > 0; --lev) { - auto ldataFine_p = getLevelDataPtr(lev, a_time); - auto ldataCrse_p = getLevelDataPtr(lev - 1, a_time); + auto* ldataFine_p = getLevelDataPtr(lev, a_time); + auto* ldataCrse_p = getLevelDataPtr(lev - 1, a_time); #ifdef AMREX_USE_EB EB_average_down( ldataFine_p->state, ldataCrse_p->state, VELX, AMREX_SPACEDIM, @@ -356,8 +356,8 @@ void PeleLM::averageDownReaction() { for (int lev = finest_level; lev > 0; --lev) { - auto ldataRFine_p = getLevelDataReactPtr(lev); - auto ldataRCrse_p = getLevelDataReactPtr(lev - 1); + auto* ldataRFine_p = getLevelDataReactPtr(lev); + auto* ldataRCrse_p = getLevelDataReactPtr(lev - 1); #ifdef AMREX_USE_EB EB_average_down( ldataRFine_p->I_R, ldataRCrse_p->I_R, 0, nCompIR(), refRatio(lev - 1)); diff --git a/Source/PeleLMAdvance.cpp b/Source/PeleLMAdvance.cpp index a6c2dbe6..7587202d 100644 --- a/Source/PeleLMAdvance.cpp +++ b/Source/PeleLMAdvance.cpp @@ -207,8 +207,9 @@ PeleLM::Advance(int is_initIter) VelAdvStart = ParallelDescriptor::second(); } // Re-evaluate viscosity only if scalar updated - if (!m_incompressible) + if (!m_incompressible) { calcViscosity(AmrNewTime); + } // Compute t^{n+1/2} velocity advection term computeVelocityAdvTerm(advData); diff --git a/Source/PeleLMAdvection.cpp b/Source/PeleLMAdvection.cpp index 930da71f..ab6f23ad 100644 --- a/Source/PeleLMAdvection.cpp +++ b/Source/PeleLMAdvection.cpp @@ -51,7 +51,7 @@ PeleLM::computeVelocityAdvTerm(std::unique_ptr& advData) auto AdvTypeVel_d = convertToDeviceVector(AdvTypeVel); for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldata_p = getLevelDataPtr(lev, AmrOldTime); //---------------------------------------------------------------- // Get divU @@ -205,8 +205,8 @@ PeleLM::updateVelocity(std::unique_ptr& advData) for (int lev = 0; lev <= finest_level; ++lev) { // Get both old and new level_data - auto ldataOld_p = getLevelDataPtr(lev, AmrOldTime); - auto ldataNew_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldataOld_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldataNew_p = getLevelDataPtr(lev, AmrNewTime); //---------------------------------------------------------------- // Compute provisional new velocity @@ -243,8 +243,8 @@ PeleLM::getScalarAdvForce( for (int lev = 0; lev <= finest_level; ++lev) { // Get t^{n} data pointer - auto ldata_p = getLevelDataPtr(lev, AmrOldTime); - auto ldataR_p = getLevelDataReactPtr(lev); + auto* ldata_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldataR_p = getLevelDataReactPtr(lev); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) @@ -317,7 +317,7 @@ PeleLM::computeScalarAdvTerms(std::unique_ptr& advData) for (int lev = 0; lev <= finest_level; ++lev) { // Get level data ptr Old - auto ldata_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldata_p = getLevelDataPtr(lev, AmrOldTime); // Define edge state: Density + Species + RhoH + Temp int nGrow = 0; @@ -639,12 +639,15 @@ PeleLM::computeScalarAdvTerms(std::unique_ptr& advData) // If balances are required, compute face domain integrals // using level 0 since we've averaged down the fluxes already if (m_sdcIter == m_nSDCmax) { - if (m_do_massBalance) + if (m_do_massBalance) { addMassFluxes(GetArrOfConstPtrs(fluxes[0]), geom[0]); - if (m_do_energyBalance) + } + if (m_do_energyBalance) { addRhoHFluxes(GetArrOfConstPtrs(fluxes[0]), geom[0]); - if (m_do_speciesBalance) + } + if (m_do_speciesBalance) { addRhoYFluxes(GetArrOfConstPtrs(fluxes[0]), geom[0]); + } } // Compute face domain integral for U at every SDC iteration addUmacFluxes(advData, geom[0]); @@ -792,7 +795,7 @@ PeleLM::computePassiveAdvTerms( // Loop over levels and get the fluxes for (int lev = 0; lev <= finest_level; ++lev) { // Get level data ptr Old - auto ldata_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldata_p = getLevelDataPtr(lev, AmrOldTime); //---------------------------------------------------------------- // Get divU @@ -923,8 +926,8 @@ PeleLM::updateScalarComp( for (int lev = 0; lev <= finest_level; ++lev) { // Get level data ptr - auto ldataOld_p = getLevelDataPtr(lev, AmrOldTime); - auto ldataNew_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldataOld_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldataNew_p = getLevelDataPtr(lev, AmrNewTime); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) #endif diff --git a/Source/PeleLMBC.cpp b/Source/PeleLMBC.cpp index e8c89124..f1482636 100644 --- a/Source/PeleLMBC.cpp +++ b/Source/PeleLMBC.cpp @@ -224,7 +224,7 @@ PeleLM::fillPatchState(int lev, const TimeStamp& a_time) { BL_PROFILE("PeleLMeX::fillPatchStateLev()"); - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); Real time = getTime(lev, a_time); fillpatch_state(lev, time, ldata_p->state, m_nGrowState); @@ -241,7 +241,7 @@ PeleLM::fillPatchDensity(const TimeStamp& a_time) { BL_PROFILE("PeleLMeX::fillPatchDensity()"); for (int lev = 0; lev <= finest_level; lev++) { - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); Real time = getTime(lev, a_time); fillpatch_density(lev, time, ldata_p->state, DENSITY, m_nGrowState); } @@ -252,7 +252,7 @@ PeleLM::fillPatchSpecies(const TimeStamp& a_time) { BL_PROFILE("PeleLMeX::fillPatchSpecies()"); for (int lev = 0; lev <= finest_level; lev++) { - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); Real time = getTime(lev, a_time); fillpatch_species(lev, time, ldata_p->state, FIRSTSPEC, m_nGrowState); } @@ -263,7 +263,7 @@ PeleLM::fillPatchTemp(const TimeStamp& a_time) { BL_PROFILE("PeleLMeX::fillPatchTemp()"); for (int lev = 0; lev <= finest_level; lev++) { - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); Real time = getTime(lev, a_time); fillpatch_temp(lev, time, ldata_p->state, TEMP, m_nGrowState); } @@ -899,8 +899,9 @@ PeleLM::fillTurbInflow( // Create box with ghost cells and set them to zero amrex::IntVect growVect(amrex::IntVect::TheUnitVector()); int Grow = 4; // Being conservative - for (int n = 0; n < AMREX_SPACEDIM; n++) + for (int n = 0; n < AMREX_SPACEDIM; n++) { growVect[n] = Grow; + } growVect[dir] = 0; amrex::Box modDom = geom[lev].Domain(); modDom.grow(growVect); @@ -920,8 +921,9 @@ PeleLM::fillTurbInflow( // Create box with ghost cells and set them to zero amrex::IntVect growVect(amrex::IntVect::TheUnitVector()); int Grow = 4; - for (int n = 0; n < AMREX_SPACEDIM; n++) + for (int n = 0; n < AMREX_SPACEDIM; n++) { growVect[n] = Grow; + } growVect[dir] = 0; amrex::Box modDom = geom[lev].Domain(); modDom.grow(growVect); diff --git a/Source/PeleLMDerive.H b/Source/PeleLMDerive.H index 36ee1f47..4d0a5581 100644 --- a/Source/PeleLMDerive.H +++ b/Source/PeleLMDerive.H @@ -1,5 +1,5 @@ -#ifndef PELELM_Derive_H_ -#define PELELM_Derive_H_ +#ifndef PELELM_Derive_H +#define PELELM_Derive_H #include #include #include diff --git a/Source/PeleLMDerive.cpp b/Source/PeleLMDerive.cpp index b33404f5..fca7e606 100644 --- a/Source/PeleLMDerive.cpp +++ b/Source/PeleLMDerive.cpp @@ -116,8 +116,9 @@ PeleLMDeriveRec::numDerive() const noexcept const std::string& PeleLMDeriveRec::variableName(int comp) const noexcept { - if (comp < variable_names.size()) + if (comp < variable_names.size()) { return variable_names[comp]; + } return derive_name; } @@ -204,8 +205,9 @@ PeleLMDeriveList::canDerive(const std::string& name) const li != End; ++li) { // Can be either a component name ... for (int i = 0; i < li->numDerive(); i++) { - if (li->variableName(i) == name) + if (li->variableName(i) == name) { return true; + } } // ... or a derive name if (li->derive_name == name) { @@ -223,8 +225,9 @@ PeleLMDeriveList::get(const std::string& name) const li != End; ++li) { // Can be either a component name ... for (int i = 0; i < li->numDerive(); i++) { - if (li->variableName(i) == name) + if (li->variableName(i) == name) { return &(*li); + } } // ... or a derive name if (li->derive_name == name) { diff --git a/Source/PeleLMDeriveFunc.H b/Source/PeleLMDeriveFunc.H index 375a4df9..baf7af1a 100644 --- a/Source/PeleLMDeriveFunc.H +++ b/Source/PeleLMDeriveFunc.H @@ -1,5 +1,5 @@ -#ifndef PELELM_DERIVEFUNC_H_ -#define PELELM_DERIVEFUNC_H_ +#ifndef PELELM_DERIVEFUNC_H +#define PELELM_DERIVEFUNC_H #include #include diff --git a/Source/PeleLMDeriveFunc.cpp b/Source/PeleLMDeriveFunc.cpp index 4e296854..ab7ed3ce 100644 --- a/Source/PeleLMDeriveFunc.cpp +++ b/Source/PeleLMDeriveFunc.cpp @@ -1177,8 +1177,9 @@ pelelm_dermixfrac( AMREX_ASSERT(statefab.box().contains(bx)); AMREX_ASSERT(ncomp == 1); - if (a_pelelm->Zfu < 0.0) + if (a_pelelm->Zfu < 0.0) { amrex::Abort("Mixture fraction not initialized"); + } auto const density = statefab.array(DENSITY); auto const rhoY = statefab.array(FIRSTSPEC); @@ -1227,8 +1228,9 @@ pelelm_derprogvar( AMREX_ASSERT(statefab.box().contains(bx)); AMREX_ASSERT(ncomp == 1); - if (a_pelelm->m_C0 < 0.0) + if (a_pelelm->m_C0 < 0.0) { amrex::Abort("Progress variable not initialized"); + } auto const density = statefab.array(DENSITY); auto const rhoY = statefab.array(FIRSTSPEC); diff --git a/Source/PeleLMDiagnostics.cpp b/Source/PeleLMDiagnostics.cpp index 47bde08f..0051fe4d 100644 --- a/Source/PeleLMDiagnostics.cpp +++ b/Source/PeleLMDiagnostics.cpp @@ -79,8 +79,9 @@ PeleLM::doDiagnostics() // redundantly derived each time int mf_idx = 0; const PeleLMDeriveRec* rec = derive_lst.get(m_diagVars[v]); - if (rec) + if (rec) { mf_idx = rec->variableComp(m_diagVars[v]); + } MultiFab::Copy(*diagMFVec[lev].get(), *mf, mf_idx, v, 1, 1); } } diff --git a/Source/PeleLMDiffusion.cpp b/Source/PeleLMDiffusion.cpp index b1f470e5..6ed04855 100644 --- a/Source/PeleLMDiffusion.cpp +++ b/Source/PeleLMDiffusion.cpp @@ -14,24 +14,27 @@ using namespace amrex; DiffusionOp* PeleLM::getDiffusionOp() { - if (!m_diffusion_op) + if (!m_diffusion_op) { m_diffusion_op.reset(new DiffusionOp(this)); + } return m_diffusion_op.get(); } DiffusionOp* PeleLM::getMCDiffusionOp(int ncomp) { - if (!m_mcdiffusion_op || m_mcdiffusion_op->m_ncomp != ncomp) + if (!m_mcdiffusion_op || m_mcdiffusion_op->m_ncomp != ncomp) { m_mcdiffusion_op.reset(new DiffusionOp(this, ncomp)); + } return m_mcdiffusion_op.get(); } DiffusionTensorOp* PeleLM::getDiffusionTensorOp() { - if (!m_diffusionTensor_op) + if (!m_diffusionTensor_op) { m_diffusionTensor_op.reset(new DiffusionTensorOp(this)); + } return m_diffusionTensor_op.get(); } @@ -881,7 +884,7 @@ PeleLM::differentialDiffusionUpdate( for (int lev = 0; lev <= finest_level; ++lev) { // Get t^{n} data pointer - auto ldata_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldata_p = getLevelDataPtr(lev, AmrOldTime); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) #endif @@ -958,7 +961,7 @@ PeleLM::differentialDiffusionUpdate( if (m_use_wbar) { for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) @@ -981,7 +984,7 @@ PeleLM::differentialDiffusionUpdate( } if (m_use_soret) { for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) @@ -1023,7 +1026,7 @@ PeleLM::differentialDiffusionUpdate( // forcing. for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) @@ -1230,8 +1233,8 @@ PeleLM::deltaTIter_prepare( { for (int lev = 0; lev <= finest_level; ++lev) { - auto ldataOld_p = getLevelDataPtr(lev, AmrOldTime); - auto ldataNew_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldataOld_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldataNew_p = getLevelDataPtr(lev, AmrNewTime); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) @@ -1296,7 +1299,7 @@ PeleLM::deltaTIter_update( // Evaluate deltaT norm and add Tsave back into the new LevelData a_deltaT_norm = -1.0e12; for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); a_deltaT_norm = std::max(a_deltaT_norm, ldata_p->state.norm0(TEMP, 0, false, true)); MultiFab::Add(ldata_p->state, *a_Tsave[lev], 0, TEMP, 1, 0); @@ -1372,7 +1375,7 @@ PeleLM::deltaTIter_update( //------------------------------------------------------------------------ // Recompute RhoH for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); auto const& sma = ldata_p->state.arrays(); amrex::ParallelFor( ldata_p->state, @@ -1395,7 +1398,7 @@ PeleLM::getScalarDiffForce( for (int lev = 0; lev <= finest_level; ++lev) { // Get t^{n} data pointer - auto ldataR_p = getLevelDataReactPtr(lev); + auto* ldataR_p = getLevelDataReactPtr(lev); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) diff --git a/Source/PeleLMEos.cpp b/Source/PeleLMEos.cpp index 0d3dacbf..95ef0b81 100644 --- a/Source/PeleLMEos.cpp +++ b/Source/PeleLMEos.cpp @@ -21,7 +21,7 @@ PeleLM::setThermoPress(int lev, const TimeStamp& a_time) AMREX_ASSERT(a_time == AmrOldTime || a_time == AmrNewTime); - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); auto const& sma = ldata_p->state.arrays(); amrex::ParallelFor( @@ -59,13 +59,13 @@ PeleLM::calcDivU( // Assemble divU on each level for (int lev = 0; lev <= finest_level; lev++) { - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); MultiFab RhoYdot; if (m_do_react && !m_skipInstantRR) { if (is_init) { // Either pre-divU, divU or press initial iterations if (m_dt > 0.0) { // divU ite -> use I_R - auto ldataR_p = getLevelDataReactPtr(lev); + auto* ldataR_p = getLevelDataReactPtr(lev); RhoYdot.define(grids[lev], dmap[lev], nCompIR(), 0); MultiFab::Copy(RhoYdot, ldataR_p->I_R, 0, 0, nCompIR(), 0); } else { // press ite -> set to zero @@ -157,8 +157,8 @@ PeleLM::calcDivU( // Average down divU if (do_avgDown) { for (int lev = finest_level; lev > 0; --lev) { - auto ldataFine_p = getLevelDataPtr(lev, a_time); - auto ldataCrse_p = getLevelDataPtr(lev - 1, a_time); + auto* ldataFine_p = getLevelDataPtr(lev, a_time); + auto* ldataCrse_p = getLevelDataPtr(lev - 1, a_time); #ifdef AMREX_USE_EB EB_average_down( ldataFine_p->divu, ldataCrse_p->divu, 0, 1, refRatio(lev - 1)); @@ -172,7 +172,7 @@ PeleLM::calcDivU( // fillPatch a_time divu to get properly filled ghost cells for (int lev = 0; lev <= finest_level; ++lev) { Real time = getTime(lev, a_time); - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); fillpatch_divu(lev, time, ldata_p->divu, m_nGrowdivu); } } @@ -183,7 +183,7 @@ PeleLM::setRhoToSumRhoY(int lev, const TimeStamp& a_time) AMREX_ASSERT(a_time == AmrOldTime || a_time == AmrNewTime); - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); auto const& sma = ldata_p->state.arrays(); amrex::ParallelFor( @@ -216,7 +216,7 @@ PeleLM::setTemperature(int lev, const TimeStamp& a_time) AMREX_ASSERT(a_time == AmrOldTime || a_time == AmrNewTime); - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); auto const& sma = ldata_p->state.arrays(); amrex::ParallelFor( diff --git a/Source/PeleLMEvaluate.cpp b/Source/PeleLMEvaluate.cpp index 8cdeff36..8197cfc9 100644 --- a/Source/PeleLMEvaluate.cpp +++ b/Source/PeleLMEvaluate.cpp @@ -118,7 +118,7 @@ PeleLM::MLevaluate( is_initialization, computeDiffusionTerm, do_avgDown, AmrNewTime, diffData); for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); MultiFab::Copy(*a_MFVec[lev], ldata_p->divu, 0, a_comp, 1, 0); } nComp = 1; @@ -142,7 +142,7 @@ PeleLM::MLevaluate( // Copy into outgoing data holder for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); MultiFab::Copy( *a_MFVec[lev], ldata_p->state, VELX, a_comp, AMREX_SPACEDIM, 0); } @@ -188,7 +188,7 @@ PeleLM::MLevaluate( // 'Old' chemical state (rhoYs + rhoH + T) and adv/diff forcing for chem. // integration Replicate most of the advance function Copy the state for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); MultiFab::Copy( *a_MFVec[lev], ldata_p->state, FIRSTSPEC, a_comp, NUM_SPECIES + 2, 0); } @@ -217,7 +217,7 @@ PeleLM::MLevaluate( calcViscosity(AmrNewTime); calcDiffusivity(AmrNewTime); for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); MultiFab::Copy( *a_MFVec[lev], ldata_p->diff_cc, 0, a_comp, NUM_SPECIES + 1, 0); MultiFab::Copy( diff --git a/Source/PeleLMEvolve.cpp b/Source/PeleLMEvolve.cpp index cf34ab06..ad55094a 100644 --- a/Source/PeleLMEvolve.cpp +++ b/Source/PeleLMEvolve.cpp @@ -25,11 +25,13 @@ PeleLM::Evolve() bool regridded = false; if ((m_regrid_int > 0) && (m_nstep > 0) && (m_nstep % m_regrid_int == 0)) { - if (m_verbose > 0) + if (m_verbose > 0) { amrex::Print() << " Regridding...\n"; + } // Average down I_R to have proper values in newly uncovered areas - if (!m_incompressible) + if (!m_incompressible) { averageDownReaction(); + } regrid(0, m_cur_time); resetMacProjector(); resetCoveredMask(); @@ -221,7 +223,7 @@ PeleLM::checkMessage(const std::string& a_action) { bool take_action = false; - std::string action_file = ""; + std::string action_file; if (a_action == "dump_and_stop") { action_file = "dump_and_stop"; } else if (a_action == "plt_and_continue") { diff --git a/Source/PeleLMFlowController.cpp b/Source/PeleLMFlowController.cpp index c03438f8..d188b13e 100644 --- a/Source/PeleLMFlowController.cpp +++ b/Source/PeleLMFlowController.cpp @@ -100,8 +100,9 @@ PeleLM::initActiveControl() // Compute some active control parameters Real area_tot = 1.0; for (int idim{0}; idim < AMREX_SPACEDIM; idim++) { - if (idim != m_ctrl_flameDir) + if (idim != m_ctrl_flameDir) { area_tot *= (Geom(0).ProbHi(idim) - Geom(0).ProbLo(idim)); + } } m_ctrl_scale = area_tot * s_ext[FIRSTSPEC + fuelID]; @@ -156,11 +157,13 @@ PeleLM::activeControl(int is_restart) } // If first time, set old target state - if (m_ctrl_coftOld < 0.0) + if (m_ctrl_coftOld < 0.0) { m_ctrl_coftOld = coft; + } - if (m_nstep == 0) + if (m_nstep == 0) { m_ctrl_nfilled = m_ctrl_NavgPts + 1; + } // Manage AC history I/O if (is_restart) { @@ -299,7 +302,7 @@ PeleLM::getActiveControlLowT(Real& a_coft) for (int lev = 0; lev <= finest_level; lev++) { // Get t^{n+1} data pointer - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); const auto geomdata = Geom(lev).data(); // local FC data diff --git a/Source/PeleLMForces.cpp b/Source/PeleLMForces.cpp index 1e0c16b6..868f9539 100644 --- a/Source/PeleLMForces.cpp +++ b/Source/PeleLMForces.cpp @@ -42,12 +42,12 @@ PeleLM::getVelForces( // Get level data // TODO: the 1 here bypass getting halftime vel and return oldtime vel - auto ldata_p = getLevelDataPtr(lev, a_time, 1); + auto* ldata_p = getLevelDataPtr(lev, a_time, 1); // Get gradp: if m_t_old < 0.0, we are during initialization -> only NewTime // data initialized at this point - auto ldataGP_p = (m_t_old[lev] < 0.0) ? getLevelDataPtr(lev, AmrNewTime) - : getLevelDataPtr(lev, AmrOldTime); + auto* ldataGP_p = (m_t_old[lev] < 0.0) ? getLevelDataPtr(lev, AmrNewTime) + : getLevelDataPtr(lev, AmrOldTime); Real time = getTime(lev, a_time); @@ -101,18 +101,22 @@ PeleLM::getVelForces( divTau_arr, force_arr] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { if (is_incomp) { for (int idim = 0; idim < AMREX_SPACEDIM; idim++) { - if (add_gradP) + if (add_gradP) { force_arr(i, j, k, idim) -= gp_arr(i, j, k, idim); - if (has_divTau) + } + if (has_divTau) { force_arr(i, j, k, idim) += divTau_arr(i, j, k, idim); + } force_arr(i, j, k, idim) *= incomp_rho_inv; } } else { for (int idim = 0; idim < AMREX_SPACEDIM; idim++) { - if (add_gradP) + if (add_gradP) { force_arr(i, j, k, idim) -= gp_arr(i, j, k, idim); - if (has_divTau) + } + if (has_divTau) { force_arr(i, j, k, idim) += divTau_arr(i, j, k, idim); + } force_arr(i, j, k, idim) /= rho_arr(i, j, k); } } diff --git a/Source/PeleLMInit.cpp b/Source/PeleLMInit.cpp index 64e53b00..1ccd0f0b 100644 --- a/Source/PeleLMInit.cpp +++ b/Source/PeleLMInit.cpp @@ -289,7 +289,7 @@ PeleLM::initData() copyStateNewToOld(1); copyPressNewToOld(); if (m_do_react) { - auto ldataR_p = getLevelDataReactPtr(lev); + auto* ldataR_p = getLevelDataReactPtr(lev); ldataR_p->I_R.setVal(0.0); } } @@ -312,7 +312,7 @@ PeleLM::initLevelData(int lev) BL_PROFILE("PeleLMeX::initLevelData()"); // Get level data - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); const auto geomdata = geom[lev].data(); // Pressure and pressure gradients to zero @@ -444,7 +444,7 @@ PeleLM::projectInitSolution() if (m_numDivuIter == 0 && m_do_react) { for (int lev = 0; lev <= finest_level; ++lev) { - auto ldataR_p = getLevelDataReactPtr(lev); + auto* ldataR_p = getLevelDataReactPtr(lev); ldataR_p->I_R.setVal(0.0); } } @@ -453,10 +453,10 @@ PeleLM::projectInitSolution() // If we didn't do the projection, initialize press/gp(/I_R) for (int lev = 0; lev <= finest_level; ++lev) { if (m_do_react) { - auto ldataR_p = getLevelDataReactPtr(lev); + auto* ldataR_p = getLevelDataReactPtr(lev); ldataR_p->I_R.setVal(0.0); } - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); ldata_p->press.setVal(0.0); ldata_p->gp.setVal(0.0); } diff --git a/Source/PeleLMPlot.cpp b/Source/PeleLMPlot.cpp index 532dc6d0..680e3213 100644 --- a/Source/PeleLMPlot.cpp +++ b/Source/PeleLMPlot.cpp @@ -90,8 +90,9 @@ PeleLM::WritePlotFile() ncomp = NVAR; } // Make the plot lighter by dropping species by default - if (!m_plotStateSpec) + if (!m_plotStateSpec) { ncomp -= NUM_SPECIES; + } if (m_has_divu) { ncomp += 1; } @@ -104,8 +105,9 @@ PeleLM::WritePlotFile() // FunctCall ncomp += 1; // Extras: - if (m_plotHeatRelease) + if (m_plotHeatRelease) { ncomp += 1; + } } #ifdef AMREX_USE_EB @@ -195,8 +197,9 @@ PeleLM::WritePlotFile() #endif plt_VarsName.push_back("FunctCall"); // Extras: - if (m_plotHeatRelease) + if (m_plotHeatRelease) { plt_VarsName.push_back("HeatRelease"); + } } #ifdef AMREX_USE_EB @@ -461,8 +464,9 @@ PeleLM::WriteHeader(const std::string& name, bool is_checkpoint) const } HeaderFile << '\n'; - for (int i = 0; i < AMREX_SPACEDIM; ++i) + for (int i = 0; i < AMREX_SPACEDIM; ++i) { HeaderFile << Geom(0).ProbHi(i) << ' '; + } HeaderFile << '\n'; // BoxArray @@ -782,20 +786,24 @@ PeleLM::initLevelDataFromPlt(int a_lev, const std::string& a_dataPltFile) std::string firstChars = plt_vars[i].substr(0, 2); if (pltfileSource == "LM") { - if (plt_vars[i] == "temp") + if (plt_vars[i] == "temp") { idT = i; + } } else if (pltfileSource == "C") { - if (plt_vars[i] == "Temp") + if (plt_vars[i] == "Temp") { idT = i; + } } - if (plt_vars[i] == "x_velocity") + if (plt_vars[i] == "x_velocity") { idV = i; + } if (firstChars == "Y(" && idY < 0) { // species might not be ordered in the // order of the current mech. idY = i; } - if (firstChars == "Y(") + if (firstChars == "Y(") { nSpecPlt += 1; + } #ifdef PELE_USE_EFIELD if (plt_vars[i] == "nE") inE = i; @@ -816,7 +824,7 @@ PeleLM::initLevelDataFromPlt(int a_lev, const std::string& a_dataPltFile) << plt_vars[idY] << "\n"; // Get level data - auto ldata_p = getLevelDataPtr(a_lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(a_lev, AmrNewTime); // Velocity pltData.fillPatchFromPlt( @@ -839,8 +847,9 @@ PeleLM::initLevelDataFromPlt(int a_lev, const std::string& a_dataPltFile) foundSpec = 1; } } - if (!foundSpec) + if (!foundSpec) { ldata_p->state.setVal(0.0, FIRSTSPEC + i, 1); + } } // Converting units when pltfile is coming from PeleC solution diff --git a/Source/PeleLMProjection.cpp b/Source/PeleLMProjection.cpp index 60ee2a3a..39c5ac83 100644 --- a/Source/PeleLMProjection.cpp +++ b/Source/PeleLMProjection.cpp @@ -29,7 +29,7 @@ PeleLM::initialProjection() sigma[lev].reset(new MultiFab( grids[lev], dmap[lev], 1, nGhost, MFInfo(), *m_factory[lev])); - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) @@ -88,7 +88,7 @@ PeleLM::initialProjection() // Set back press and gpress to zero and restore divu // and rescale velocity if 2D-RZ for (int lev = 0; lev <= finest_level; lev++) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); ldata_p->press.setVal(0.0); ldata_p->gp.setVal(0.0); if (!m_incompressible && m_has_divu) { @@ -140,7 +140,7 @@ PeleLM::initialPressProjection() sigma[lev].reset(new MultiFab( grids[lev], dmap[lev], 1, nGhost, MFInfo(), *m_factory[lev])); - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) @@ -218,12 +218,13 @@ PeleLM::velocityProjection( if (!incremental) { Vector> rhoHalf(finest_level + 1); - if (!m_incompressible) + if (!m_incompressible) { rhoHalf = getDensityVect(a_rhoTime); + } for (int lev = 0; lev <= finest_level; ++lev) { - auto ldataOld_p = getLevelDataPtr(lev, AmrOldTime); - auto ldataNew_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldataOld_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldataNew_p = getLevelDataPtr(lev, AmrNewTime); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) @@ -255,8 +256,8 @@ PeleLM::velocityProjection( // define "vel" to be U^{np1*} - U^{n} rather than U^{np1*} if (incremental) { for (int lev = 0; lev <= finest_level; ++lev) { - auto ldataOld_p = getLevelDataPtr(lev, AmrOldTime); - auto ldataNew_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldataOld_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldataNew_p = getLevelDataPtr(lev, AmrNewTime); MultiFab::Subtract( ldataNew_p->state, ldataOld_p->state, VELX, VELX, AMREX_SPACEDIM, 0); } @@ -271,8 +272,9 @@ PeleLM::velocityProjection( EB_set_covered(*vel[lev], 0.0); #endif vel[lev]->setBndry(0.0); - if (!incremental) + if (!incremental) { setInflowBoundaryVel(*vel[lev], lev, AmrNewTime); + } scaleProj_RZ(lev, *vel[lev]); } @@ -294,7 +296,7 @@ PeleLM::velocityProjection( rhs_cc.resize(finest_level + 1); for (int lev = 0; lev <= finest_level; ++lev) { if (!incremental) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); rhs_cc[lev].define( grids[lev], dmap[lev], 1, ldata_p->divu.nGrow(), MFInfo(), *m_factory[lev]); @@ -305,8 +307,8 @@ PeleLM::velocityProjection( } rhs_cc[lev].mult(-1.0, 0, 1, ldata_p->divu.nGrow()); } else { - auto ldataOld_p = getLevelDataPtr(lev, AmrOldTime); - auto ldataNew_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldataOld_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldataNew_p = getLevelDataPtr(lev, AmrNewTime); rhs_cc[lev].define( grids[lev], dmap[lev], 1, ldataOld_p->divu.nGrow(), MFInfo(), *m_factory[lev]); @@ -347,8 +349,8 @@ PeleLM::velocityProjection( // and handles scaling if 2D-RZ if (incremental) { for (int lev = 0; lev <= finest_level; ++lev) { - auto ldataOld_p = getLevelDataPtr(lev, AmrOldTime); - auto ldataNew_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldataOld_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldataNew_p = getLevelDataPtr(lev, AmrNewTime); unscaleProj_RZ( lev, *vel[lev]); // Unscaling New vel before adding back old one MultiFab::Add( @@ -379,10 +381,12 @@ PeleLM::doNodalProject( { int has_rhs = 0; int has_rhs_nd = 0; - if (!rhs_cc.empty()) + if (!rhs_cc.empty()) { has_rhs = 1; - if (!rhs_nd.empty()) + } + if (!rhs_nd.empty()) { has_rhs_nd = 1; + } // Asserts AMREX_ASSERT(a_vel.size() == a_sigma.size()); @@ -449,7 +453,7 @@ PeleLM::doNodalProject( for (int lev = 0; lev <= finest_level; lev++) { - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) @@ -491,8 +495,8 @@ PeleLM::doNodalProject( // Average down grap P for (int lev = finest_level - 1; lev >= 0; --lev) { - auto ldataFine_p = getLevelDataPtr(lev + 1, AmrNewTime); - auto ldataCrse_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldataFine_p = getLevelDataPtr(lev + 1, AmrNewTime); + auto* ldataCrse_p = getLevelDataPtr(lev, AmrNewTime); #ifdef AMREX_USE_EB amrex::EB_average_down( ldataFine_p->gp, ldataCrse_p->gp, 0, AMREX_SPACEDIM, refRatio(lev)); diff --git a/Source/PeleLMReactions.cpp b/Source/PeleLMReactions.cpp index 272aa785..9e97a72f 100644 --- a/Source/PeleLMReactions.cpp +++ b/Source/PeleLMReactions.cpp @@ -33,9 +33,9 @@ PeleLM::advanceChemistry(int lev, const Real& a_dt, MultiFab& a_extForcing) { BL_PROFILE("PeleLMeX::advanceChemistry_Lev" + std::to_string(lev) + "()"); - auto ldataOld_p = getLevelDataPtr(lev, AmrOldTime); - auto ldataNew_p = getLevelDataPtr(lev, AmrNewTime); - auto ldataR_p = getLevelDataReactPtr(lev); + auto* ldataOld_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldataNew_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldataR_p = getLevelDataReactPtr(lev); // Setup EB-covered cells mask iMultiFab mask(grids[lev], dmap[lev], 1, 0); @@ -46,8 +46,9 @@ PeleLM::advanceChemistry(int lev, const Real& a_dt, MultiFab& a_extForcing) #endif MFItInfo mfi_info; - if (Gpu::notInLaunchRegion()) + if (Gpu::notInLaunchRegion()) { mfi_info.EnableTiling().SetDynamic(true); + } #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) #endif @@ -182,9 +183,9 @@ PeleLM::advanceChemistryBAChem( { BL_PROFILE("PeleLMeX::advanceChemistry_Lev" + std::to_string(lev) + "()"); - auto ldataOld_p = getLevelDataPtr(lev, AmrOldTime); - auto ldataNew_p = getLevelDataPtr(lev, AmrNewTime); - auto ldataR_p = getLevelDataReactPtr(lev); + auto* ldataOld_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldataNew_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldataR_p = getLevelDataReactPtr(lev); // Set chemistry MFs based on baChem and dmapChem MultiFab chemState(*m_baChem[lev], *m_dmapChem[lev], NUM_SPECIES + 3, 0); @@ -210,8 +211,9 @@ PeleLM::advanceChemistryBAChem( #endif MFItInfo mfi_info; - if (Gpu::notInLaunchRegion()) + if (Gpu::notInLaunchRegion()) { mfi_info.EnableTiling().SetDynamic(true); + } #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) #endif @@ -382,7 +384,7 @@ PeleLM::computeInstantaneousReactionRate( int lev, const TimeStamp& a_time, MultiFab* a_I_R) { BL_PROFILE("PeleLMeX::computeInstantaneousReactionRate()"); - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); #ifdef AMREX_USE_EB auto const& ebfact = EBFactory(lev); @@ -439,9 +441,9 @@ PeleLM::getScalarReactForce(std::unique_ptr& advData) for (int lev = 0; lev <= finest_level; ++lev) { // Get t^{n} t^{np1} data pointer - auto ldataOld_p = getLevelDataPtr(lev, AmrOldTime); - auto ldataNew_p = getLevelDataPtr(lev, AmrNewTime); - auto ldataR_p = getLevelDataReactPtr(lev); + auto* ldataOld_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldataNew_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldataR_p = getLevelDataReactPtr(lev); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) @@ -474,8 +476,8 @@ PeleLM::getScalarReactForce(std::unique_ptr& advData) void PeleLM::getHeatRelease(int a_lev, MultiFab* a_HR) { - auto ldataNew_p = getLevelDataPtr(a_lev, AmrNewTime); - auto ldataR_p = getLevelDataReactPtr(a_lev); + auto* ldataNew_p = getLevelDataPtr(a_lev, AmrNewTime); + auto* ldataR_p = getLevelDataReactPtr(a_lev); #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) diff --git a/Source/PeleLMRegrid.cpp b/Source/PeleLMRegrid.cpp index ac70750b..530261b9 100644 --- a/Source/PeleLMRegrid.cpp +++ b/Source/PeleLMRegrid.cpp @@ -7,8 +7,9 @@ PeleLM::regrid(int lbase, amrex::Real time, bool initial) { BL_PROFILE("PeleLMeX::regrid()"); - if (!m_doLoadBalance && lbase >= max_level) + if (!m_doLoadBalance && lbase >= max_level) { return; + } if (!m_regrid_file.empty()) { regridFromGridFile(lbase, time, initial); @@ -93,8 +94,9 @@ PeleLM::regrid(int lbase, amrex::Real time, bool initial) } } - if (lbase >= max_level) + if (lbase >= max_level) { return; + } int new_finest; Vector new_grids(finest_level + 2); @@ -511,10 +513,12 @@ PeleLM::ClearLevel(int lev) m_leveldata_old[lev].reset(); m_leveldata_new[lev].reset(); - if (m_do_react) + if (m_do_react) { m_leveldatareact[lev].reset(); - if (max_level > 0 && lev != max_level) + } + if (max_level > 0 && lev != max_level) { m_coveredMask[lev].reset(); + } m_baChem[lev].reset(); m_dmapChem[lev].reset(); m_factory[lev].reset(); diff --git a/Source/PeleLMSetup.cpp b/Source/PeleLMSetup.cpp index f88b75f1..b9f2b826 100644 --- a/Source/PeleLMSetup.cpp +++ b/Source/PeleLMSetup.cpp @@ -100,14 +100,16 @@ PeleLM::Setup() if (!m_incompressible) { amrex::Print() << " Initialization of Transport ... \n"; trans_parms.allocate(); - if (m_les_verbose and m_do_les) + if (m_les_verbose and m_do_les) { amrex::Print() << " Using LES in transport with Sc = " << 1.0 / m_Schmidt_inv << " and Pr = " << 1.0 / m_Prandtl_inv << std::endl; - if (m_verbose and m_unity_Le) + } + if (m_verbose and m_unity_Le) { amrex::Print() << " Using Le = 1 transport with Sc = " << 1.0 / m_Schmidt_inv << " and Pr = " << 1.0 / m_Prandtl_inv << std::endl; + } if (m_do_react) { int reactor_type = 2; int ncells_chem = 1; @@ -763,7 +765,7 @@ PeleLM::variablesSetup() // Combustion // ----------------------------------------- ParmParse pp("peleLM"); - std::string fuel_name = ""; + std::string fuel_name; pp.query("fuel_name", fuel_name); fuel_name = "rho.Y(" + fuel_name + ")"; if (isStateVariable(fuel_name)) { @@ -1236,8 +1238,9 @@ PeleLM::resizeArray() m_leveldata_new.resize(max_level + 1); m_leveldatareact.resize(max_level + 1); m_halfTimeDensity.resize(max_level + 1); - if (max_level > 0) + if (max_level > 0) { m_coveredMask.resize(max_level); + } m_baChem.resize(max_level + 1); m_dmapChem.resize(max_level + 1); m_baChemFlag.resize(max_level + 1); diff --git a/Source/PeleLMTemporals.cpp b/Source/PeleLMTemporals.cpp index 7318ff5f..47fe19f4 100644 --- a/Source/PeleLMTemporals.cpp +++ b/Source/PeleLMTemporals.cpp @@ -5,8 +5,9 @@ using namespace amrex; void PeleLM::initTemporals(const PeleLM::TimeStamp& a_time) { - if (!m_do_temporals && !(m_nstep % m_temp_int == 0)) + if (!m_do_temporals && !(m_nstep % m_temp_int == 0)) { return; + } // Reset mass fluxes integrals on domain boundaries if (m_do_massBalance && !m_incompressible) { @@ -96,8 +97,9 @@ PeleLM::addMassFluxes( // Do when m_nstep is -1 since m_nstep is increased by one before // the writeTemporals - if (!(m_nstep % m_temp_int == m_temp_int - 1)) + if (!(m_nstep % m_temp_int == m_temp_int - 1)) { return; + } // Get the face areas const Real* dx = a_geom.CellSize(); @@ -309,8 +311,9 @@ PeleLM::addRhoHFluxes( // Do when m_nstep is -1 since m_nstep is increased by one before // the writeTemporals - if (!(m_nstep % m_temp_int == m_temp_int - 1)) + if (!(m_nstep % m_temp_int == m_temp_int - 1)) { return; + } // Get the face areas const Real* dx = a_geom.CellSize(); @@ -405,8 +408,9 @@ PeleLM::addRhoYFluxes( // Do when m_nstep is -1 since m_nstep is increased by one before // the writeTemporals - if (!(m_nstep % m_temp_int == m_temp_int - 1)) + if (!(m_nstep % m_temp_int == m_temp_int - 1)) { return; + } // Get the face areas const Real* dx = a_geom.CellSize(); @@ -572,8 +576,9 @@ PeleLM::writeTemporals() void PeleLM::openTempFile() { - if (!m_do_temporals) + if (!m_do_temporals) { return; + } // Create the temporal directory UtilCreateDirectory("temporals", 0755); @@ -620,8 +625,9 @@ PeleLM::openTempFile() void PeleLM::closeTempFile() { - if (!m_do_temporals) + if (!m_do_temporals) { return; + } if (ParallelDescriptor::IOProcessor()) { tmpStateFile.flush(); diff --git a/Source/PeleLMTimestep.cpp b/Source/PeleLMTimestep.cpp index aaff8702..ee39c40a 100644 --- a/Source/PeleLMTimestep.cpp +++ b/Source/PeleLMTimestep.cpp @@ -109,7 +109,7 @@ PeleLM::estConvectiveDt(const TimeStamp& a_time) //---------------------------------------------------------------- // Get level data ptr - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); auto const dx = geom[lev].CellSizeArray(); @@ -166,7 +166,7 @@ PeleLM::estDivUDt(const TimeStamp& a_time) for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); std::unique_ptr density = std::make_unique(ldata_p->state, amrex::make_alias, DENSITY, 1); @@ -238,7 +238,7 @@ PeleLM::checkDt(const TimeStamp& a_time, const Real& a_dt) for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); const auto dxinv = geom[lev].InvCellSizeArray(); diff --git a/Source/PeleLMTransportProp.cpp b/Source/PeleLMTransportProp.cpp index 24b2d979..f1d4cae0 100644 --- a/Source/PeleLMTransportProp.cpp +++ b/Source/PeleLMTransportProp.cpp @@ -26,7 +26,7 @@ PeleLM::calcTurbViscosity(const TimeStamp& a_time) amrex::Vector> GradVel( finest_level + 1); for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); const auto& ba = ldata_p->state.boxArray(); const auto& dm = ldata_p->state.DistributionMap(); const auto& factory = ldata_p->state.Factory(); @@ -43,7 +43,7 @@ PeleLM::calcTurbViscosity(const TimeStamp& a_time) GetVecOfArrOfPtrs(GradVel), GetVecOfConstPtrs(getVelocityVect(a_time))); for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); // Get density and cp (if needed) at faces for computing turbulent transport // properties @@ -255,7 +255,7 @@ PeleLM::calcViscosity(const TimeStamp& a_time) for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); if (m_incompressible) { ldata_p->visc_cc.setVal(m_mu); @@ -288,7 +288,7 @@ PeleLM::calcDiffusivity(const TimeStamp& a_time) for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); // Transport data pointer auto const* ltransparm = trans_parms.device_trans_parm(); @@ -444,7 +444,7 @@ PeleLM::getDiffusivity( } else { tstamp = AmrOldTime; } - auto ldata_p = getLevelDataPtr(lev, tstamp); + auto* ldata_p = getLevelDataPtr(lev, tstamp); // Identify and add the correct turbulent contribution for (int idim = 0; idim < AMREX_SPACEDIM; idim++) { @@ -453,10 +453,11 @@ PeleLM::getDiffusivity( beta_ec[idim], ldata_p->visc_turb_fc[idim], 0, 0, 1, 0); } else if ((ncomp == NUM_SPECIES) and (beta_comp == 0)) { // Species // diffusivity - for (int ispec = 0; ispec < NUM_SPECIES; ispec++) + for (int ispec = 0; ispec < NUM_SPECIES; ispec++) { amrex::MultiFab::Saxpy( beta_ec[idim], m_Schmidt_inv, ldata_p->visc_turb_fc[idim], 0, ispec, 1, 0); + } } else if ((ncomp == 1) and (beta_comp == NUM_SPECIES)) { // Thermal // conductivity amrex::MultiFab::Add( diff --git a/Source/PeleLMUMac.cpp b/Source/PeleLMUMac.cpp index 30cc795c..93467f48 100644 --- a/Source/PeleLMUMac.cpp +++ b/Source/PeleLMUMac.cpp @@ -49,7 +49,7 @@ PeleLM::predictVelocity(std::unique_ptr& advData) auto bcRecVel_d = convertToDeviceVector(bcRecVel); for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, AmrOldTime); + auto* ldata_p = getLevelDataPtr(lev, AmrOldTime); //---------------------------------------------------------------- #ifdef AMREX_USE_EB @@ -151,7 +151,7 @@ PeleLM::macProject( rho_inv[lev][idim].setVal(rhoInv); } } else { - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); int doZeroVisc = 0; rho_inv[lev] = getDiffusivity(lev, DENSITY, 1, doZeroVisc, {bcRec}, ldata_p->state); @@ -185,8 +185,9 @@ PeleLM::macProject( // set MAC velocity and projection RHS macproj->getLinOp().setMaxOrder(m_mac_max_order); macproj->setUMAC(GetVecOfArrOfPtrs(advData->umac)); - if (has_divu) + if (has_divu) { macproj->setDivU(GetVecOfConstPtrs(a_divu)); + } // Project macproj->project(m_mac_mg_rtol, m_mac_mg_atol); @@ -204,7 +205,7 @@ PeleLM::macProject( // We need to fill the MAC velocities outside the fine region so we can // use them in the Godunov method IntVect rr = geom[lev].Domain().size() / geom[lev - 1].Domain().size(); - auto divu_lev = (has_divu) ? a_divu[lev] : nullptr; + auto* divu_lev = (has_divu) ? a_divu[lev] : nullptr; create_constrained_umac_grown( lev, m_nGrowMAC, &geom[lev - 1], &geom[lev], GetArrOfPtrs(advData->umac[lev - 1]), GetArrOfPtrs(advData->umac[lev]), @@ -400,14 +401,16 @@ PeleLM::create_constrained_umac_grown( umac_arr[idim](i, j, k) = umac_arr[idim](idxp1[0], idxp1[1], idxp1[2]) + dx[idim] * transverseTerm; - if (has_divu) + if (has_divu) { umac_arr[idim](i, j, k) -= dx[idim] * divuarr(i, j, k); + } } else if (idx[idim] > bx.bigEnd(idim)) { umac_arr[idim](idxp1[0], idxp1[1], idxp1[2]) = umac_arr[idim](i, j, k) - dx[idim] * transverseTerm; - if (has_divu) + if (has_divu) { umac_arr[idim](idxp1[0], idxp1[1], idxp1[2]) += dx[idim] * divuarr(i, j, k); + } } } }); diff --git a/Source/PeleLMUtils.cpp b/Source/PeleLMUtils.cpp index 22d5643a..9d6ef64c 100644 --- a/Source/PeleLMUtils.cpp +++ b/Source/PeleLMUtils.cpp @@ -587,7 +587,7 @@ PeleLM::floorSpecies(const TimeStamp& a_time) for (int lev = 0; lev <= finest_level; ++lev) { - auto ldata_p = getLevelDataPtr(lev, a_time); + auto* ldata_p = getLevelDataPtr(lev, a_time); auto const& sma = ldata_p->state.arrays(); amrex::ParallelFor( @@ -628,8 +628,9 @@ PeleLM::resetCoveredMask() BL_PROFILE("PeleLMeX::resetCoveredMask()"); if (m_resetCoveredMask) { - if (m_verbose) + if (m_verbose) { Print() << " Resetting fine-covered cells mask \n"; + } for (int lev = 0; lev < finest_level; ++lev) { // Set a fine-covered mask @@ -834,7 +835,7 @@ PeleLM::derive(const std::string& a_name, Real a_time, int lev, int nGrow) fillPatchState(lev, a_time, m_nGrowState); // Get pressure: TODO no fillpatch for pressure just yet, simply get new // state - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); std::unique_ptr reactmf = fillPatchReact(lev, a_time, nGrow); auto stateBCs = fetchBCRecArray(VELX, NVAR); #ifdef AMREX_USE_OMP @@ -893,7 +894,7 @@ PeleLM::deriveComp(const std::string& a_name, Real a_time, int lev, int nGrow) fillPatchState(lev, a_time, m_nGrowState); // Get pressure: TODO no fillpatch for pressure just yet, simply get new // state - auto ldata_p = getLevelDataPtr(lev, AmrNewTime); + auto* ldata_p = getLevelDataPtr(lev, AmrNewTime); std::unique_ptr reactmf = fillPatchReact(lev, a_time, nGrow); auto stateBCs = fetchBCRecArray(VELX, NVAR); @@ -1349,8 +1350,9 @@ void PeleLM::updateTypicalValuesChem() { if (m_useTypValChem && m_do_react) { - if (m_verbose > 2) + if (m_verbose > 2) { Print() << " Update chemistry typical values \n"; + } #ifdef AMREX_USE_OMP #pragma omp parallel if (Gpu::notInLaunchRegion()) #endif @@ -1603,8 +1605,9 @@ PeleLM::MLmin(const Vector& a_MF, int scomp, int ncomp) void PeleLM::checkMemory(const std::string& a_message) { - if (!m_checkMem) + if (!m_checkMem) { return; + } const int IOProc = ParallelDescriptor::IOProcessorNumber(); #ifdef AMREX_USE_GPU @@ -1633,12 +1636,15 @@ PeleLM::initMixtureFraction() for (int i = 0; i < NUM_SPECIES; ++i) { YF[i] = 0.0; YO[i] = 0.0; - if (!specNames[i].compare("O2")) + if (!specNames[i].compare("O2")) { YO[i] = 0.233; - if (!specNames[i].compare("N2")) + } + if (!specNames[i].compare("N2")) { YO[i] = 0.767; - if (i == fuelID) + } + if (i == fuelID) { YF[i] = 1.0; + } } auto eos = pele::physics::PhysicsType::eos(); diff --git a/Source/PeleLM_Index.H b/Source/PeleLM_Index.H index 1a626bdc..aad22b0e 100644 --- a/Source/PeleLM_Index.H +++ b/Source/PeleLM_Index.H @@ -1,17 +1,17 @@ -#ifndef PELELM_INDEX_H_ -#define PELELM_INDEX_H_ +#ifndef PELELM_INDEX_H +#define PELELM_INDEX_H #define VELX 0 #define VELY 1 #define VELZ 2 #define DENSITY AMREX_SPACEDIM -#define FIRSTSPEC DENSITY + 1 -#define RHOH FIRSTSPEC + NUM_SPECIES -#define TEMP RHOH + 1 -#define RHORT TEMP + 1 +#define FIRSTSPEC (DENSITY + 1) +#define RHOH (FIRSTSPEC + NUM_SPECIES) +#define TEMP (RHOH + 1) +#define RHORT (TEMP + 1) #ifdef PELE_USE_EFIELD -#define NE RHORT + 1 -#define PHIV NE + 1 +#define NE (RHORT + 1) +#define PHIV (NE + 1) #define NUMEFIELD 2 #else #define NUMEFIELD 0 @@ -22,8 +22,8 @@ #else #define NUMSOOTVAR 0 #endif -#define FIRSTAUX RHORT + NUMEFIELD + NUMSOOTVAR + 1 -#define NVAR FIRSTAUX + 0 +#define FIRSTAUX (RHORT + NUMEFIELD + NUMSOOTVAR + 1) +#define NVAR (FIRSTAUX + 0) // TODO: handle NAUX #endif diff --git a/Source/PeleLM_K.H b/Source/PeleLM_K.H index 8496fcef..54bd53ad 100644 --- a/Source/PeleLM_K.H +++ b/Source/PeleLM_K.H @@ -1,5 +1,5 @@ -#ifndef PeleLM_K_H_ -#define PeleLM_K_H_ +#ifndef PeleLM_K_H +#define PeleLM_K_H #include #include @@ -317,8 +317,9 @@ compute_divu( (specEnthDiff(i, j, k) + tempDiff(i, j, k) + extRhoH(i, j, k)) * denominv; for (int n = 0; n < NUM_SPECIES; n++) { amrex::Real specTerm = specDiff(i, j, k, n) + extRhoY(i, j, k, n); - if (do_react) + if (do_react) { specTerm += rhoYdot(i, j, k, n); + } divu(i, j, k) += specTerm * (mwtinv[n] * Wbar * rhoinv - hi[n] * denominv); } } @@ -642,10 +643,12 @@ repair_flux_eb( for (int n = 0; n < NUM_SPECIES; n++) { sumFlux += flux(i, j, k, n); RhoYe[n] = rhoYed(i, j, k, n); - if (on_lo) + if (on_lo) { RhoYe[n] = rhoY(id_l[0], id_l[1], id_l[2], n); - if (on_hi) + } + if (on_hi) { RhoYe[n] = rhoY(i, j, k, n); + } sumRhoYe += RhoYe[n]; } sumRhoYe = 1.0_rt / sumRhoYe; @@ -844,8 +847,9 @@ buildAdvectionForcing( for (int n = 0; n < NUM_SPECIES; n++) { y[n] = rhoY(i, j, k, n) * rhoinv; // get y forceY(i, j, k, n) = dn(i, j, k, n); // forceY = Dnk - if (do_react) + if (do_react) { forceY(i, j, k, n) += r(i, j, k, n); // + Rk + } forceT(i, j, k) -= forceY(i, j, k, n) * hi_spec[n] * 0.0001_rt; // forceT -= Sum{ hk. (Rk + Dnk) } with CGS -> // MKS conversion of hk @@ -853,8 +857,9 @@ buildAdvectionForcing( } forceT(i, j, k) += extRhoH(i, j, k); - if (closed_chamber == 1) + if (closed_chamber == 1) { forceT(i, j, k) += dp0dt; // Add dp0/dt + } amrex::Real cpmix = 0.0_rt; eos.TY2Cp(T(i, j, k), y, cpmix); @@ -886,15 +891,17 @@ buildDiffusionForcing( for (int n = 0; n < NUM_SPECIES; n++) { forceY(i, j, k, n) = a(i, j, k, n) + 0.5_rt * (dn(i, j, k, n) - dnp1k(i, j, k, n)); - if (do_react) + if (do_react) { forceY(i, j, k, n) += r(i, j, k, n); + } } forceT(i, j, k) = a(i, j, k, NUM_SPECIES) + 0.5_rt * (dn(i, j, k, NUM_SPECIES) + ddn(i, j, k) - dnp1k(i, j, k, NUM_SPECIES) - ddnp1k(i, j, k)); - if (closed_chamber == 1) + if (closed_chamber == 1) { forceT(i, j, k) += dp0dt; + } } AMREX_GPU_DEVICE