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

WIP: Precipitator pgen #66

Closed
Closed
Changes from 1 commit
Commits
Show all changes
287 commits
Select commit Hold shift + click to select a range
e4b9baf
use zero velocity boundaries
BenWibking Jan 31, 2023
a054659
use unsplit gravity source
BenWibking Jan 31, 2023
44db0be
use first-order HSE boundaries
BenWibking Jan 31, 2023
9876059
re-derive HSE for non-const g(z)
BenWibking Jan 31, 2023
101c15f
use zero-gradient velocities
BenWibking Jan 31, 2023
0c6d4b3
use tcool/tff = 1 ICs
BenWibking Jan 31, 2023
451206c
use +/- 10 pct perturbations
BenWibking Jan 31, 2023
0d8d748
use tcool/tff = 0.5
BenWibking Feb 1, 2023
33ba69a
add low-mach correction
BenWibking Feb 1, 2023
cbf4678
update notebook
BenWibking Feb 1, 2023
1451c91
update params
BenWibking Feb 2, 2023
fd6ffa9
perturb a (kx,ky,kz) mode
BenWibking Feb 2, 2023
3a03a61
update ascent actions
BenWibking Feb 2, 2023
deb3a02
make everything a runtime parameter
BenWibking Feb 2, 2023
e4177f7
cleanup
BenWibking Feb 2, 2023
931c225
update params
BenWibking Feb 2, 2023
f491316
remove movie
BenWibking Feb 2, 2023
d2f1e2c
change param names
BenWibking Feb 2, 2023
9412e94
initialize with a gaussian random field
BenWibking Feb 2, 2023
6887f15
update params
BenWibking Feb 3, 2023
c7e7274
use rk12 cooling
BenWibking Feb 3, 2023
43f1489
use townsend cooling instead
BenWibking Feb 3, 2023
0b399cb
fix typo
BenWibking Feb 3, 2023
165c4b0
add interp.hpp, remove Boost
BenWibking Feb 3, 2023
5c33d2e
enforce monotonicity in interp.hpp
BenWibking Feb 3, 2023
00aadef
update parthenon
BenWibking Feb 6, 2023
01aa7fe
update default grid size
BenWibking Feb 6, 2023
022ee23
remove macOS-specific header
BenWibking Feb 27, 2023
1a25d4b
use HostArray1D instead of std::vector
BenWibking Feb 27, 2023
96add2e
reduce problem size
BenWibking Feb 27, 2023
7365512
init on device
BenWibking Feb 27, 2023
7c96a1a
remove friend function <<
BenWibking Feb 27, 2023
2e74d00
GPU fixes
BenWibking Feb 27, 2023
d9c33fc
cleanup interpolator
BenWibking Feb 27, 2023
b8d158a
add device annotations to constructors
BenWibking Feb 28, 2023
f273a41
remove unused var in lhllc
BenWibking Feb 28, 2023
b767915
call GetDeviceMirror()
BenWibking Feb 28, 2023
d423b37
init on device
BenWibking Feb 28, 2023
6e26380
fix again
BenWibking Feb 28, 2023
d119647
split kernels for debugging
BenWibking Mar 2, 2023
7584759
use BufArray1D instead of HostArray1D
BenWibking Mar 2, 2023
37a8e30
use PinnedArray1D
BenWibking Mar 2, 2023
ddcf587
restore InitialConditions kernel
BenWibking Mar 2, 2023
0d1e70d
temporarily disable ascent support
BenWibking Mar 4, 2023
fbbb1ef
add debugging statements
BenWibking Mar 5, 2023
78fe614
Merge branch 'precipitator' of github.com:BenWibking/athenapk into pr…
BenWibking Mar 5, 2023
da4be6f
avoid deferencing on device
BenWibking Mar 5, 2023
7efabee
eliminate unused vars
BenWibking Mar 5, 2023
bcaa737
remove debugging statements
BenWibking Mar 5, 2023
b171bc4
re-enable ascent support
BenWibking Mar 6, 2023
19b560e
fix pointer dereference in ascent output
BenWibking Mar 6, 2023
14b4407
add debugging to ascent output
BenWibking Mar 6, 2023
92e0529
use upstream ascent support
BenWibking Mar 6, 2023
0c46a5c
add cons hdf5 output
BenWibking Mar 6, 2023
49a78b8
remove ComputeVelocityDifferences
BenWibking Mar 7, 2023
40a684e
temporarily disable random pool
BenWibking Mar 9, 2023
e5a1cfa
fix bugs in reduction
BenWibking Mar 16, 2023
57e9b08
update precipitator input
BenWibking Mar 16, 2023
75771b9
Merge branch 'main' into precipitator
BenWibking Mar 17, 2023
b1a84c4
update input files
BenWibking Mar 17, 2023
1bb21c6
Merge branch 'main' into precipitator
BenWibking Mar 17, 2023
5967d32
add ifdef MPI_PARALLEL
BenWibking Mar 17, 2023
a5e792a
remove extraneous changes
BenWibking Mar 17, 2023
a892865
merge changes to CMakeLists.txt
BenWibking Mar 17, 2023
03ba590
update timestepping params
BenWibking Mar 17, 2023
0480d90
fix MPI communicator leak
BenWibking Mar 21, 2023
a726f4c
avoid pinned memory
BenWibking Mar 21, 2023
8405aad
avoid pinned memory for interpolation
BenWibking Mar 21, 2023
c930f61
Revert "avoid pinned memory for interpolation"
BenWibking Mar 21, 2023
c12167e
fix build
BenWibking Mar 21, 2023
fb4f2d2
revert to using pinned memory
BenWibking Mar 22, 2023
b927f16
avoid normalizing reduction on host
BenWibking Mar 22, 2023
69277a1
use Kokkos::deep_copy to reset to zero
BenWibking Mar 22, 2023
5000071
use blocking MPI_Allreduce
BenWibking Mar 22, 2023
7c795ff
offset slice from origin
BenWibking Mar 22, 2023
aadf769
partially convert PinnedArray1D to ParArray1D
BenWibking Mar 22, 2023
cf7aece
make host mirrors if necessary
BenWibking Mar 22, 2023
d0b77b2
use par_reduce instead of atomics for reduction
BenWibking Mar 23, 2023
888d92a
initialize on device
BenWibking Mar 23, 2023
89f8637
update input files
BenWibking Mar 23, 2023
5dc961f
use 64^3 meshblocks to avoid shared memory error
BenWibking Mar 23, 2023
46c94c1
enable ascent outputs
BenWibking Mar 23, 2023
7407cbe
increase walltime
BenWibking Mar 23, 2023
a498947
use parthenon with fixed xdmf
BenWibking Mar 23, 2023
63468bf
enable ascent outputs
BenWibking Mar 23, 2023
d8f287a
Merge branch 'precipitator' of github.com:BenWibking/athenapk into pr…
BenWibking Mar 23, 2023
bfccc21
update ascent actions
BenWibking Mar 23, 2023
3976563
update ascent camera
BenWibking Mar 23, 2023
de20cea
update inputs
BenWibking Mar 23, 2023
804d038
add derived vars to output
BenWibking Mar 24, 2023
ed217a4
update output settings
BenWibking Mar 25, 2023
f1af34d
update output settings
BenWibking Mar 25, 2023
4552aae
add ascent queries
BenWibking Mar 27, 2023
d965624
update ascent queries
BenWibking Mar 27, 2023
4683f82
add entropy plots
BenWibking Mar 28, 2023
9b97ed3
update ascent actions
BenWibking Mar 28, 2023
8220af9
remove jit-compiled expression from ascent query
BenWibking Mar 28, 2023
fa0c815
adjust params
BenWibking Mar 28, 2023
c12d1f7
cooling updates
BenWibking Mar 29, 2023
335a778
update parameters
BenWibking Mar 30, 2023
be21822
update output frequency
BenWibking Mar 30, 2023
88b2d08
update params
BenWibking Apr 3, 2023
cfa4a82
update magic heating efficiency
BenWibking Apr 4, 2023
51f3160
update
BenWibking Apr 6, 2023
97ef198
update
BenWibking Apr 17, 2023
5d1a9be
add unit tests for interpolation
BenWibking Apr 17, 2023
74d37b7
use rk4+ppm
BenWibking Apr 20, 2023
52328ce
fix templates
BenWibking Apr 20, 2023
5dd7908
adjust tlim
BenWibking Apr 20, 2023
8319a5c
remove KOKKOS_FUNCTION
BenWibking Apr 20, 2023
6a35648
add well-balanced ppm reconstruction
BenWibking Apr 25, 2023
8a94708
add notebook to compute profiles
BenWibking Apr 26, 2023
d3485ac
update input file
BenWibking Apr 26, 2023
08f16d5
device fixes
BenWibking Apr 26, 2023
2cb7b43
device fixes again
BenWibking Apr 26, 2023
563be37
update parthenon
BenWibking Apr 27, 2023
8a73921
average profiles over cells
BenWibking Apr 27, 2023
1468909
implement exact well-balancing
BenWibking Apr 28, 2023
d04901b
use hse pressure gradient for Sgrav
BenWibking Apr 29, 2023
f066521
don't plot P_hse
BenWibking Apr 29, 2023
4a7628c
use rk2
BenWibking Apr 29, 2023
39705be
use subcell hse reconstruction
BenWibking Apr 29, 2023
0a9a639
update boundary conditions
BenWibking Apr 29, 2023
975b6ad
update params
BenWibking Apr 29, 2023
f776bb8
moved reflecting BC to bc.hpp
Apr 30, 2023
4551513
implement proper BCs for phi, Phse
May 1, 2023
a8601f5
add comment
May 1, 2023
b5eeaff
add epsilon_heating
BenWibking May 1, 2023
94913a3
update
BenWibking May 1, 2023
deaf0a3
update profile
BenWibking May 1, 2023
38d8dd0
update notebook
BenWibking May 1, 2023
9f97570
add ascent hdf5 output
May 2, 2023
20d94d7
test simple box
BenWibking May 2, 2023
85dd491
Merge branch 'precipitator-kappeli' of github.com:BenWibking/athenapk…
BenWibking May 2, 2023
a348003
implement Kappeli method
BenWibking May 2, 2023
617657e
just fill BCs directly
BenWibking May 2, 2023
67c0e1c
remove old code
BenWibking May 2, 2023
a6df519
it works!!
BenWibking May 2, 2023
ae7a3a5
update params
BenWibking May 2, 2023
88fc0f5
update precipitator.in
BenWibking May 2, 2023
04ff842
add yaml file that doesn't do binning
BenWibking May 2, 2023
e6cdba9
add log_drho plot
BenWibking May 2, 2023
0a9fa08
plot standard deviation of profiles
BenWibking May 2, 2023
f2ad125
use h = 20 kpc
BenWibking May 2, 2023
6a48d01
add PLM well balancing
BenWibking May 2, 2023
1cb4df8
hotfix for CudaUVM
BenWibking May 5, 2023
bbc39d5
Merge branch 'precipitator-kappeli' of github.com:BenWibking/athenapk…
BenWibking May 5, 2023
d8da9cb
add target guard for Catch2
BenWibking May 22, 2023
39ea35c
use UserMeshWorkBeforeOutput
BenWibking May 23, 2023
e3ba1e6
add ComputeProfileGlobal/Local
BenWibking May 23, 2023
4dfa791
fix pkg pointer
BenWibking May 23, 2023
12fedb4
eliminated unnecessary indices
BenWibking May 24, 2023
bb31165
refactor
BenWibking May 24, 2023
5f3f2a9
move reduction out of hydro driver
BenWibking May 24, 2023
a0dbe1d
move reduction init to pgen
BenWibking May 24, 2023
538e5c8
fix uninitialized ParArray1D
BenWibking May 24, 2023
4500c90
fix binning
BenWibking May 24, 2023
ca7e52e
add comment
BenWibking May 24, 2023
8225449
grand unified reductions
BenWibking May 25, 2023
54b94c5
compute mean profiles for all derived fields
BenWibking May 25, 2023
5a36f8b
formatting
BenWibking May 25, 2023
1489e09
add temperature fields
BenWibking May 26, 2023
0981402
simplify profile wrapper
BenWibking May 26, 2023
8499d7b
use KOKKOS_LAMBDA
BenWibking May 26, 2023
4eec98e
updated inputs
BenWibking May 26, 2023
e44df38
temporarily disable HDF5 outputs
BenWibking May 27, 2023
3f52431
debugging
BenWibking May 28, 2023
e1991dc
debugging output
BenWibking Jun 12, 2023
b4b0a35
disable debugging output
BenWibking Jun 12, 2023
9eac2a2
add bounds check to interpolation
BenWibking Jun 12, 2023
300647c
Merge branch 'main' into precipitator-kappeli
BenWibking Jun 12, 2023
413c8b9
fix bad merge
BenWibking Jun 12, 2023
3e37501
add debugging checks to interp
BenWibking Jun 12, 2023
ad7c3a6
remove unused vars
BenWibking Jun 12, 2023
afe6c50
handle the case delta_i = 0
BenWibking Jun 12, 2023
bfbccdc
handle case where mean_Edot = 0
BenWibking Jun 12, 2023
cc73c19
remove kernel used only for debug
BenWibking Jun 12, 2023
7ec1999
disable ascent binning
BenWibking Jun 13, 2023
7369e3e
move profiles to profile.hpp
BenWibking Jun 15, 2023
187f4fc
add WriteProfileToFile
BenWibking Jun 15, 2023
cd9d9ae
add csv profile outputs
BenWibking Jun 19, 2023
661feca
update gitignore
BenWibking Jun 19, 2023
643af69
update gitignore
BenWibking Jun 19, 2023
4c4d4f5
profile output fixes
BenWibking Jun 19, 2023
e0074b2
add profiles for varying tc/tff
BenWibking Jun 21, 2023
9722b05
save hdf5 slice in a single file
BenWibking Jun 21, 2023
4cdc26a
add profile
BenWibking Jun 22, 2023
7bb709a
add mach number outputs
BenWibking Jun 22, 2023
daa56a7
add ascent_options
BenWibking Jun 26, 2023
c2fe8dd
remove PNG renders
BenWibking Jun 26, 2023
5947e38
add postprocessing actions
BenWibking Jun 26, 2023
fae7a6c
add contour outputs
BenWibking Jun 26, 2023
8374da1
add tc/tff = 0.1
BenWibking Jun 27, 2023
540b428
add camera render
BenWibking Jun 27, 2023
b109bc1
update parthenon
BenWibking Jun 27, 2023
bd32d71
update parthenon w/ PR
BenWibking Jun 27, 2023
5db96b4
Revert "update parthenon w/ PR"
BenWibking Jun 27, 2023
a83d3a4
Revert "update parthenon"
BenWibking Jun 27, 2023
bb9db63
add tc/tff=0.25 profile
BenWibking Jun 28, 2023
982f79e
add ft utils
BenWibking Sep 18, 2023
70d2170
add few_modes_ft.cpp to CMakeLists
BenWibking Sep 18, 2023
a9e912d
add TurbSrcTerm
BenWibking Sep 18, 2023
7064e0f
fix dt argument to Generate
BenWibking Sep 19, 2023
628d696
tweak params
BenWibking Sep 19, 2023
0cc2182
fixes to build without MPI
BenWibking Sep 20, 2023
fdee110
fix for turbulence problem
BenWibking Sep 22, 2023
4b5a5aa
use KOKKOS_FORCEINLINE_FUNCTION for gauss.hpp
BenWibking Sep 25, 2023
20526dc
avoid recursion
BenWibking Sep 25, 2023
4b07dd6
only generate perturb if sigma_v > 0
BenWibking Oct 3, 2023
fdee392
remove hse profiles from PR
BenWibking Oct 5, 2023
2d51148
add turb driver restart
BenWibking Oct 5, 2023
ec3b92b
disable contour ascent extract
BenWibking Oct 5, 2023
add8121
remove contour extract
BenWibking Oct 5, 2023
f076e39
cleanup restart code
BenWibking Oct 5, 2023
da019d5
remove debugging printfs
BenWibking Oct 5, 2023
9d3a9ed
add python notebook
BenWibking Oct 6, 2023
6f9a957
Merge branch 'main' into precipitator-kappeli
BenWibking Oct 6, 2023
13e5ba3
Update src/utils/few_modes_ft.cpp
BenWibking Oct 9, 2023
ed3bcdd
add missing Kokkos::deep_copy
BenWibking Oct 9, 2023
f136e5d
Merge branch 'precipitator-kappeli' of github.com:BenWibking/athenapk…
BenWibking Oct 9, 2023
429fdb5
fix bad merge
BenWibking Oct 9, 2023
33ed506
update parthenon commit
BenWibking Oct 9, 2023
89b7f90
fixes for Parthenon API breakage
BenWibking Oct 9, 2023
434f5ee
cleanup restart code
BenWibking Oct 9, 2023
9ccb3b4
don't save/restore var_hat_new_
BenWibking Oct 9, 2023
a7edca8
add FPE traps
BenWibking Oct 11, 2023
45bcd71
add avg profile outputs
BenWibking Oct 16, 2023
daf4201
disable FPE traps
BenWibking Oct 16, 2023
804731e
add histogram notebook
BenWibking Oct 17, 2023
07a5c42
fix histogram bins
BenWibking Oct 17, 2023
a867d71
update entropy plot
BenWibking Oct 25, 2023
a740fe8
update histogram
BenWibking Oct 26, 2023
57df1d2
add uniform_init option
BenWibking Oct 30, 2023
13f3b20
update notebook
BenWibking Nov 6, 2023
e0e7443
add turbulent heating profiles
BenWibking Nov 13, 2023
395d160
fix units for turbulent diffusion analysis
BenWibking Nov 14, 2023
018feb1
taper turbulent driving near midplane
BenWibking Nov 15, 2023
0fe978b
fix memory space error
BenWibking Nov 15, 2023
f224766
raise Tfloor
BenWibking Nov 27, 2023
50cc7af
update iPython notebooks
BenWibking Nov 30, 2023
5bb18ad
update notebook
BenWibking Jan 22, 2024
9c067d6
update input files
BenWibking Feb 15, 2024
c7ad752
fix input
BenWibking Feb 15, 2024
a4aee76
add dv_xy,z rms profiles
BenWibking Feb 15, 2024
c409a63
cleanup header includes
BenWibking Feb 15, 2024
1957689
update input file
BenWibking Feb 15, 2024
fa5252b
add vertical_weight param
BenWibking Feb 20, 2024
4e74232
fix typo
BenWibking Feb 20, 2024
ed56a5b
update parthenon submodule
BenWibking Feb 22, 2024
01c9baf
Merge branch 'main' into precipitator-kappeli
BenWibking Feb 22, 2024
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
Prev Previous commit
Next Next commit
partially convert PinnedArray1D to ParArray1D
  • Loading branch information
