Skip to content
Draft
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "external/kokkos"]
path = external/Kokkos
url = https://github.com/kokkos/kokkos.git
[submodule "external/rummy"]
path = external/rummy
url = https://github.com/lanl/rummy.git
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,22 @@ set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/parthenon")
set(DOC_GEN_PATH "${CMAKE_SOURCE_DIR}/doc/sphinx/src/generated" CACHE STRING
"Path to save generated data for docs.")

find_package(Rummy QUIET)

if (NOT Rummy_FOUND)
# If Rummy is not found, instead use the git submodule
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/rummy/single_include)
# Unable to find the header files for Rummy or they don't exist
message(STATUS "Downloading Rummy submodule.")

# Clone the submodule
execute_process(COMMAND git submodule update --init --force -- external/rummy WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()

add_subdirectory(external/rummy)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/external/rummy/contrib")
endif()

add_subdirectory(src)
add_subdirectory(example)
add_subdirectory(benchmarks)
Expand Down
44 changes: 22 additions & 22 deletions example/advection/parthinput.advection
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@
# ========================================================================================

<parthenon/job>
problem_id = advection
problem_id = "advection"

<parthenon/mesh>
refinement = adaptive
refinement = "adaptive"
numlevel = 3

nx1 = 64
x1min = -0.5
x1max = 0.5
ix1_bc = periodic
ox1_bc = periodic
ix1_bc = "periodic"
ox1_bc = "periodic"

nx2 = 64
x2min = -0.5
x2max = 0.5
ix2_bc = periodic
ox2_bc = periodic
ix2_bc = "periodic"
ox2_bc = "periodic"

nx3 = 1
x3min = -0.5
x3max = 0.5
ix3_bc = periodic
ox3_bc = periodic
ix3_bc = "periodic"
ox3_bc = "periodic"

<parthenon/meshblock>
nx1 = 16
Expand All @@ -48,15 +48,15 @@ nx3 = 1
<parthenon/time>
nlim = -1
tlim = 1.0
integrator = rk2
integrator = "rk2"
ncycle_out_mesh = -10000

<Advection>
cfl = 0.45
vx = 1.0
vy = 1.0
vz = 1.0
profile = hard_sphere
profile = "hard_sphere"

refine_tol = 0.3 # control the package specific refinement tagging function
derefine_tol = 0.03
Expand All @@ -66,28 +66,28 @@ vec_size = 1 # size of each variable
fill_derived = false # whether to fill one-copy test vars

<parthenon/output1>
file_type = rst
file_type = "rst"
dt = 0.05

<parthenon/output0>
file_type = hdf5
file_type = "hdf5"
dt = 0.05
variables = advected, advected_1, & # comments are ok
one_minus_advected, &
one_minus_advected_sq, & # on every (& characters are ok in comments)
one_minus_sqrt_one_minus_advected_sq, & # line
my_derived_var
variables = "advected", "advected_1", & # comments are ok
"one_minus_advected", &
"one_minus_advected_sq", & # on every (& characters are ok in comments)
"one_minus_sqrt_one_minus_advected_sq", & # line
"my_derived_var"

<parthenon/output3>
file_type = hst
file_type = "hst"
dt = 0.05

<parthenon/output4>
file_type = hst
file_type = "hst"
dt = 0.1
packages = advection_app
packages = "advection_app"

<parthenon/output5>
file_type = ascent
file_type = "ascent"
dt = -0.05 # soft disabled by default, as Ascent is an optional dependency
actions_file = custom_ascent_actions.yaml
actions_file = "custom_ascent_actions.yaml"
8 changes: 4 additions & 4 deletions example/boundary_exchange/parthinput.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# ========================================================================================

<parthenon/job>
problem_id = boundary_exchange
problem_id = "boundary_exchange"

<parthenon/mesh>
refinement = static
refinement = "static"
numlevel = 1
# The structure of the mesh is built in main as a forest

Expand All @@ -29,6 +29,6 @@ nx2 = 4
nx3 = 1

<parthenon/output0>
file_type = hdf5
file_type = "hdf5"
ghost_zones = true
variables = morton_num
variables = "morton_num"
20 changes: 10 additions & 10 deletions example/calculate_pi/parthinput.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
# ========================================================================================

<parthenon/job>
problem_id = pi_calculator
problem_id = "pi_calculator"

<parthenon/mesh>
refinement = adaptive
refinement = "adaptive"
numlevel = 5

nx1 = 64
x1min = -2.0
x1max = 2.0
ix1_bc = outflow
ox1_bc = outflow
ix1_bc = "outflow"
ox1_bc = "outflow"

nx2 = 64
x2min = -2.0
x2max = 2.0
ix2_bc = outflow
ox2_bc = outflow
ix2_bc = "outflow"
ox2_bc = "outflow"

nx3 = 1
x3min = -0.5
Expand All @@ -48,8 +48,8 @@ nx2 = 8
nx3 = 1

<parthenon/refinement0>
field = in_or_out # the name of the variable we want to refine on
method = derivative_order_1 # selects the first derivative method
field = "in_or_out" # the name of the variable we want to refine on
method = "derivative_order_1" # selects the first derivative method
refine_tol = 0.5 # tag for refinement if |(dfield/dx)/field| > refine_tol
derefine_tol = 0.05 # tag for derefinement if |(dfield/dx)/field| < derefine_tol
max_level = 2 # if set, limits refinement level from this criteria to no greater than max_level
Expand All @@ -59,5 +59,5 @@ radius = 1.5
use_sparse = 0 # Set to 1 to use sparse variables

<parthenon/output0>
file_type = hdf5
variables = in_or_out
file_type = "hdf5"
variables = "in_or_out"
30 changes: 15 additions & 15 deletions example/diffusion/parthinput.diffusion
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@
# ========================================================================================

<parthenon/job>
problem_id = diffusion
problem_id = "diffusion"

<parthenon/mesh>
refinement = static
refinement = "static"
multigrid = true

nx1 = 64
x1min = -1.0
x1max = 1.0
ix1_bc = outflow
ox1_bc = outflow
ix1_bc = "outflow"
ox1_bc = "outflow"

nx2 = 64
x2min = -1.0
x2max = 1.0
ix2_bc = outflow
ox2_bc = outflow
ix2_bc = "outflow"
ox2_bc = "outflow"

nx3 = 1
x3min = 0.0
x3max = 1.0
ix3_bc = periodic
ox3_bc = periodic
ix3_bc = "periodic"
ox3_bc = "periodic"

<parthenon/meshblock>
nx1 = 32
Expand All @@ -48,25 +48,25 @@ nx3 = 1
<parthenon/time>
nlim = -1
tlim = 0.02
integrator = rk1
integrator = "rk1"
#ncycle_out_mesh = -10000

<parthenon/output0>
file_type = hdf5
file_type = "hdf5"
dt = 0.0001
variables = diffusion.u
variables = "diffusion.u"
ghost_zones = false

<parthenon/static_refinement0>
x1min = -0.15
x1max = +0.15
x1max = 0.15
x2min = -0.15
x2max = +0.15
x2max = 0.15
level = 3

<diffusion>
#solver = BiCGSTAB # or MG
solver = MG
solver = "MG"
flux_correct = true
diagonal_alpha = 1.0
cfl = 10.0
Expand All @@ -82,5 +82,5 @@ precondition = true
max_iterations = 20
residual_tolerance = 1.e-9
print_per_step = true
smoother = SRJ2
smoother = "SRJ2"
do_FAS = true
26 changes: 13 additions & 13 deletions example/fine_advection/parthinput.advection
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@
# ========================================================================================

<parthenon/job>
problem_id = advection
problem_id = "advection"

<parthenon/mesh>
refinement = adaptive
refinement = "adaptive"
numlevel = 3

nx1 = 64
x1min = -0.5
x1max = 0.5
ix1_bc = periodic
ox1_bc = periodic
ix1_bc = "periodic"
ox1_bc = "periodic"

nx2 = 64
x2min = -0.5
x2max = 0.5
ix2_bc = periodic
ox2_bc = periodic
ix2_bc = "periodic"
ox2_bc = "periodic"

nx3 = 1
x3min = -0.5
x3max = 0.5
ix3_bc = periodic
ox3_bc = periodic
ix3_bc = "periodic"
ox3_bc = "periodic"

<parthenon/meshblock>
nx1 = 16
Expand All @@ -44,15 +44,15 @@ nx3 = 1
<parthenon/time>
nlim = -1
tlim = 1.0
integrator = rk2
integrator = "rk2"
ncycle_out_mesh = -10000

<Advection>
cfl = 0.45
vx = 1.0
vy = 1.0
vz = 1.0
profile = hard_sphere
profile = "hard_sphere"

refine_tol = 0.3 # control the package specific refinement tagging function
derefine_tol = 0.03
Expand All @@ -65,10 +65,10 @@ do_fine_advection = true
do_CT_advection = true

<parthenon/output1>
file_type = rst
file_type = "rst"
dt = 0.05

<parthenon/output0>
file_type = hdf5
file_type = "hdf5"
dt = 0.05
variables = advection.scalar, advection.scalar_fine_restricted
variables = "advection.scalar", "advection.scalar_fine_restricted"
Loading
Loading