Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
HPC user committed Dec 13, 2023
1 parent cd70927 commit 1529075
Show file tree
Hide file tree
Showing 19 changed files with 2,811 additions and 2,702 deletions.
6 changes: 3 additions & 3 deletions src/pgen/blast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ void ProblemGenerator(MeshBlock *pmb, ParameterInput *pin) {
Real drat = pin->GetOrAddReal("problem/blast", "density_ratio", 1.0);
Real gamma = pin->GetOrAddReal("hydro", "gamma", 5 / 3);
Real gm1 = gamma - 1.0;

// get coordinates of center of blast, and convert to Cartesian if necessary
Real x0 = pin->GetOrAddReal("problem/blast", "x1_0", 0.0);
Real y0 = pin->GetOrAddReal("problem/blast", "x2_0", 0.0);
Real z0 = pin->GetOrAddReal("problem/blast", "x3_0", 0.0);

IndexRange ib = pmb->cellbounds.GetBoundsI(IndexDomain::interior);
IndexRange jb = pmb->cellbounds.GetBoundsJ(IndexDomain::interior);
IndexRange kb = pmb->cellbounds.GetBoundsK(IndexDomain::interior);

// initialize conserved variables
auto &rc = pmb->meshblock_data.Get();
auto &u_dev = rc->Get("cons").data;
Expand Down
16 changes: 8 additions & 8 deletions src/pgen/cloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void InitUserMeshData(Mesh *mesh, ParameterInput *pin) {
// \brief Problem Generator for the cloud in wind setup

void ProblemGenerator(MeshBlock *pmb, ParameterInput *pin) {

auto hydro_pkg = pmb->packages.Get("Hydro");
auto ib = pmb->cellbounds.GetBoundsI(IndexDomain::interior);
auto jb = pmb->cellbounds.GetBoundsJ(IndexDomain::interior);
Expand All @@ -157,9 +157,9 @@ void ProblemGenerator(MeshBlock *pmb, ParameterInput *pin) {
PARTHENON_FAIL("Requested to initialize magnetic fields by `cloud/plasma_beta > 0`, "
"but `hydro/fluid` is not supporting MHD.");
}

auto steepness = pin->GetOrAddReal("problem/cloud", "cloud_steepness", 10);

// initialize conserved variables
auto &mbd = pmb->meshblock_data.Get();
auto &u_dev = mbd->Get("cons").data;
Expand Down Expand Up @@ -192,13 +192,13 @@ void ProblemGenerator(MeshBlock *pmb, ParameterInput *pin) {
u(IM2, k, j, i) = mom;
// Can use rhoe_wind here as simulation is setup in pressure equil.
u(IEN, k, j, i) = rhoe_wind + 0.5 * mom * mom / rho;

if (mhd_enabled) {
u(IB1, k, j, i) = Bx;
u(IB2, k, j, i) = By;
u(IEN, k, j, i) += 0.5 * (Bx * Bx + By * By);
}

// Init passive scalars
for (auto n = nhydro; n < nhydro + nscalars; n++) {
if (rad <= r_cloud) {
Expand Down Expand Up @@ -241,14 +241,14 @@ void InflowWindX2(std::shared_ptr<MeshBlockData<Real>> &mbd, bool coarse) {
}

parthenon::AmrTag ProblemCheckRefinementBlock(MeshBlockData<Real> *mbd) {

auto pmb = mbd->GetBlockPointer();
auto w = mbd->Get("prim").data;

IndexRange ib = pmb->cellbounds.GetBoundsI(IndexDomain::interior);
IndexRange jb = pmb->cellbounds.GetBoundsJ(IndexDomain::interior);
IndexRange kb = pmb->cellbounds.GetBoundsK(IndexDomain::interior);

auto hydro_pkg = pmb->packages.Get("Hydro");
const auto nhydro = hydro_pkg->Param<int>("nhydro");

Expand Down
Loading

0 comments on commit 1529075

Please sign in to comment.