BenWibking committed Mar 22, 2023
commit aadf769ccb5a90e8788d851fa90d9e17ab6a68d0
6 changes: 3 additions & 3 deletions src/hydro/hydro.cpp
Original file line number Diff line number Diff line change
@@ -202,11 +202,11 @@ std::shared_ptr<StateDescriptor> Initialize(ParameterInput *pin) {
if (parthenon::Globals::my_rank == 0) {
std::cout << "Using numHist = " << numHist << std::endl;
}
parthenon::AllReduce<PinnedArray1D<Real>> profile_reduce;
profile_reduce.val = PinnedArray1D<Real>("Reduce me", numHist);
parthenon::AllReduce<parthenon::ParArray1D<Real>> profile_reduce;
profile_reduce.val = parthenon::ParArray1D<Real>("Reduce me", numHist);
pkg->AddParam("profile_reduce", profile_reduce, true);

PinnedArray1D<Real> profile_reduce_zbins("Bin centers", numHist);
parthenon::ParArray1D<Real> profile_reduce_zbins("Bin centers", numHist);
const Real x3min = pin->GetReal("parthenon/mesh", "x3min");
const Real x3max = pin->GetReal("parthenon/mesh", "x3max");
const Real dz_hist = (x3max - x3min) / numHist;
12 changes: 6 additions & 6 deletions src/hydro/hydro_driver.cpp
Original file line number Diff line number Diff line change
@@ -106,8 +106,8 @@ TaskStatus CalculateCoolingRateProfile(MeshData<Real> *md) {
const Real gam = pkg->Param<AdiabaticHydroEOS>("eos").GetGamma();
const Real gm1 = (gam - 1.0);

AllReduce<PinnedArray1D<Real>> *profile_reduce =
pkg->MutableParam<AllReduce<PinnedArray1D<Real>>>("profile_reduce");
AllReduce<parthenon::ParArray1D<Real>> *profile_reduce =
pkg->MutableParam<AllReduce<parthenon::ParArray1D<Real>>>("profile_reduce");

auto pm = md->GetParentPointer();
const Real x3min = pm->mesh_size.x3min;
@@ -228,8 +228,8 @@ TaskCollection HydroDriver::MakeTaskCollection(BlockList_t &blocks, int stage) {
if (stage == 1) {
auto pkg = blocks[0]->packages.Get("Hydro");

AllReduce<PinnedArray1D<Real>> *pview_reduce =
pkg->MutableParam<AllReduce<PinnedArray1D<Real>>>("profile_reduce");
AllReduce<parthenon::ParArray1D<Real>> *pview_reduce =
pkg->MutableParam<AllReduce<parthenon::ParArray1D<Real>>>("profile_reduce");

// initialize values to zero
Kokkos::deep_copy(pview_reduce->val, 0.0);
@@ -258,8 +258,8 @@ TaskCollection HydroDriver::MakeTaskCollection(BlockList_t &blocks, int stage) {
(i == 0 ? tl.AddTask(
local_sum,
[](std::shared_ptr<StateDescriptor> &pkg) {
PinnedArray1D<Real> &profile =
pkg->MutableParam<AllReduce<PinnedArray1D<Real>>>(
parthenon::ParArray1D<Real> &profile =
pkg->MutableParam<AllReduce<parthenon::ParArray1D<Real>>>(
"profile_reduce")
->val;

8 changes: 4 additions & 4 deletions src/pgen/precipitator.cpp
Original file line number Diff line number Diff line change
@@ -204,10 +204,10 @@ void MagicHeatingSrcTerm(MeshData<Real> *md, const parthenon::SimTime, const Rea
IndexRange kb = md->GetBlockData(0)->GetBoundsK(IndexDomain::interior);

// vertical dE/dt profile
PinnedArray1D<Real> profile_reduce =
pkg->MutableParam<AllReduce<PinnedArray1D<Real>>>("profile_reduce")->val;
PinnedArray1D<Real> profile_reduce_zbins =
pkg->Param<PinnedArray1D<Real>>("profile_reduce_zbins");
parthenon::ParArray1D<Real> profile_reduce =
pkg->MutableParam<AllReduce<parthenon::ParArray1D<Real>>>("profile_reduce")->val;
parthenon::ParArray1D<Real> profile_reduce_zbins =
pkg->Param<parthenon::ParArray1D<Real>>("profile_reduce_zbins");

PinnedArray1D<Real> profile("profile", profile_reduce.size() + 2);
PinnedArray1D<Real> zbins("zbins", profile_reduce_zbins.size() + 2);