Skip to content

Commit

Permalink
delete function to initialize background quantities on this branch
Browse files Browse the repository at this point in the history
  • Loading branch information
erickurquilla1999 committed May 22, 2024
1 parent 6de21e6 commit eda852c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 30 deletions.
2 changes: 0 additions & 2 deletions Source/Evolve.H
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ namespace GIdx

amrex::Real compute_dt(const amrex::Geometry& geom, const MultiFab& state, const FlavoredNeutrinoContainer& neutrinos, const TestParams* parms);

void init_background_to_mesh(FlavoredNeutrinoContainer& neutrinos_rhs, const MultiFab& state, const Geometry& geom, const TestParams* parms);

void deposit_to_mesh(const FlavoredNeutrinoContainer& neutrinos, amrex::MultiFab& state, const amrex::Geometry& geom);

void interpolate_rhs_from_mesh(FlavoredNeutrinoContainer& neutrinos_rhs, const amrex::MultiFab& state, const amrex::Geometry& geom, const TestParams* parms);
Expand Down
25 changes: 0 additions & 25 deletions Source/Evolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,31 +103,6 @@ Real compute_dt(const Geometry& geom, const MultiFab& state, const FlavoredNeutr
return dt;
}

void init_background_to_mesh(FlavoredNeutrinoContainer& neutrinos_rhs, const MultiFab& state, const Geometry& geom, const TestParams* parms)
{
const auto plo = geom.ProbLoArray();
const auto dxi = geom.InvCellSizeArray();

amrex::MeshToParticle(neutrinos_rhs, state, 0,
[=] AMREX_GPU_DEVICE (FlavoredNeutrinoContainer::ParticleType& p,
amrex::Array4<const amrex::Real> const& sarr)
{
double x,y,z;

for (int k = 0; k < parms->ncell[2]; ++k) {
for (int j = 0; j < parms->ncell[1]; ++j) {
for (int i = 0; i < parms->ncell[0]; ++i) {

x = plo[0] + dxi[0] * i + dxi[0] / 2.0;
y = plo[1] + dxi[1] * j + dxi[1] / 2.0;
z = plo[2] + dxi[2] * k + dxi[2] / 2.0;

}
}
}
});
}

void deposit_to_mesh(const FlavoredNeutrinoContainer& neutrinos, MultiFab& state, const Geometry& geom)
{
const auto plo = geom.ProbLoArray();
Expand Down
4 changes: 1 addition & 3 deletions Source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ void evolve_flavor(const TestParams* parms)

// Deposit particles to grid
deposit_to_mesh(neutrinos_old, state, geom);

init_background_to_mesh(neutrinos_old, state, geom, parms);


// Write plotfile after initialization
DataReducer rd;
if (not parms->do_restart) {
Expand Down

0 comments on commit eda852c

Please sign in to comment.