54 bool max_tolerance_met =
false;
57 Real single_norm(0.), double_norm(0.), error_norm(0.),
60 while (!max_tolerance_met)
69 libMesh::out <<
"\n === Computing adaptive timestep === " 79 std::unique_ptr<NumericVector<Number>> double_solution =
81 std::unique_ptr<NumericVector<Number>> old_solution =
87 libMesh::out <<
"Double norm = " << double_norm << std::endl;
111 libMesh::out <<
"Single norm = " << single_norm << std::endl;
132 if (!double_norm && !single_norm)
137 libMesh::out <<
"Error norm = " << error_norm << std::endl;
174 max_tolerance_met =
true;
187 const Real global_shrink_or_growth_factor =
191 const Real local_shrink_or_growth_factor =
193 (error_norm/
std::max(double_norm, single_norm)),
199 << global_shrink_or_growth_factor << std::endl;
201 << local_shrink_or_growth_factor << std::endl;
210 Real shrink_or_growth_factor =
212 local_shrink_or_growth_factor;
218 libMesh::out <<
"delta t is constrained by max_growth" << std::endl;
230 libMesh::out <<
"delta t is constrained by maximum-allowable delta t." 241 libMesh::out <<
"delta t is constrained by minimum-allowable delta t."
virtual Real calculate_norm(System &, NumericVector< Number > &)
virtual std::unique_ptr< NumericVector< T > > clone() const =0
long double max(long double a, double b)
const NumericVector< Number > & get_vector(const std::string &vec_name) const
std::unique_ptr< NumericVector< Number > > solution
unsigned int reduce_deltat_on_diffsolver_failure
double pow(double a, int b)
TwostepTimeSolver(sys_type &s)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void solve() override
OStreamProxy out(std::cout)
std::unique_ptr< UnsteadySolver > core_time_solver