Skip to content
Open
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
2 changes: 1 addition & 1 deletion external/parthenon
Submodule parthenon updated 69 files
+1 −1 .github/workflows/ci-extended.yml
+49 −13 CHANGELOG.md
+39 −3 CMakeLists.txt
+63 −1 doc/sphinx/src/boundary_communication.rst
+1 −0 doc/sphinx/src/building.rst
+3 −0 doc/sphinx/src/generated/diffusion-parth-table.csv
+38 −50 doc/sphinx/src/interface/sparse.rst
+7 −0 doc/sphinx/src/particles.rst
+44 −0 doc/sphinx/src/sparse_packs.rst
+8 −0 example/diffusion/CMakeLists.txt
+6 −0 example/poisson/CMakeLists.txt
+7 −0 example/poisson_gmg/CMakeLists.txt
+2 −2 example/poisson_gmg/parthenon_app_inputs.cpp
+8 −18 example/poisson_gmg/poisson_equation.hpp
+2 −0 example/sparse_advection/parthinput.sparse_advection
+1 −1 external/Kokkos
+31 −7 scripts/python/packages/parthenon_tools/parthenon_tools/movie2d.py
+5 −2 src/CMakeLists.txt
+13 −11 src/amr_criteria/amr_criteria.cpp
+12 −0 src/basic_types.hpp
+0 −1 src/bvals/bvals.cpp
+4 −2 src/bvals/comms/bnd_id.hpp
+4 −0 src/bvals/comms/bnd_info.cpp
+2 −0 src/bvals/comms/bnd_info.hpp
+73 −29 src/bvals/comms/build_boundary_buffers.cpp
+4 −1 src/bvals/comms/bvals_in_one.hpp
+0 −1 src/bvals/neighbor_block.cpp
+3 −0 src/driver/driver.cpp
+8 −0 src/driver/driver.hpp
+6 −2 src/interface/mesh_data.hpp
+1 −0 src/interface/meshblock_data.hpp
+21 −1 src/interface/metadata.hpp
+29 −0 src/interface/state_descriptor.hpp
+2 −1 src/interface/swarm.cpp
+6 −3 src/interface/swarm.hpp
+3 −77 src/interface/update.cpp
+4 −67 src/interface/update.hpp
+6 −10 src/interface/variable.cpp
+7 −1 src/interface/variable.hpp
+19 −5 src/kokkos_abstraction.hpp
+0 −1 src/mesh/mesh-amr_loadbalance.cpp
+15 −1 src/mesh/mesh-gmg.cpp
+87 −36 src/mesh/mesh.cpp
+21 −9 src/mesh/mesh.hpp
+1 −2 src/mesh/meshblock.cpp
+1 −0 src/outputs/output_parameters.hpp
+5 −1 src/outputs/outputs.cpp
+113 −0 src/pack/scratch_variables.hpp
+1 −0 src/parthenon/package.hpp
+68 −28 src/solvers/bicgstab_solver.hpp
+23 −12 src/solvers/internal_prolongation.hpp
+124 −33 src/solvers/mg_solver.hpp
+7 −0 src/solvers/solver_base.hpp
+178 −0 src/sparse/sparse_management.cpp
+53 −0 src/sparse/sparse_management.hpp
+109 −0 src/tasks/task_timing.cpp
+113 −0 src/tasks/task_timing.hpp
+12 −0 src/tasks/tasks.cpp
+20 −0 src/tasks/tasks.hpp
+25 −2 src/tasks/thread_pool.hpp
+0 −160 src/utils/buffer_utils.cpp
+0 −52 src/utils/buffer_utils.hpp
+6 −6 src/utils/index_split.cpp
+17 −0 src/utils/object_pool.hpp
+1 −0 tst/regression/test_suites/sparse_advection/parthinput.sparse_advection
+1 −0 tst/unit/CMakeLists.txt
+139 −0 tst/unit/test_scratch_variables.cpp
+5 −2 tst/unit/test_swarm.cpp
+258 −0 tst/unit/test_tasklist.cpp
103 changes: 103 additions & 0 deletions inputs/self-gravity/poly.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# ========================================================================================
# (C) (or copyright) 2025. Triad National Security, LLC. All rights reserved.
#
# This program was produced under U.S. Government contract 89233218CNA000001 for Los
# Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC
# for the U.S. Department of Energy/National Nuclear Security Administration. All rights
# in the program are reserved by Triad National Security, LLC, and the U.S. Department
# of Energy/National Nuclear Security Administration. The Government is granted for
# itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide
# license in this material to reproduce, prepare derivative works, distribute copies to
# the public, perform publicly and display publicly, and to permit others to do so.
# ========================================================================================

