Skip to content

Commit

Permalink
add subch_planar 1D support
Browse files Browse the repository at this point in the history
  • Loading branch information
brady-ryan committed Sep 5, 2024
1 parent 8521f81 commit 01c4469
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
28 changes: 12 additions & 16 deletions Exec/science/subch_planar/Problem_Derive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ void ca_dergradpoverp(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*nco

#if AMREX_SPACEDIM == 3
amrex::Error("3D not supported");
#elif AMREX_SPACEDIM == 1
return; // Skip for 1D
#endif
#if AMREX_SPACEDIM == 1
amrex::Error("1D not supported");
#endif


Real dxinv = 1.0_rt / dx[0];
Real dyinv = 1.0_rt / dx[1];
Expand Down Expand Up @@ -226,9 +226,8 @@ void ca_dergradpoverp1(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*nc

#if AMREX_SPACEDIM == 3
amrex::Error("3D not supported");
#endif
#if AMREX_SPACEDIM == 1
amrex::Error("1D not supported");
#elif AMREX_SPACEDIM == 1
return; // Skip for 1D
#endif

Real dxinv = 1.0_rt / dx[0];
Expand Down Expand Up @@ -429,9 +428,8 @@ void ca_dergradpx(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/

#if AMREX_SPACEDIM == 3
amrex::Error("3D not supported");
#endif
#if AMREX_SPACEDIM == 1
amrex::Error("1D not supported");
#elif AMREX_SPACEDIM == 1
return; // Skip for 1D
#endif

Real dxinv = 1.0_rt / dx[0];
Expand Down Expand Up @@ -540,9 +538,8 @@ void ca_dergradpy(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*ncomp*/

#if AMREX_SPACEDIM == 3
amrex::Error("3D not supported");
#endif
#if AMREX_SPACEDIM == 1
amrex::Error("1D not supported");
#elif AMREX_SPACEDIM == 1
return; // Skip for 1D
#endif

Real dxinv = 1.0_rt / dx[0];
Expand Down Expand Up @@ -653,9 +650,8 @@ void ca_dergradrhooverrho(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /

#if AMREX_SPACEDIM == 3
amrex::Error("3D not supported");
#endif
#if AMREX_SPACEDIM == 1
amrex::Error("1D not supported");
#elif AMREX_SPACEDIM == 1
return; // Skip for 1D
#endif

Real dxinv = 1.0_rt / dx[0];
Expand Down Expand Up @@ -714,4 +710,4 @@ void ca_dergradrhooverrho(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /

});

}
}
4 changes: 3 additions & 1 deletion Exec/science/subch_planar/problem_initialize_state_data.H
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ void problem_initialize_state_data (int i, int j, int k,
Real z = problo[2] + dx[2] * (static_cast<Real>(k) + 0.5_rt);
#endif

#if AMREX_SPACEDIM == 2
#if AMREX_SPACEDIM == 1
Real height = x;
#elif AMREX_SPACEDIM == 2
Real height = y;
#else
Real height = z;
Expand Down

0 comments on commit 01c4469

Please sign in to comment.