Skip to content

Commit

Permalink
Merge branch 'main' into sundials_work
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnonaka committed Aug 19, 2024
2 parents 06a65a7 + 12189b2 commit 5058bea
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions ExampleCodes/SUNDIALS/Source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,11 @@ void main_main ()
WriteSingleLevelPlotfile(pltfile, phi, {"phi"}, geom, time, 0);
}

auto pre_rhs_function = [&](MultiFab& S_data, const Real /* time */) {
auto rhs_function = [&](MultiFab& S_rhs, MultiFab& S_data,
const Real /* time */) {

// fill periodic ghost cells
S_data.FillBoundary(geom.periodicity());
};

// auto post_step_function = [&](MultiFab& S_data, const Real /* time */) {
// // fill periodic ghost cells
// S_data.FillBoundary(geom.periodicity());
// };

auto rhs_function = [&](MultiFab& S_rhs, const MultiFab& S_data,
const Real /* time */) {

// loop over boxes
auto& phi_data = S_data;
Expand All @@ -203,8 +196,6 @@ void main_main ()
};

TimeIntegrator<MultiFab> integrator(phi, time);
integrator.set_pre_rhs_action(pre_rhs_function);
// integrator.set_post_step_action(post_step_function);
integrator.set_rhs(rhs_function);
if (adapt_dt) {
integrator.set_adaptive_step();
Expand Down

0 comments on commit 5058bea

Please sign in to comment.