Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
b2bb443
Pass units to dust initialize so that we can convert input size and d…
adamdempsey90 Jan 11, 2025
f61a958
Update dust params
adamdempsey90 Jan 11, 2025
1586510
Update singularity eos
adamdempsey90 Jan 12, 2025
d0767c3
Add generated directory to singularity include path
adamdempsey90 Jan 13, 2025
5346481
remove input_units
adamdempsey90 Jan 13, 2025
72984f6
Merge remote-tracking branch 'origin/develop' into dempsey/dust_update
adamdempsey90 Jan 13, 2025
b9e1093
Merge pull request #43 from lanl/dempsey/dust_update
adamdempsey90 Jan 14, 2025
6c2a7a8
Merge pull request #44 from lanl/dempsey/singularity
adamdempsey90 Jan 18, 2025
c134eb0
Silence sprintf warning on mac. Correctly bake rpath info for rebound…
adamdempsey90 Jan 18, 2025
a412b54
Remove unnecessary set_target_properties since we now just do it manu…
adamdempsey90 Jan 18, 2025
07b8d2a
Add BUILD_RPATH back
adamdempsey90 Jan 18, 2025
0695404
Do not move rebound around
adamdempsey90 Jan 18, 2025
bc4e652
Merge branch 'dempsey/cmake_mac' of github.com:lanl/artemis into demp…
adamdempsey90 Jan 18, 2025
861a489
Add temperature to units. Add temperature conversion factor to consta…
adamdempsey90 Jan 18, 2025
1beaf57
Unit system aware singularity eos
adamdempsey90 Jan 18, 2025
633ab21
Add temperature conversion to opacities.
adamdempsey90 Jan 19, 2025
cf6fce2
Add temperature unit to splash
adamdempsey90 Jan 22, 2025
02d61f1
Revert allowing setting of base scale factors in non base specifiers
adamdempsey90 Jan 22, 2025
94f09a4
Update params for new temperature unit
adamdempsey90 Jan 22, 2025
4a4f0f3
Merge pull request #47 from lanl/dempsey/units
adamdempsey90 Jan 22, 2025
7caffff
Merge branch 'develop' into dempsey/cmake_mac
adamdempsey90 Jan 22, 2025
bf19cdb
Merge pull request #46 from lanl/dempsey/cmake_mac
adamdempsey90 Jan 22, 2025
e1e7527
Convert to cgs
adamdempsey90 Jan 22, 2025
335fad8
Add powerlaw opacity
adamdempsey90 Jan 22, 2025
ea5f638
Remove unphysical opacity models. Add powerlaw model
adamdempsey90 Jan 22, 2025
f05b652
Remove unused variables from pack
adamdempsey90 Jan 22, 2025
f12bc7e
Cgs units
adamdempsey90 Jan 22, 2025
6094b1b
Update parameters
adamdempsey90 Jan 23, 2025
f1d3ff9
Update parthenon to fix jaybenne problem
adamdempsey90 Jan 23, 2025
a1c4de3
Store mu and cv in params
adamdempsey90 Jan 23, 2025
ef426a4
Go to true cgs
adamdempsey90 Jan 23, 2025
3818e0f
Update citation
adamdempsey90 Jan 23, 2025
4008bb9
Update to v4 of upload/download artifacts
adamdempsey90 Jan 23, 2025
bd93848
Add a thermal relaxation test
Jan 27, 2025
5bca683
Format new test
Jan 27, 2025
0601078
Add rad_shock test to CI
Jan 30, 2025
d7818dc
Add the exact solution computed by Quokka script
Jan 30, 2025
6aee8d3
Include new radiation tests in serial suite
Jan 30, 2025
051d92a
Don't use LaTex formatting for CI artifacts
Jan 30, 2025
0ea4438
Merge branch 'develop' into nu-disk
smao-astro Feb 2, 2025
05ad586
merge env/bash from develop
smao-astro Feb 2, 2025
dcbc9c3
remove unused lines
smao-astro Feb 3, 2025
31c2762
add comments to drag.hpp
smao-astro Feb 4, 2025
578c823
CartToSph returns ex1,ex2,ex3, not er,et,ep
adamdempsey90 Feb 4, 2025
2cf920d
Merge pull request #48 from lanl/dempsey/rad_cgs
adamdempsey90 Feb 4, 2025
edf179b
Merge remote-tracking branch 'origin/develop' into dempsey/sink
adamdempsey90 Feb 4, 2025
db7c9dd
Merge pull request #51 from lanl/dempsey/sink
adamdempsey90 Feb 4, 2025
597b19e
merging nudisk into disk pgen
smao-astro Feb 4, 2025
3472d31
fix typo
smao-astro Feb 5, 2025
ceedabf
fix error: identifier vd is undefined
smao-astro Feb 5, 2025
ede9a20
fix bug
smao-astro Feb 5, 2025
c133e84
move vk2 outside if block
smao-astro Feb 5, 2025
61f69f7
fix bug
smao-astro Feb 5, 2025
016198d
Merge remote-tracking branch 'origin/develop' into nu-disk
smao-astro Feb 5, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ jobs:
--log_file=ci_cpu_log.txt
- name: Upload logs
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: logs
path: tst/testing/logs
retention-days: 3
- name: Upload figures
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: figs
path: tst/testing/figs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ jobs:
--log_file=ci_cpu_log.txt
- name: Upload CPU test log
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ci_cpu_log.txt
path: tst/ci_cpu_log.txt
retention-days: 3
- name: Upload figures
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: figs
path: tst/figs
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ if(ARTEMIS_ENABLE_ASAN)
add_link_options(-fsanitize=address -fsanitize=undefined)
endif()