<artemis>
problem = polytrope # name of the pgen
coordinates = cartesian # coordinate system

<parthenon/job>
problem_id = polytrope # problem ID: basename of output filenames

<parthenon/output1>
file_type = hdf5 # HDF5 data dump
variables = gas.prim.density, &
gas.prim.velocity, &
gas.prim.pressure, &
grav.phi, &
grav.rhs
dt = 1.0 # time increment between outputs

<parthenon/output2>
file_type = hst # HDF5 data dump
dt = 1.0 # time increment between outputs

<parthenon/time>
nlim = -1 # cycle limit
tlim = 100.0 # time limit (to be reset by problem generator)
integrator = rk2 # time integration algorithm
ncycle_out = 1 # interval for stdout summary info

<parthenon/mesh>
# do_coalesced_comms = true
refinement = adaptive
numlevel = 3
multigrid = true

nx1 = 64
x1min = -32.0
x1max = 32.0
ix1_bc = outflow
ox1_bc = outflow

nx2 = 64
x2min = -32.0
x2max = 32.0
ix2_bc = outflow
ox2_bc = outflow

nx3 = 64
x3min = -32.0
x3max = 32.0
ix3_bc = outflow
ox3_bc = outflow

<parthenon/meshblock>
nx1 = 16
nx2 = 16
nx3 = 16

<parthenon/refinement0>
method = magnitude
comparator = greater_than
field = gas.prim.density_0
refine_tol = 0.1
derefine_tol = 0.1

<physics>
gas = true
gravity = true

<gas>
cfl = 0.9
reconstruct = plm
riemann = hllc
gamma = 2.0

<gravity/self>
precondition = true
print_per_step = true
max_iterations = 100
residual_tolerance = 1.0e-6
smoother = SRJ2
do_FAS = true
units_override = true
use_swindle = false
ix1_bc = zero
ox1_bc = zero
ix2_bc = zero
ox2_bc = zero
ix3_bc = zero
ox3_bc = zero

<problem>
iprob = 2
6 changes: 5 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ set (SRC_LIST

gravity/binary_mass.cpp
gravity/gravity.cpp
gravity/gravity.hpp
gravity/nbody_gravity.hpp
gravity/point_mass.cpp
gravity/poisson_driver.cpp
gravity/poisson_equation.hpp
gravity/self_gravity.cpp
gravity/uniform.cpp
gravity/gravity.hpp

nbody/nbody.cpp
nbody/nbody.hpp
Expand All @@ -64,6 +67,7 @@ set (SRC_LIST
pgen/kh.hpp
pgen/linear_wave.hpp
pgen/lw.hpp
pgen/polytrope.hpp
pgen/pgen.hpp
pgen/problem_modifier.hpp
pgen/rt.hpp
Expand Down
1 change: 1 addition & 0 deletions src/artemis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Packages_t ProcessPackages(std::unique_ptr<ParameterInput> &pin) {
artemis->AddParam("x2max", x2max);
artemis->AddParam("x3min", x3min);
artemis->AddParam("x3max", x3max);
artemis->AddParam("domain_volume", (x1max - x1min) * (x2max - x2min) * (x3max - x3min));

// Add optionally enrollable operator split Metadata flag
parthenon::MetadataFlag MetadataOperatorSplit =
Expand Down
5 changes: 5 additions & 0 deletions src/artemis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ ARTEMIS_VARIABLE(rad.opac, scattering);
} // namespace opac
} // namespace rad

namespace grav {
ARTEMIS_VARIABLE(grav, phi);
ARTEMIS_VARIABLE(grav, rhs);
} // namespace grav

#undef ARTEMIS_VARIABLE

// Restart options (see Parthenon #1231)
Expand Down
7 changes: 6 additions & 1 deletion src/artemis_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ TaskListStatus ArtemisDriver<GEOM>::Step() {
// Prepare registers
PreStepTasks();

TaskListStatus status;

// Execute explicit, unsplit physics
auto status = StepTasks().Execute();
status = StepTasks().Execute();
if (status != TaskListStatus::complete) return status;

// Operator split, background linear advection (for shearing box)
Expand Down Expand Up @@ -206,6 +208,9 @@ TaskCollection ArtemisDriver<GEOM>::StepTasks() {
const Real g1 = integrator->gam1[stage - 1];
const Real bdt = integrator->beta[stage - 1] * integrator->dt;

// Compute gravitational potential
if (do_gravity) Gravity::SolvePoisson(tc, pmesh);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (do_self_gravity)


TaskRegion &tr = tc.AddRegion(num_partitions);
for (int i = 0; i < num_partitions; i++) {
auto &tl = tr[i];
Expand Down
Loading