Skip to content
Snippets Groups Projects
Commit 5c2340e2 authored by jstark's avatar jstark
Browse files

Adding save intermediate states of Sussman redistancing at interval_check_convergence.

parent 0913d794
No related branches found
No related tags found
1 merge request!15FD_solver to develop Upstream
......@@ -487,6 +487,13 @@ private:
{
print_out_iteration_change_residual(grid, i);
}
if (redistOptions.save_temp_grid)
{
get_upwind_gradient<Phi_n_temp, Phi_0_sign_temp, Phi_grad_temp>(g_temp, order_upwind_gradient, true);
g_temp.setPropNames({"Phi_Sussman_Out", "Phi_upwind_gradient", "Phi_0_sign_temp"});
g_temp.save("g_temp_redistancing_iteration_" + std::to_string(i) + ".hdf5"); // HDF5 file
// g_temp.write_frame("g_temp_redistancing_iteration", i, FORMAT_BINARY); // VTK file
}
if (i >= redistOptions.min_iter)
{
if (steady_state_NB(grid))
......@@ -512,8 +519,8 @@ private:
{
get_upwind_gradient<Phi_n_temp, Phi_0_sign_temp, Phi_grad_temp>(g_temp, order_upwind_gradient, true);
g_temp.setPropNames({"Phi_Sussman_Out", "Phi_upwind_gradient", "Phi_0_sign_temp"});
g_temp.save("g_temp_redistancing.hdf5"); // HDF5 file
g_temp.write("g_temp_redistancing", FORMAT_BINARY); // VTK file
g_temp.save("g_temp_redistancing_final.hdf5"); // HDF5 file
// g_temp.write("g_temp_redistancing_final", FORMAT_BINARY); // VTK file
}
}
};
......
......@@ -151,6 +151,8 @@ BOOST_AUTO_TEST_SUITE(RedistancingSussmanFastTestSuite)
redist_options.print_current_iterChangeResidual = true;
redist_options.print_steadyState_iter = true;
redist_options.save_temp_grid = false;
RedistancingSussman<grid_in_type, phi_type> redist_obj(g_dist, redist_options); // Instantiation of
std::cout << "Automatically found timestep is " << redist_obj.get_time_step() << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment