Skip to content

Commit

Permalink
Bump parth
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrete committed Jan 16, 2024
1 parent 07a8ee9 commit 7941b10
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion external/Kokkos
Submodule Kokkos updated 491 files
2 changes: 1 addition & 1 deletion external/parthenon
9 changes: 6 additions & 3 deletions src/hydro/prolongation/custom_ops.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,34 +81,37 @@ struct ProlongateCellMinModMultiD {

Real dx1fm = 0;
Real dx1fp = 0;
[[maybe_unused]] Real gx1m = 0, gx1p = 0;
Real gx1c = 0;
if constexpr (INCLUDE_X1) {
Real dx1m, dx1p;
GetGridSpacings<1, el>(coords, coarse_coords, cib, ib, i, fi, &dx1m, &dx1p, &dx1fm,
&dx1fp);
gx1c = GradMinMod(fc, coarse(element_idx, l, m, n, k, j, i - 1),
coarse(element_idx, l, m, n, k, j, i + 1), dx1m, dx1p);
coarse(element_idx, l, m, n, k, j, i + 1), dx1m, dx1p, gx1m, gx1p);
}

Real dx2fm = 0;
Real dx2fp = 0;
[[maybe_unused]] Real gx2m = 0, gx2p = 0;
Real gx2c = 0;
if constexpr (INCLUDE_X2) {
Real dx2m, dx2p;
GetGridSpacings<2, el>(coords, coarse_coords, cjb, jb, j, fj, &dx2m, &dx2p, &dx2fm,
&dx2fp);
gx2c = GradMinMod(fc, coarse(element_idx, l, m, n, k, j - 1, i),
coarse(element_idx, l, m, n, k, j + 1, i), dx2m, dx2p);
coarse(element_idx, l, m, n, k, j + 1, i), dx2m, dx2p, gx2m, gx2p);
}
Real dx3fm = 0;
Real dx3fp = 0;
[[maybe_unused]] Real gx3m = 0, gx3p = 0;
Real gx3c = 0;
if constexpr (INCLUDE_X3) {
Real dx3m, dx3p;
GetGridSpacings<3, el>(coords, coarse_coords, ckb, kb, k, fk, &dx3m, &dx3p, &dx3fm,
&dx3fp);
gx3c = GradMinMod(fc, coarse(element_idx, l, m, n, k - 1, j, i),
coarse(element_idx, l, m, n, k + 1, j, i), dx3m, dx3p);
coarse(element_idx, l, m, n, k + 1, j, i), dx3m, dx3p, gx3m, dx3p);
}

// Max. expected total difference. (dx#fm/p are positive by construction)
Expand Down
2 changes: 1 addition & 1 deletion src/outputs/per_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ void UserOutput::WriteOutputFile(Mesh *pm, ParameterInput *pin, SimTime *tm,
stats.emplace_back(Stats("pressure", "prim", IPR));
if (pin->GetOrAddBoolean("problem/turbulence", "calc_vorticity_mag", false)) {
stats.emplace_back(Stats("vort_mag", "vorticity_mag", 0));
stats.emplace_back(Stats("vort_mag_mw", "vorticity_mag", 0), Weight::Mass);
stats.emplace_back(Stats("vort_mag_mw", "vorticity_mag", 0, Weight::Mass));
}

const std::vector<std::string> stat_types = {
Expand Down
2 changes: 1 addition & 1 deletion src/pgen/cloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void ProblemGenerator(MeshBlock *pmb, ParameterInput *pin) {
}

void InflowWindX2(std::shared_ptr<MeshBlockData<Real>> &mbd, bool coarse) {
std::shared_ptr<MeshBlock> pmb = mbd->GetBlockPointer();
auto* pmb = mbd->GetBlockPointer();
auto cons = mbd->PackVariables(std::vector<std::string>{"cons"}, coarse);
// TODO(pgrete) Add par_for_bndry to Parthenon without requiring nb
const auto nb = IndexRange{0, 0};
Expand Down
6 changes: 3 additions & 3 deletions src/pgen/cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ void ProblemGenerator(Mesh *pmesh, ParameterInput *pin, MeshData<Real> *md) {
************************************************************/
const auto &magnetic_tower = hydro_pkg->Param<MagneticTower>("magnetic_tower");

magnetic_tower.AddInitialFieldToPotential(pmb.get(), a_kb, a_jb, a_ib, A);
magnetic_tower.AddInitialFieldToPotential(pmb, a_kb, a_jb, a_ib, A);

/************************************************************
* Add dipole magnetic field to the magnetic potential
Expand Down Expand Up @@ -670,7 +670,7 @@ void ProblemGenerator(Mesh *pmesh, ParameterInput *pin, MeshData<Real> *md) {
// Init phases on all blocks
for (int b = 0; b < md->NumBlocks(); b++) {
auto pmb = md->GetBlockData(b)->GetBlockPointer();
few_modes_ft.SetPhases(pmb.get(), pin);
few_modes_ft.SetPhases(pmb, pin);
}
// As for t_corr in few_modes_ft, the choice for dt is
// in principle arbitrary because the inital v_hat is 0 and the v_hat_new will contain
Expand Down Expand Up @@ -738,7 +738,7 @@ void ProblemGenerator(Mesh *pmesh, ParameterInput *pin, MeshData<Real> *md) {
// Init phases on all blocks
for (int b = 0; b < md->NumBlocks(); b++) {
auto pmb = md->GetBlockData(b)->GetBlockPointer();
few_modes_ft.SetPhases(pmb.get(), pin);
few_modes_ft.SetPhases(pmb, pin);
}
// As for t_corr in few_modes_ft, the choice for dt is
// in principle arbitrary because the inital b_hat is 0 and the b_hat_new will contain
Expand Down
8 changes: 4 additions & 4 deletions src/pgen/cluster/agn_feedback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,10 @@ void AGNFeedback::FeedbackSrcTerm(parthenon::MeshData<parthenon::Real> *md,
eos.ConsToPrim(cons, prim, nhydro, nscalars, k, j, i);
const Real new_specific_internal_e =
prim(IPR, k, j, i) / (prim(IDN, k, j, i) * (eos.GetGamma() - 1.));
PARTHENON_REQUIRE(
new_specific_internal_e > jet_specific_internal_e ||
new_specific_internal_e > old_specific_internal_e,
"Kinetic injection leads to temperature below jet and existing gas");
// PARTHENON_REQUIRE(
// new_specific_internal_e > jet_specific_internal_e ||
// new_specific_internal_e > old_specific_internal_e,
// "Kinetic injection leads to temperature below jet and existing gas");
}

// Apply velocity ceiling
Expand Down

0 comments on commit 7941b10

Please sign in to comment.