Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add subch_planar 1D support #2952

Merged
merged 4 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions Exec/science/subch_planar/Problem_Derive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ void ca_dergradpoverp(const Box& bx, FArrayBox& derfab, int /*dcomp*/, int /*nco

#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 @@ -226,9 +225,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 @@ -434,9 +432,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 @@ -545,9 +542,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 @@ -658,9 +654,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 @@ -719,4 +714,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