35 #include "libmesh/getpot.h"
36 #include "libmesh/error_vector.h"
49 libMesh::Real sim_time;
61 std::time_t first_wall_time = std::time(NULL);
65 for (
unsigned int t_step=0; t_step < this->
_n_timesteps; t_step++)
67 std::time_t latest_wall_time = std::time(NULL);
69 std::cout <<
"==========================================================" << std::endl
70 <<
" Beginning time step " << t_step <<
71 ", t = " << context.
system->time <<
72 ", dt = " << context.
system->deltat <<
73 ", runtime = " << (latest_wall_time - first_wall_time) <<
75 <<
"==========================================================" << std::endl;
83 std::cout <<
"==========================================================" << std::endl
84 <<
"Adaptive Refinement Step " << r_step << std::endl
85 <<
"==========================================================" << std::endl;
89 sim_time = context.
system->time;
103 libMesh::perflog.print_log();
110 libMesh::ErrorVector error;
119 std::cout <<
"==========================================================" << std::endl
120 <<
"Convergence detected!" << std::endl
121 <<
"==========================================================" << std::endl;
134 context.
system->time_solver->advance_timestep();
138 std::time_t final_wall_time = std::time(NULL);
139 std::cout <<
"==========================================================" << std::endl
140 <<
" Ending time stepping, t = " << context.
system->time <<
141 ", runtime = " << (final_wall_time - first_wall_time) <<
143 <<
"==========================================================" << std::endl;
UnsteadyMeshAdaptiveSolver(const GetPot &input)
unsigned int _n_timesteps
SharedPtr< libMesh::EquationSystems > equation_system
SharedPtr< PostProcessedQuantities< libMesh::Real > > postprocessing
void build_mesh_refinement(libMesh::MeshBase &mesh)
virtual void solve(SolverContext &context)
void perform_amr(SolverContext &context, const libMesh::ErrorVector &error)
void estimate_error_for_amr(SolverContext &context, libMesh::ErrorVector &error)
bool check_for_convergence(SolverContext &context, const libMesh::ErrorVector &error) const
unsigned int timesteps_per_perflog
SharedPtr< QoIOutput > qoi_output
unsigned int timesteps_per_vis
GRINS::MultiphysicsSystem * system
SharedPtr< GRINS::Visualization > vis
void print_scalar_vars(SolverContext &context)
Simple class to hold objects passed to Solver::solve.
void print_qoi(SolverContext &context)
unsigned int max_refinement_steps() const
void update_dirichlet_bcs(SolverContext &context)
Updates Dirichlet boundary conditions.
MeshAdaptivityOptions _mesh_adaptivity_options