if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
# silence sprintf warnings on mac
add_compile_options(-Wno-deprecated-declarations)
endif()

# NOTE(@jonahm): For some reason, order still matters for including
# parthenon and singularity. Likely has to do with project
# includes other than Kokkos. MPI and OpenMP likely culprits.
Expand Down Expand Up @@ -186,7 +191,8 @@ set(ARTEMIS_SINGULARITY_INCLUDE_PATHS
${CMAKE_CURRENT_SOURCE_DIR}/external/singularity-eos/utils/variant/include
${CMAKE_CURRENT_SOURCE_DIR}/external/singularity-opac/utils
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR})
${CMAKE_CURRENT_SOURCE_DIR}
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/generated>)

# Set Jaybenne config options and paths
# NOTE(@pdmullen): For the life of us, we are still not sure why we can't treat
Expand Down
60 changes: 28 additions & 32 deletions env/bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,35 @@ export ARTEMIS_HOME="${exec_dir%/env}"

export MAKE_PROGRAM=${MAKE_PROGRAM:-make}

export PARTITION="venado-gh"

# Identify partitions based on SLURM_JOB_PARTITION and HOSTNAME variables
#PARTITION="unknown"
#if [[ $HOSTNAME == ch-fe* || $SLURM_CLUSTER_NAME == "chicoma" ]]; then
# if [[ $SLURM_JOB_PARTITION == *gpu* ]]; then
# PARTITION="chicoma-gpu"
# else
# PARTITION="chicoma-cpu"
# fi
#elif [[ "$HOSTNAME" =~ ^ve-rfe[1-7]$ || "$HOSTNAME" =~ ^ve-fe[1-7]$ ]]; then
# if [[ $SLURM_GPUS_ON_NODE > 0 || ("$HOSTNAME" =~ ^ve-rfe[1-3]$ || "$HOSTNAME" =~ ^ve-fe[1-3]$) ]]; then
# PARTITION="venado-gh"
# elif [[ $SLURM_GPUS_ON_NODE == 0 || ("$HOSTNAME" =~ ^ve-rfe[4-7]$ || "$HOSTNAME" =~ ^ve-fe[4-7]$) ]]; then
# PARTITION="venado-gg"
# fi
#else # Catch-all for Darwin
# if [ -z "$SLURM_JOB_PARTITION" ]; then
# if [[ $HOSTNAME == darwin-fe* ]]; then
# echo "Do not compile on Darwin frontend nodes; use a specific partition!"
# echo "Supported partitions are"
# echo " skylake-gold"
# echo " volta-x86"
# echo "...setup FAILED"
# fi
# elif [[ $SLURM_JOB_PARTITION == "power9-rhel7" ]]; then
# PARTITION="darwin-power9-rhel7"
# elif [[ $SLURM_JOB_PARTITION == "skylake-gold" ]]; then
# PARTITION="darwin-skylake-gold"
# elif [[ $SLURM_JOB_PARTITION == "volta-x86" ]]; then
# PARTITION="darwin-volta-x86"
# fi
#fi
PARTITION="unknown"
if [[ $HOSTNAME == ch-fe* || $SLURM_CLUSTER_NAME == "chicoma" ]]; then
if [[ $SLURM_JOB_PARTITION == *gpu* ]]; then
PARTITION="chicoma-gpu"
else
PARTITION="chicoma-cpu"
fi
elif [[ "$HOST" =~ ^ve-rfe[1-7]$ || "$HOST" =~ ^ve-fe[1-7]$ ]]; then
if [[ $SLURM_GPUS_ON_NODE > 0 || ("$HOST" =~ ^ve-rfe[1-3]$ || "$HOST" =~ ^ve-fe[1-3]$) ]]; then
PARTITION="venado-gh"
elif [[ $SLURM_GPUS_ON_NODE == 0 || ("$HOST" =~ ^ve-rfe[4-7]$ || "$HOST" =~ ^ve-fe[4-7]$) ]]; then
PARTITION="venado-gg"
fi
else # Catch-all for Darwin
if [[ $HOSTNAME == darwin-fe* ]]; then
echo "Currently on darwin frontend node; formatting is supported but not compilation"
echo "Supported partitions are"
echo " skylake-gold"
echo " volta-x86"
PARTITION="darwin-fe"
elif [[ $SLURM_JOB_PARTITION == "power9-rhel7" ]]; then
PARTITION="darwin-power9-rhel7"
elif [[ $SLURM_JOB_PARTITION == "skylake-gold" ]]; then
PARTITION="darwin-skylake-gold"
elif [[ $SLURM_JOB_PARTITION == "volta-x86" ]]; then
PARTITION="darwin-volta-x86"
fi
fi

