1 #ifndef _pf_step_time_h_
2 #define _pf_step_time_h_
5 void Phaseflow<dim>::set_time_step_size(
const double _new_size)
7 double new_size = _new_size;
9 if (new_size < this->params.time.min_step_size)
11 new_size = this->params.time.min_step_size;
13 else if(new_size > this->params.time.max_step_size)
15 new_size = this->params.time.max_step_size;
18 if ((this->time + new_size) > this->params.time.end)
20 new_size = this->params.time.end - this->time;
23 if (numbers::NumberTraits<double>::abs(new_size - this->time_step_size) >
EPSILON)
25 std::cout <<
"Set time step to deltat = " << new_size << std::endl;
28 this->time_step_size = new_size;
40 void Phaseflow<dim>::step_time()
42 this->old_solution = this->solution;
48 this->new_time = this->time + this->time_step_size;
50 converged = this->solve_nonlinear_problem();
59 this->time = this->new_time;
61 std::cout <<
"Reached time t = " << this->time << std::endl;
63 if (this->time >= (this->params.time.end -
EPSILON))
const double EPSILON
Definition: pf_global_parameters.h:24
const double TIME_GROWTH_RATE
Definition: pf_global_parameters.h:28