Commit 7b74048a authored by Santiago Ospina's avatar Santiago Ospina
Browse files

[Richards] Move flux reconstruction to the end of each time step

parent 8642d67a
......@@ -209,6 +209,18 @@ void RichardsSimulation<Traits>::step()
DUNE_THROW(Dune::Exception, "Critical error in Newton solver");
}
// Update flux reconstruction to the new solution
if constexpr (enable_fluxrc_st)
if (enable_fluxrc_dy)
try {
waterfrgf->update(*u);
} catch (Dune::Exception &e) {
this->_log->debug(" Flux Reconstruction failed");
this->_log->error(" Unexpected error in flux reconstruction: {}",
e.what());
DUNE_THROW(Dune::Exception, "Critical error in flux reconstruction");
}
// saving last times for adaptivity
time_before = time;
dt_before = dt;
......@@ -253,9 +265,6 @@ void RichardsSimulation<Traits>::update_adapters () const
condgf = std::make_shared<GFConductivity>(gv, fparam);
waterdgf = std::make_shared<GFWaterContent>(udgf, gv, fparam);
satdgf = std::make_shared<GFSaturation>(udgf, gv, fparam);
if constexpr (enable_fluxrc_st)
if (enable_fluxrc_dy)
waterfrgf->update(*u);
}
template<typename Traits>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment