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

Compute emf #642

Draft
wants to merge 37 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
703537c
add call to solve induction eqn
AstroKriel May 8, 2024
d79c692
draft func to solve induction eqn
AstroKriel May 8, 2024
ae7a364
indicate box-array centering
AstroKriel May 8, 2024
a8fe9fd
initialise fc state variables
AstroKriel May 8, 2024
44e1ded
focus on setup to reconstruct
AstroKriel May 8, 2024
db4f3d1
debug: add evolve step to check induction eqn
AstroKriel May 8, 2024
b3fdd3a
fc-rhs is only used for mhd
AstroKriel May 8, 2024
4ba7bc7
don't index comp (=1)
AstroKriel May 8, 2024
33a7b0e
fix index-range of reconstruction (can compile and run w.o. errors --…
AstroKriel May 9, 2024
4309caa
fix arg parsing to induction soln
AstroKriel May 9, 2024
d2c3bd4
recuce domain size for terminal debugging
AstroKriel May 9, 2024
65f747a
specify state centering
AstroKriel May 9, 2024
03e6001
reinstate all reconstruct options
AstroKriel May 9, 2024
ec40a30
add alfven wave test problem (not implemented yet)
AstroKriel Jun 6, 2024
df25a22
compute emf computes things correctly, but output still needs work
AstroKriel Jun 6, 2024
83af98a
propogate fast mhd wave speeds to compute emf func
AstroKriel Jun 6, 2024
6afe3fa
remove debug evolve step
AstroKriel Jun 6, 2024
7552e65
add alfven wave test problem (not implemented yet)
AstroKriel Jun 6, 2024
90b5417
output fast mhd wave speed
AstroKriel Jun 6, 2024
1cba5a5
code to save mhd wavespeeds
AstroKriel Jun 6, 2024
40231d1
return emf components
AstroKriel Jun 6, 2024
9593208
make a view of the bfield data / don't make an unnecessary copy
AstroKriel Jun 6, 2024
17fbf88
remove unused code
AstroKriel Jun 7, 2024
c2dc7c4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 7, 2024
bffd5b3
store edge-centered emf components more compactly: data reconstructed…
AstroKriel Jul 8, 2024
b81e07c
more meaningful variable names
AstroKriel Jul 8, 2024
6bfa86e
store edge-centered emf components more compactly: data reconstructed…
AstroKriel Jul 8, 2024
b49a1f1
synchronise emf values that are on identical edges shared between mul…
AstroKriel Jul 10, 2024
23aaa22
add mask for the synching emf components
AstroKriel Jul 10, 2024
5b05c4d
rename IC funcs for consistency and to indicate centering
AstroKriel Jul 22, 2024
4dedeb1
compute momentum for ICs
AstroKriel Sep 5, 2024
bd79eb1
rename vars for consistency
AstroKriel Sep 5, 2024
41622e7
(in-progress) setup of b-fields for Riemann solver
AstroKriel Sep 5, 2024
0227b20
we have an extra cc-ghost for MHD problems
AstroKriel Sep 5, 2024
9b2509b
being pedantic about syntax
AstroKriel Sep 5, 2024
dd70e56
update backend for mhd
AstroKriel Sep 30, 2024
9e7a72c
check alfven wave test passes
AstroKriel Sep 30, 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
2 changes: 1 addition & 1 deletion src/Advection/test_advection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ AMREX_GPU_DEVICE void ComputeExactSolution(int i, int j, int k, int n, amrex::Ar
exact_arr(i, j, k, n) = value;
}

template <> void AdvectionSimulation<SawtoothProblem>::setInitialConditionsOnGrid(quokka::grid grid_elem)
template <> void AdvectionSimulation<SawtoothProblem>::setInitialConditionsOnGrid_cc(quokka::grid grid_elem)
{
// extract variables required from the geom object
amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx = grid_elem.dx_;
Expand Down
2 changes: 1 addition & 1 deletion src/Advection2D/test_advection2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ AMREX_GPU_DEVICE AMREX_FORCE_INLINE auto exactSolutionAtIndex(int i, int j, amre
return rho;
}

template <> void AdvectionSimulation<SquareProblem>::setInitialConditionsOnGrid(quokka::grid grid_elem)
template <> void AdvectionSimulation<SquareProblem>::setInitialConditionsOnGrid_cc(quokka::grid grid_elem)
{
// extract variables required from the geom object
amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx = grid_elem.dx_;
Expand Down
2 changes: 1 addition & 1 deletion src/AdvectionSemiellipse/test_advection_semiellipse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ AMREX_GPU_DEVICE void ComputeExactSolution(int i, int j, int k, int n, amrex::Ar
exact_arr(i, j, k, n) = dens;
}

template <> void AdvectionSimulation<SemiellipseProblem>::setInitialConditionsOnGrid(quokka::grid grid_elem)
template <> void AdvectionSimulation<SemiellipseProblem>::setInitialConditionsOnGrid_cc(quokka::grid grid_elem)
{
// extract variables required from the geom object
amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx = grid_elem.dx_;
Expand Down
8 changes: 4 additions & 4 deletions src/AdvectionSimulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ template <typename problem_t> class AdvectionSimulation : public AMRSimulation<p
void computeMaxSignalLocal(int level) override;
auto computeExtraPhysicsTimestep(int level) -> amrex::Real override;
void preCalculateInitialConditions() override;
void setInitialConditionsOnGrid(quokka::grid grid_elem) override;
void setInitialConditionsOnGridFaceVars(quokka::grid grid_elem) override;
void setInitialConditionsOnGrid_cc(quokka::grid grid_elem) override;
void setInitialConditionsOnGrid_fc(quokka::grid grid_elem) override;
void createInitialParticles() override;
void advanceSingleTimestepAtLevel(int lev, amrex::Real time, amrex::Real dt_lev, int /*ncycle*/) override;
void computeAfterTimestep() override;
Expand Down Expand Up @@ -136,13 +136,13 @@ template <typename problem_t> void AdvectionSimulation<problem_t>::preCalculateI
// user should implement using problem-specific template specialization
}

template <typename problem_t> void AdvectionSimulation<problem_t>::setInitialConditionsOnGrid(quokka::grid grid_elem)
template <typename problem_t> void AdvectionSimulation<problem_t>::setInitialConditionsOnGrid_cc(quokka::grid grid_elem)
{
// default empty implementation
// user should implement using problem-specific template specialization
}

template <typename problem_t> void AdvectionSimulation<problem_t>::setInitialConditionsOnGridFaceVars(quokka::grid grid_elem)
template <typename problem_t> void AdvectionSimulation<problem_t>::setInitialConditionsOnGrid_fc(quokka::grid grid_elem)
{
// default empty implementation
// user should implement using problem-specific template specialization
Expand Down
7 changes: 7 additions & 0 deletions src/AlfvenWave/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
add_executable(test_alfven_wave test_alfven_wave.cpp ../interpolate.cpp ${QuokkaObjSources})

if(AMReX_GPU_BACKEND MATCHES "CUDA")
setup_target_for_cuda_compilation(test_alfven_wave)
endif()

add_test(NAME AlfvenWave COMMAND test_alfven_wave alfven_wave.in WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
192 changes: 192 additions & 0 deletions src/AlfvenWave/test_alfven_wave.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
//==============================================================================
// Copyright 2022 Neco Kriel.
// Released under the MIT license. See LICENSE file included in the GitHub repo.
//==============================================================================
/// \file test_fc_quantities.cpp
/// \brief Defines a test problem to make sure face-centred quantities are created correctly.
///

#include <cassert>
#include <cmath>
#include <ostream>
#include <stdexcept>
#include <valarray>

#include "AMReX_Array.H"
#include "AMReX_Array4.H"
#include "AMReX_Print.H"
#include "AMReX_REAL.H"

#include "RadhydroSimulation.hpp"
#include "fextract.hpp"
#include "grid.hpp"
#include "physics_info.hpp"
#include "test_alfven_wave.hpp"

struct AlfvenWave {
};

template <> struct quokka::EOS_Traits<AlfvenWave> {
static constexpr double gamma = 5. / 3.;
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
};

template <> struct Physics_Traits<AlfvenWave> {
// cell-centred
static constexpr bool is_hydro_enabled = true;
static constexpr int numMassScalars = 0; // number of mass scalars
static constexpr int numPassiveScalars = numMassScalars + 0; // number of passive scalars
static constexpr bool is_radiation_enabled = false;
// face-centred
static constexpr bool is_mhd_enabled = true;
static constexpr int nGroups = 1; // number of radiation groups // TODO(Neco): shold this be zero?
};

// constants
constexpr double sound_speed = 1.0;
constexpr double gamma = 5. / 3.;

// we have set up the problem so that:
// the direction of wave propogation, vec(k), is aligned with the x1-direction
// the background magnetic field sits in the x1-x2 plane

// background states
constexpr double bg_density = 1.0;
constexpr double bg_pressure = 1.0;
constexpr double bg_mag_amplitude = 1.0;

// alignment of magnetic field with the direction of wave propogation (in the x1-x2 plane). recall that hat(k) = (1, 0, 0) and hat(delta_u) = (0, 1, 0)
constexpr double theta = 90.0; // degrees

// wave amplitude: box length = 1, so |k| in [0, 1]
constexpr double k_amplitude = 0.5;

// input perturbation: choose to do this via the relative denisty field in [0, 1]. remember, the linear regime is valid when this perturbation is small
constexpr double delta_b = 1e-8;

AMREX_GPU_DEVICE void computeWaveSolution(int i, int j, int k, amrex::Array4<amrex::Real> const &state, amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> const &dx, amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> const &prob_lo, quokka::centering cen, quokka::direction dir, double t)
{
const amrex::Real x1_L = prob_lo[0];
const amrex::Real x1_C = x1_L + (i + static_cast<amrex::Real>(0.5)) * dx[0];

const double cos_theta = std::cos(theta * M_PI / 180.0);
const double sin_theta = std::sin(theta * M_PI / 180.0);

const double alfven_speed = bg_mag_amplitude / std::sqrt(bg_density);
const double bg_mag_x1 = bg_mag_amplitude * cos_theta;
const double bg_mag_x2 = bg_mag_amplitude * sin_theta;
const double bg_mag_x3 = 0.0;

const double omega = std::sqrt(std::pow(alfven_speed,2) * std::pow(k_amplitude,2) * std::pow(cos_theta,2));

if (cen == quokka::centering::cc) {
const double cos_wave_C = std::cos(omega * t - k_amplitude * x1_C);

const double density = bg_density;
const double pressure = bg_pressure;
const double x1vel = 0;
const double x2vel = 0;
const double x3vel = -omega * delta_b / (sound_speed * k_amplitude * cos_theta) * cos_wave_C;
const double x1mag = bg_mag_x1 * cos_theta;
const double x2mag = bg_mag_x2 * sin_theta;
const double x3mag = bg_mag_x3 * delta_b * cos_wave_C;

const double Eint = pressure / (gamma - 1);
const double momentum = 0.5 * density * (std::pow(x1vel, 2) + std::pow(x2vel, 2) + std::pow(x3vel, 2));
const double Ekin = 0.5 * std::pow(momentum,2) / density;
const double Emag = 0.5 * (std::pow(x1mag, 2) + std::pow(x2mag, 2) + std::pow(x3mag, 2));
const double Etot = Ekin + Emag + Eint;

state(i, j, k, HydroSystem<AlfvenWave>::density_index) = density;
state(i, j, k, HydroSystem<AlfvenWave>::x1Momentum_index) = x1vel * density;
state(i, j, k, HydroSystem<AlfvenWave>::x2Momentum_index) = x2vel * density;
state(i, j, k, HydroSystem<AlfvenWave>::x3Momentum_index) = x3vel * density;
state(i, j, k, HydroSystem<AlfvenWave>::energy_index) = Etot;
state(i, j, k, HydroSystem<AlfvenWave>::internalEnergy_index) = Eint;
} else if (cen == quokka::centering::fc) {
const double cos_wave_L = std::cos(omega * t - k_amplitude * x1_L);

const double x1mag = bg_mag_x1 * cos_theta;
const double x2mag = bg_mag_x2 * sin_theta;
const double x3mag = bg_mag_x3 * delta_b * cos_wave_L;

if (dir == quokka::direction::x) {state(i, j, k, MHDSystem<AlfvenWave>::bfield_index) = x1mag;}
else if (dir == quokka::direction::y) {state(i, j, k, MHDSystem<AlfvenWave>::bfield_index) = x2mag;}
else if (dir == quokka::direction::z) {state(i, j, k, MHDSystem<AlfvenWave>::bfield_index) = x3mag;}
}
}

template <> void RadhydroSimulation<AlfvenWave>::setInitialConditionsOnGrid_cc(quokka::grid grid_elem)
{
// extract grid information
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx = grid_elem.dx_;
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> prob_lo = grid_elem.prob_lo_;
const amrex::Array4<double> &state_cc = grid_elem.array_;
const amrex::Box &indexRange = grid_elem.indexRange_;
const quokka::centering cen = grid_elem.cen_;
const quokka::direction dir = grid_elem.dir_;

const int ncomp_cc = Physics_Indices<AlfvenWave>::nvarTotal_cc;
// loop over the grid and set the initial condition
amrex::ParallelFor(indexRange, [=] AMREX_GPU_DEVICE(int i, int j, int k) {
for (int n = 0; n < ncomp_cc; ++n) {
state_cc(i, j, k, n) = 0; // fill unused quantities with zeros
}
computeWaveSolution(i, j, k, state_cc, dx, prob_lo, cen, dir, 0);
});
}

template <> void RadhydroSimulation<AlfvenWave>::setInitialConditionsOnGrid_fc(quokka::grid grid_elem)
{
// extract grid information
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx = grid_elem.dx_;
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> prob_lo = grid_elem.prob_lo_;
const amrex::Array4<double> &state_fc = grid_elem.array_;
const amrex::Box &indexRange = grid_elem.indexRange_;
const quokka::centering cen = grid_elem.cen_;
const quokka::direction dir = grid_elem.dir_;

const int ncomp_fc = Physics_Indices<AlfvenWave>::nvarPerDim_fc;
// loop over the grid and set the initial condition
amrex::ParallelFor(indexRange, [=] AMREX_GPU_DEVICE(int i, int j, int k) {
for (int n = 0; n < ncomp_fc; ++n) {
state_fc(i, j, k, n) = 0; // fill unused quantities with zeros
}
computeWaveSolution(i, j, k, state_fc, dx, prob_lo, cen, dir, 0);
});
}

auto problem_main() -> int
{
const int ncomp_cc = Physics_Indices<AlfvenWave>::nvarTotal_cc;
amrex::Vector<amrex::BCRec> BCs_cc(ncomp_cc);
for (int n = 0; n < ncomp_cc; ++n) {
for (int i = 0; i < AMREX_SPACEDIM; ++i) {
BCs_cc[n].setLo(i, amrex::BCType::int_dir); // periodic
BCs_cc[n].setHi(i, amrex::BCType::int_dir);
}
}

const int nvars_fc = Physics_Indices<AlfvenWave>::nvarTotal_fc;
amrex::Vector<amrex::BCRec> BCs_fc(nvars_fc);
for (int n = 0; n < nvars_fc; ++n) {
for (int i = 0; i < AMREX_SPACEDIM; ++i) {
BCs_fc[n].setLo(i, amrex::BCType::int_dir); // periodic
BCs_fc[n].setHi(i, amrex::BCType::int_dir);
}
}

RadhydroSimulation<AlfvenWave> sim(BCs_cc, BCs_fc);
sim.setInitialConditions();
sim.evolve();

// Compute test success condition
int status = 0;
const double error_tol = 0.002;
if (sim.errorNorm_ > error_tol) {
status = 1;
}

return status;
}
20 changes: 20 additions & 0 deletions src/AlfvenWave/test_alfven_wave.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef TEST_ALFVEN_WAVE_HPP_ // NOLINT
#define TEST_ALFVEN_WAVE_HPP_
//==============================================================================
// Copyright 2024 Neco Kriel.
// Released under the MIT license. See LICENSE file included in the GitHub repo.
//==============================================================================
/// \file test_alfven_wave.hpp
/// \brief Defines a test problem to check alfven waves propogate correctly.
///

// external headers
#include <fmt/format.h>

// internal headers
#include "hydro_system.hpp"
#include "mhd_system.hpp"

// function definitions

#endif // TEST_ALFVEN_WAVE_HPP_
2 changes: 1 addition & 1 deletion src/BinaryOrbitCIC/binary_orbit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ template <> struct SimulationData<BinaryOrbit> {
std::vector<amrex::ParticleReal> dist{};
};

template <> void RadhydroSimulation<BinaryOrbit>::setInitialConditionsOnGrid(quokka::grid grid_elem)
template <> void RadhydroSimulation<BinaryOrbit>::setInitialConditionsOnGrid_cc(quokka::grid grid_elem)
{
const amrex::Box &indexRange = grid_elem.indexRange_;
const amrex::Array4<double> &state_cc = grid_elem.array_;
Expand Down
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ add_subdirectory(Advection)
add_subdirectory(Advection2D)
add_subdirectory(AdvectionSemiellipse)

add_subdirectory(FCQuantities)
add_subdirectory(AlfvenWave)

add_subdirectory(HydroBlast2D)
add_subdirectory(HydroBlast3D)
add_subdirectory(HydroContact)
Expand Down Expand Up @@ -180,7 +183,6 @@ add_subdirectory(RadhydroPulseMG)

add_subdirectory(BinaryOrbitCIC)
add_subdirectory(Cooling)
add_subdirectory(FCQuantities)
add_subdirectory(NSCBC)
add_subdirectory(ODEIntegration)
add_subdirectory(PassiveScalar)
Expand Down
2 changes: 1 addition & 1 deletion src/Cooling/test_cooling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ template <> void RadhydroSimulation<CoolingTest>::preCalculateInitialConditions(
amrex::Gpu::streamSynchronize();
}

template <> void RadhydroSimulation<CoolingTest>::setInitialConditionsOnGrid(quokka::grid grid_elem)
template <> void RadhydroSimulation<CoolingTest>::setInitialConditionsOnGrid_cc(quokka::grid grid_elem)
{
// set initial conditions
amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx = grid_elem.dx_;
Expand Down
4 changes: 2 additions & 2 deletions src/FCQuantities/test_fc_quantities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ AMREX_GPU_DEVICE void computeWaveSolution(int i, int j, int k, amrex::Array4<amr
state(i, j, k, HydroSystem<FCQuantities>::internalEnergy_index) = Eint;
}

template <> void RadhydroSimulation<FCQuantities>::setInitialConditionsOnGrid(quokka::grid grid_elem)
template <> void RadhydroSimulation<FCQuantities>::setInitialConditionsOnGrid_cc(quokka::grid grid_elem)
{
// extract grid information
amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx = grid_elem.dx_;
Expand All @@ -89,7 +89,7 @@ template <> void RadhydroSimulation<FCQuantities>::setInitialConditionsOnGrid(qu
});
}

template <> void RadhydroSimulation<FCQuantities>::setInitialConditionsOnGridFaceVars(quokka::grid grid_elem)
template <> void RadhydroSimulation<FCQuantities>::setInitialConditionsOnGrid_fc(quokka::grid grid_elem)
{
// extract grid information
const amrex::Array4<double> &state = grid_elem.array_;
Expand Down
6 changes: 4 additions & 2 deletions src/HLLD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ AMREX_FORCE_INLINE AMREX_GPU_DEVICE auto FastMagnetoSonicSpeed(double gamma, quo
// HLLD solver following Miyoshi and Kusano (2005), hereafter MK5.
template <typename problem_t, int N_scalars, int N_mscalars, int fluxdim>
AMREX_FORCE_INLINE AMREX_GPU_DEVICE auto HLLD(quokka::HydroState<N_scalars, N_mscalars> const &sL, quokka::HydroState<N_scalars, N_mscalars> const &sR,
const double gamma, const double bx) -> quokka::valarray<double, fluxdim>
const double gamma, const double bx) -> std::tuple<quokka::valarray<double, fluxdim>, double, double>
{
//--- Step 1. Compute L/R states

Expand Down Expand Up @@ -96,6 +96,8 @@ AMREX_FORCE_INLINE AMREX_GPU_DEVICE auto HLLD(quokka::HydroState<N_scalars, N_ms
const double cfs_R = FastMagnetoSonicSpeed(gamma, sR, bx);
spds[0] = std::min(sL.u - cfs_L, sR.u - cfs_R);
spds[4] = std::max(sL.u + cfs_L, sR.u + cfs_R);
const double fspd_m = spds[0];
const double fspd_p = spds[0];
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would strongly prefer to avoid Fortran-style four-character variable names. In my opinion, there is no reason in the year 2024 not to use descriptive variables names that use full words.


//--- Step 3. Compute L/R fluxes

Expand Down Expand Up @@ -328,7 +330,7 @@ AMREX_FORCE_INLINE AMREX_GPU_DEVICE auto HLLD(quokka::HydroState<N_scalars, N_ms

// TODO(neco): Eint=0 for now; pscalars will also be needed in the future.
quokka::valarray<double, fluxdim> F_hydro = {f_x.rho, f_x.mx, f_x.my, f_x.mz, f_x.E, 0.0};
return F_hydro;
return std::make_tuple(std::move(F_hydro), fspd_m, fspd_p);
}
} // namespace quokka::Riemann

Expand Down
2 changes: 1 addition & 1 deletion src/HydroBlast2D/test_hydro2d_blast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ template <> struct Physics_Traits<BlastProblem> {
static constexpr int nGroups = 1; // number of radiation groups
};

template <> void RadhydroSimulation<BlastProblem>::setInitialConditionsOnGrid(quokka::grid grid_elem)
template <> void RadhydroSimulation<BlastProblem>::setInitialConditionsOnGrid_cc(quokka::grid grid_elem)
{
// extract variables required from the geom object
amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx = grid_elem.dx_;
Expand Down
2 changes: 1 addition & 1 deletion src/HydroBlast3D/test_hydro3d_blast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ template <> void RadhydroSimulation<SedovProblem>::preCalculateInitialConditions
}
}

template <> void RadhydroSimulation<SedovProblem>::setInitialConditionsOnGrid(quokka::grid grid_elem)
template <> void RadhydroSimulation<SedovProblem>::setInitialConditionsOnGrid_cc(quokka::grid grid_elem)
{
// initialize a Sedov test problem using parameters from
// Richard Klein and J. Bolstad
Expand Down
2 changes: 1 addition & 1 deletion src/HydroContact/test_hydro_contact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ template <> struct Physics_Traits<ContactProblem> {

constexpr double v_contact = 0.0; // contact wave velocity

template <> void RadhydroSimulation<ContactProblem>::setInitialConditionsOnGrid(quokka::grid grid_elem)
template <> void RadhydroSimulation<ContactProblem>::setInitialConditionsOnGrid_cc(quokka::grid grid_elem)
{
// extract variables required from the geom object
amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx = grid_elem.dx_;
Expand Down
2 changes: 1 addition & 1 deletion src/HydroHighMach/test_hydro_highmach.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ template <> struct Physics_Traits<HighMachProblem> {
static constexpr int nGroups = 1; // number of radiation groups
};

template <> void RadhydroSimulation<HighMachProblem>::setInitialConditionsOnGrid(quokka::grid grid_elem)
template <> void RadhydroSimulation<HighMachProblem>::setInitialConditionsOnGrid_cc(quokka::grid grid_elem)
{
// extract variables required from the geom object
amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> dx = grid_elem.dx_;
Expand Down
Loading