Skip to content

Commit 2a001f0

Browse files
authored
Update pelephysics submod (#968)
1 parent c443486 commit 2a001f0

File tree

31 files changed

+58
-81
lines changed

31 files changed

+58
-81
lines changed

CMake/BuildPeleExe.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function(build_pele_exe pele_exe_name pele_physics_lib_name)
7878
${SRC_DIR}/Tagging.cpp
7979
${SRC_DIR}/Timestep.H
8080
${SRC_DIR}/TransCoeff.H
81-
${SRC_DIR}/Utilities.H
81+
${SRC_DIR}/PeleCUtilities.H
8282
${SRC_DIR}/Utilities.cpp
8383
${SRC_DIR}/WENO.H
8484
${SRC_DIR}/RotSource.cpp

CMake/BuildPelePhysicsLib.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ function(build_pele_physics_lib pele_physics_lib_name)
5757
${PELE_PHYSICS_UTILITY_DIR}/BlackBoxFunction/Table.H)
5858
target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_UTILITY_DIR}/BlackBoxFunction)
5959

60+
target_sources(${pele_physics_lib_name}
61+
PRIVATE
62+
${PELE_PHYSICS_UTILITY_DIR}/Utilities/Utilities.H
63+
${PELE_PHYSICS_UTILITY_DIR}/Utilities/UnitConversions.H)
64+
target_include_directories(${pele_physics_lib_name} PUBLIC ${PELE_PHYSICS_UTILITY_DIR}/Utilities)
65+
6066
target_sources(${pele_physics_lib_name}
6167
PRIVATE
6268
${PELE_PHYSICS_UTILITY_DIR}/Filter/Filter.cpp

Docs/sphinx/Equations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Primitive Forms
7474
PeleC uses the primitive form of the inviscid fluid equations, defined in terms of
7575
the state :math:`\mathbf{Q} = (\rho, \mathbf{u}, p, \rho e, Y_k, A_k, B_k)`, to construct the
7676
interface states that are input to the Riemann problem. All of the primitive variables are derived from the conservative state
77-
vector. This task is performed in the function ``pc_ctoprim`` located in ``Source/Utilities.H``.
77+
vector. This task is performed in the function ``pc_ctoprim`` located in ``Source/PeleCUtilities.H``.
7878

7979
The inviscid equations for primitive variables namely density, velocity, and pressure are:
8080

Exec/Make.PeleC

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ Blocs += $(UTILITY_HOME)/Filter
4444
Bpack += $(UTILITY_HOME)/BlackBoxFunction/Make.package
4545
Blocs += $(UTILITY_HOME)/BlackBoxFunction
4646

47+
Bpack += $(UTILITY_HOME)/Utilities/Make.package
48+
Blocs += $(UTILITY_HOME)/Utilities
49+
4750
all: $(executable)
4851
ifneq ($(KEEP_BUILDINFO_CPP),TRUE)
4952
$(SILENT) $(RM) AMReX_buildInfo.cpp

Exec/Production/CavityFlame/prob.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#include "ProblemSpecificFunctions.H"
2222
#include "prob_parm.H"
23-
#include "Utilities.H"
23+
#include "PeleCUtilities.H"
2424
#include "turbinflow.H"
2525

2626
AMREX_GPU_DEVICE

Exec/Production/ChallengeProblem/prob.H

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "ProblemSpecificFunctions.H"
2121
#include "Tagging.H"
2222
#include "Transport.H"
23-
#include "Utilities.H"
23+
#include "PeleCUtilities.H"
2424
#include "prob_parm.H"
2525
#include "Geometry.H"
2626

@@ -97,7 +97,8 @@ pc_initdata(
9797
amrex::Real slp[3] = {0.0};
9898
for (int cnt = 0; cnt < 3; cnt++) {
9999
mod[cnt] = std::fmod(x[cnt], prob_parm.Linput);
100-
locate(prob_parm.d_xarray, prob_parm.inres, mod[cnt], idx[cnt]);
100+
pele::physics::utilities::locate(
101+
prob_parm.d_xarray, prob_parm.inres, mod[cnt], idx[cnt]);
101102
idxp1[cnt] = (idx[cnt] + 1) % prob_parm.inres;
102103
slp[cnt] =
103104
(mod[cnt] - prob_parm.d_xarray[idx[cnt]]) / prob_parm.d_xdiff[idx[cnt]];

Exec/Production/JetFlame/prob.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#include "ProblemSpecificFunctions.H"
2222
#include "prob_parm.H"
23-
#include "Utilities.H"
23+
#include "PeleCUtilities.H"
2424
#include "turbinflow.H"
2525

2626
AMREX_GPU_DEVICE

Exec/Production/PistonBowl/prob.H

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "ProblemSpecificFunctions.H"
2121
#include "Tagging.H"
2222
#include "Transport.H"
23-
#include "Utilities.H"
23+
#include "PeleCUtilities.H"
2424
#include "prob_parm.H"
2525
#include "Geometry.H"
2626

@@ -70,17 +70,19 @@ InterpolateVelInflow(
7070
amrex::Real radSI = radius * 0.01;
7171
// Get radius location for interpolation
7272
int idR = 0;
73-
locate(prob_parm.d_rM, prob_parm.nr, radSI, idR);
73+
pele::physics::utilities::locate(prob_parm.d_rM, prob_parm.nr, radSI, idR);
7474
int idRp1 = idR + 1;
7575

7676
theta = std::fmod(theta, prob_parm.thetaMax);
7777
int idT = 0;
78-
locate(prob_parm.d_thetaM, prob_parm.nt, theta, idT);
78+
pele::physics::utilities::locate(
79+
prob_parm.d_thetaM, prob_parm.nt, theta, idT);
7980
const int idTp1 = idT + 1;
8081

8182
amrex::Real timeInflow = std::fmod(timeInp, prob_parm.timeInflowMax);
8283
int indxTime = 0;
83-
locate(prob_parm.d_timeInput, prob_parm.inflowNtime, timeInflow, indxTime);
84+
pele::physics::utilities::locate(
85+
prob_parm.d_timeInput, prob_parm.inflowNtime, timeInflow, indxTime);
8486
const int indxTimeP1 = indxTime + 1;
8587

8688
// Interpolate in space
@@ -250,7 +252,8 @@ pc_initdata(
250252
amrex::Real slp[3] = {0.0};
251253
for (int cnt = 0; cnt < 3; cnt++) {
252254
mod[cnt] = std::fmod(x[cnt], prob_parm.Linput);
253-
locate(prob_parm.d_xarray, prob_parm.inres, mod[cnt], idx[cnt]);
255+
pele::physics::utilities::locate(
256+
prob_parm.d_xarray, prob_parm.inres, mod[cnt], idx[cnt]);
254257
idxp1[cnt] = (idx[cnt] + 1) % prob_parm.inres;
255258
slp[cnt] =
256259
(mod[cnt] - prob_parm.d_xarray[idx[cnt]]) / prob_parm.d_xdiff[idx[cnt]];

Exec/RegTests/EB-ConvergingNozzle/prob.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "prob_parm.H"
1818
#include "EB.H"
1919
#include <AMReX_EB2_IF_Rotation.H>
20-
#include "Utilities.H"
20+
#include "PeleCUtilities.H"
2121
#include "Geometry.H"
2222

2323
void parse_params(std::unique_ptr<ProbParmDevice>& prob_parm_device);

Exec/RegTests/EB-EnclosedVortex/prob.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "prob_parm.H"
1919
#include "EB.H"
2020
#include <AMReX_EB2_IF_Rotation.H>
21-
#include "Utilities.H"
21+
#include "PeleCUtilities.H"
2222
#include "Geometry.H"
2323

2424
void parse_params(std::unique_ptr<ProbParmDevice>& prob_parm_device);

0 commit comments

Comments
 (0)