Skip to content

Commit

Permalink
Merge branch 'development' into BenWibking/new-shock-cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWibking authored Feb 4, 2024
2 parents d3fa3a8 + ae42169 commit 59b61c2
Show file tree
Hide file tree
Showing 11 changed files with 675 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .ci/azure-pipelines-aarch64-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- task: CMake@1
displayName: 'Run CTest'
inputs:
cmakeArgs: '-E chdir . ctest -j 2 -T Test --output-on-failure'
cmakeArgs: '-E chdir . ctest -j 2 -T Test -E "RadhydroPulseMG*" --output-on-failure'

- task: PublishTestResults@2
inputs:
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ add_subdirectory(RadhydroShockCGS)
add_subdirectory(RadhydroShockMultigroup)
add_subdirectory(RadhydroUniformAdvecting)
add_subdirectory(RadhydroPulse)
add_subdirectory(RadhydroPulseMG)

add_subdirectory(ODEIntegration)
add_subdirectory(Cooling)
Expand Down
15 changes: 12 additions & 3 deletions src/RadShadow/test_radiation_shadow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "AMReX_Print.H"
#include "AMReX_REAL.H"

#include "physics_info.hpp"
#include "radiation_system.hpp"
#include "test_radiation_shadow.hpp"

Expand Down Expand Up @@ -47,6 +48,15 @@ template <> struct RadSystem_Traits<ShadowProblem> {
static constexpr bool compute_v_over_c_terms = true;
};

template <> struct Physics_Traits<ShadowProblem> {
static constexpr bool is_hydro_enabled = false;
static constexpr int numMassScalars = 0; // number of mass scalars
static constexpr int numPassiveScalars = numMassScalars + 0; // number of passive scalars
static constexpr bool is_radiation_enabled = true;
static constexpr bool is_mhd_enabled = false;
static constexpr int nGroups = 1;
};

template <>
AMREX_GPU_HOST_DEVICE auto RadSystem<ShadowProblem>::ComputePlanckOpacity(const double rho, const double /*Tgas*/) -> quokka::valarray<double, nGroups_>
{
Expand Down Expand Up @@ -212,9 +222,8 @@ auto problem_main() -> int
return false;
};

constexpr int nvars = 9;
amrex::Vector<amrex::BCRec> BCs_cc(nvars);
for (int n = 0; n < nvars; ++n) {
amrex::Vector<amrex::BCRec> BCs_cc(Physics_Indices<ShadowProblem>::nvarTotal_cc);
for (int n = 0; n < Physics_Indices<ShadowProblem>::nvarTotal_cc; ++n) {
BCs_cc[n].setLo(0, amrex::BCType::ext_dir); // left x1 -- streaming
BCs_cc[n].setHi(0, amrex::BCType::foextrap); // right x1 -- extrapolate
for (int i = 1; i < AMREX_SPACEDIM; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion src/RadhydroPulse/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ if (AMReX_SPACEDIM EQUAL 1)
endif(AMReX_GPU_BACKEND MATCHES "CUDA")

add_test(NAME RadhydroPulse COMMAND test_radhydro_pulse RadhydroPulse.in WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
endif()
endif()
9 changes: 9 additions & 0 deletions src/RadhydroPulseMG/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if (AMReX_SPACEDIM EQUAL 1)
add_executable(test_radhydro_pulse_MG test_radhydro_pulse_MG.cpp ../fextract.cpp ${QuokkaObjSources})

if(AMReX_GPU_BACKEND MATCHES "CUDA")
setup_target_for_cuda_compilation(test_radhydro_pulse_MG)
endif(AMReX_GPU_BACKEND MATCHES "CUDA")

add_test(NAME RadhydroPulseMG COMMAND test_radhydro_pulse_MG RadhydroPulse.in WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
endif()
Loading

0 comments on commit 59b61c2

Please sign in to comment.