# Absolute path for conda environment can be too long
function shorten_prompt {
Expand Down
2 changes: 1 addition & 1 deletion external/singularity-eos
Submodule singularity-eos updated 176 files
2 changes: 1 addition & 1 deletion external/singularity-opac
Submodule singularity-opac updated 28 files
+102 −13 README.md
+1 −1 cmake/SetupOptions.cmake
+38 −33 singularity-opac/constants/constants.hpp
+5 −0 singularity-opac/neutrinos/brt_neutrinos.hpp
+5 −0 singularity-opac/neutrinos/gray_opacity_neutrinos.hpp
+1 −5 singularity-opac/neutrinos/mean_neutrino_variant.hpp
+14 −3 singularity-opac/neutrinos/mean_opacity_neutrinos.hpp
+1 −5 singularity-opac/neutrinos/neutrino_variant.hpp
+14 −0 singularity-opac/neutrinos/non_cgs_neutrinos.hpp
+177 −17 singularity-opac/neutrinos/spiner_opac_neutrinos.hpp
+2 −2 singularity-opac/neutrinos/thermal_distributions_neutrinos.hpp
+7 −2 singularity-opac/neutrinos/tophat_emissivity_neutrinos.hpp
+7 −2 singularity-opac/photons/epbremsstrahlung_opacity_photons.hpp
+19 −0 singularity-opac/photons/example_ascii/kap_plaw.txt
+103 −0 singularity-opac/photons/example_ascii/preproc_ascii_opac.py
+7 −4 singularity-opac/photons/gray_opacity_photons.hpp
+167 −33 singularity-opac/photons/mean_opacity_photons.hpp
+31 −0 singularity-opac/photons/mean_photon_types.hpp
+23 −5 singularity-opac/photons/mean_photon_variant.hpp
+32 −5 singularity-opac/photons/non_cgs_photons.hpp
+1 −5 singularity-opac/photons/photon_variant.hpp
+7 −4 singularity-opac/photons/powerlaw_opacity_photons.hpp
+2 −2 singularity-opac/photons/thermal_distributions_photons.hpp
+5 −0 test/CMakeLists.txt
+64 −0 test/test_gray_opacities.cpp
+162 −6 test/test_mean_opacities.cpp
+5 −1 utils/fast-math/logs.hpp
+1 −1 utils/spiner
85 changes: 49 additions & 36 deletions inputs/radiation/rad_shock.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
<artemis>
problem = shock # name of the pgen
coordinates = cartesian # coordinate system
physical_units = cgs # not scale-free
unit_conversion = base # [L/T/M/Temp] = 1
time = 1.0e-10 # time unit
length = 0.01575 # length unit
mass = 3.906984375e-6 # mass unit (implying dunit=1.0)
temperature = 2.18e6 # temperature unit

<parthenon/job>
problem_id = shock # problem ID: basename of output filenames
Expand All @@ -23,65 +29,72 @@ variables = gas.prim.density, &
gas.prim.velocity, &
gas.prim.sie, &
field.jaybenne.energy_tally
file_type = hdf5 # HDF5 data dump
dt = 0.01 # time increment between outputs
file_type = hdf5 # HDF5 data dump
dt = 1.0 # time increment between outputs

<parthenon/time>
nlim = -1 # cycle limit
tlim = 0.05 # time limit
integrator = rk2 # time integration algorithm
nlim = -1 # cycle limit
tlim = 6.0 # time limit
integrator = rk2 # time integration algorithm

<parthenon/mesh>
nx1 = 512 # Number of zones in X1-direction
x1min = -0.01 # minimum value of X1
x1max = 0.01 # maximum value of X1
nx1 = 128 # Number of zones in X1-direction
x1min = 0.0 # minimum value of X1
x1max = 1.0 # maximum value of X1
ix1_bc = ic # inner-X1 boundary flag
ox1_bc = ic # outer-X1 boundary flag

nx2 = 1 # Number of zones in X2-direction
x2min = -0.01 # minimum value of X2
x2max = 0.01 # maximum value of X2
x2min = 0.0 # minimum value of X2
x2max = 1.0 # maximum value of X2
ix2_bc = periodic # inner-X2 boundary flag
ox2_bc = periodic # outer-X2 boundary flag

nx3 = 1 # Number of zones in X3-direction
x3min = -0.01 # minimum value of X3
x3max = 0.01 # maximum value of X3
x3min = 0.0 # minimum value of X3
x3max = 1.0 # maximum value of X3
ix3_bc = periodic # inner-X3 boundary flag
ox3_bc = periodic # outer-X3 boundary flag

<parthenon/swarm>
ix1_bc = jaybenne_reflecting
ox1_bc = jaybenne_reflecting
ix2_bc = periodic
ox2_bc = periodic
ix3_bc = periodic
ox3_bc = periodic
ix1_bc = jaybenne_reflecting # inner-X1 boundary flag for swarms
ox1_bc = jaybenne_reflecting # outer-X1 boundary flag for swarms
ix2_bc = periodic # inner-X2 boundary flag for swarms
ox2_bc = periodic # outer-X2 boundary flag for swarms
ix3_bc = periodic # inner-X3 boundary flag for swarms
ox3_bc = periodic # outer-X3 boundary flag for swarms

<parthenon/meshblock>
nx1 = 64 # Number of cells in each MeshBlock, X1-dir
nx2 = 1 # Number of cells in each MeshBlock, X2-dir
nx3 = 1 # Number of cells in each MeshBlock, X3-dir
nx1 = 128 # Number of cells in each MeshBlock, X1-dir
nx2 = 1 # Number of cells in each MeshBlock, X2-dir
nx3 = 1 # Number of cells in each MeshBlock, X3-dir

<physics>
gas = true
radiation = true
gas = true # enable gas hydrodynamics
radiation = true # enable IMC radiation

<gas>
gamma = 1.666666 # adiabatic index
cv = 1.5 # specific heat
cfl = 0.8
reconstruct = plm
riemann = hllc
dfloor = 1.0e-10
siefloor = 1.0e-10
gamma = 1.666666 # adiabatic index
mu = 1.008 # mean molecular weight
cfl = 0.8 # CFL number
reconstruct = plm # reconstruction algorithm
riemann = hllc # Riemann solver

<gas/opacity/absorption>
opacity_model = shocktube_a # absorption opacity model
coef_kappa_a = 577.35 # kappa_a,0 constant
rho_exp = -1.0 # dens exponent for opacity powerlaw
temp_exp = 0.0 # temp exponent for opacity powerlaw
opacity_model = powerlaw # absorption opacity model
coef_kappa_a = 577.0 # kappa_a,0 constant (must be passed in cgs)
rho_exp = -1.0 # dens exponent for opacity powerlaw
temp_exp = 0.0 # temp exponent for opacity powerlaw

<jaybenne>
num_particles = 10000
use_ddmc = false
num_particles = 100000 # particle resolution
use_ddmc = false # use DDMC?

<problem>
rhol = 5.69 # density (left)
rhor = 17.1 # density (right)
vxl = 0.329524 # x-velocity (left)
vxr = 0.109841 # x-velocity (right)
tl = 1.0 # gas and radiation temp (left)
tr = 3.66055 # gas and radiation temp (right)
xdisc = 0.828571 # discontinuity position
21 changes: 12 additions & 9 deletions inputs/radiation/thermalization.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

<artemis>
problem = thermalization # name of the pgen
physical_units = cgs
unit_conversion = base
coordinates = cartesian # coordinate system

<parthenon/job>
Expand All @@ -24,12 +26,12 @@ variables = gas.prim.density, &
gas.prim.sie, &
field.jaybenne.energy_tally
file_type = hdf5 # HDF5 data dump
dt = 0.01 # time increment between outputs
dt = 1.0e-9 # time increment between outputs

<parthenon/time>
nlim = -1 # cycle limit
tlim = 5.0 # time limit
integrator = rk2 # time integration algorithm
nlim = -1 # cycle limit
tlim = 6.0e-8 # time limit
integrator = rk1 # time integration algorithm

<parthenon/mesh>
nx1 = 4 # Number of zones in X1-direction
Expand Down Expand Up @@ -60,22 +62,23 @@ gas = true
radiation = true

<gas>
gamma = 2.0 # adiabatic index
cv = 8.0 # specific heat
gamma = 1.4 # adiabatic index
mu = 28.96 # mean molecular weight
cfl = 0.8
reconstruct = plm
riemann = hllc
dfloor = 1.0e-10
siefloor = 1.0e-10

<gas/opacity/absorption>
opacity_model = thermalization
kappa_a = 1.0
opacity_model = constant
kappa_a = 2.0

# <gas/opacity/scattering>
# scattering_model = constant
# kappa_s = 10.0

<jaybenne>
dt = 0.01
dt = 1.0e-10
num_particles = 1000
use_ddmc = true
16 changes: 11 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ set (SRC_LIST
pgen/conduction.hpp
pgen/constant.hpp
pgen/disk.hpp
pgen/nu_disk.hpp
pgen/gaussian_bump.hpp
pgen/linear_wave.hpp
pgen/pgen.hpp
Expand Down Expand Up @@ -145,8 +144,15 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
message(STATUS "Standalone mode. Adding artemis executable")
add_executable(artemis main.cpp)
target_link_libraries(artemis PRIVATE artemislib)
add_custom_command(TARGET artemis POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_BINARY_DIR}/rebound/librebound.so
$<TARGET_FILE_DIR:artemis>)

# Bake in rpath to rebound on mac
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set_target_properties(artemis PROPERTIES
BUILD_RPATH "${CMAKE_BINARY_DIR}/rebound"
)
add_custom_command(TARGET artemis POST_BUILD
COMMAND install_name_tool -add_rpath @executable_path/../rebound $<TARGET_FILE:artemis>
COMMAND install_name_tool -change librebound.so @rpath/librebound.so $<TARGET_FILE:artemis>
)
endif()
endif()
2 changes: 1 addition & 1 deletion src/artemis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Packages_t ProcessPackages(std::unique_ptr<ParameterInput> &pin) {
if (do_nbody) packages.Add(NBody::Initialize(pin.get(), constants));
if (do_gravity) packages.Add(Gravity::Initialize(pin.get(), constants, packages));
if (do_gas) packages.Add(Gas::Initialize(pin.get(), units, constants, packages));
if (do_dust) packages.Add(Dust::Initialize(pin.get()));
if (do_dust) packages.Add(Dust::Initialize(pin.get(), units));
if (do_rotating_frame) packages.Add(RotatingFrame::Initialize(pin.get()));
if (do_cooling) packages.Add(Gas::Cooling::Initialize(pin.get()));
if (do_drag) packages.Add(Drag::Initialize(pin.get()));
Expand Down
8 changes: 6 additions & 2 deletions src/artemis_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ artemis:
cgs:
_type: opt
_description: "CGS unit system"
unit_conversion:
unit_specifier:
_type: "string"
_default: "base"
_description: "How to provide unit conversions between code and physical units"
base:
_type: opt
_description: "Provide base unit conversions (length, time, mass)"
_description: "Provide base unit conversions (length, time, mass, temperature)"
ppd:
_type: opt
_description: "AU, Year/(2 pi), solar mass units for protoplanetary disks"
Expand All @@ -55,6 +55,10 @@ artemis:
_type: "Real"
_default: "1.0"
_description: "Physical units value of mass equal to 1 code unit"
temperature:
_type: "Real"
_default: "1.0"
_description: "Physical units value of temperature equal to 1 code unit"


physics:
Expand Down
1 change: 1 addition & 0 deletions src/drag/drag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ std::shared_ptr<StateDescriptor> Initialize(ParameterInput *pin) {
params.Add("x2max", pin->GetReal("parthenon/mesh", "x2max"));
params.Add("x3max", pin->GetReal("parthenon/mesh", "x3max"));

params.Add("profile",pin->GetString("problem", "profile"));
params.Add("dslope",pin->GetReal("problem", "dslope"));
params.Add("tslope",pin->GetReal("problem", "tslope"));
params.Add("h0",pin->GetReal("problem", "h0"));
Expand Down
Loading