16 #ifndef dealii_time_dependent_h 17 # define dealii_time_dependent_h 37 template <
typename number>
39 template <
int dim,
int spacedim>
561 template <
typename InitFunctionObject,
typename LoopFunctionObject>
563 do_loop(InitFunctionObject init_function,
564 LoopFunctionObject loop_function,
616 "You cannot insert a time step at the specified position.");
624 std::vector<SmartPointer<TimeStepBase, TimeDependent>>
timesteps;
656 end_sweep(
const unsigned int begin_timestep,
const unsigned int end_timestep);
681 primal_problem = 0x0,
731 wake_up(
const unsigned int);
743 sleep(
const unsigned int);
779 init_for_primal_problem();
785 init_for_dual_problem();
791 init_for_postprocessing();
825 postprocess_timestep();
838 get_timestep_no()
const;
854 get_backward_timestep()
const;
862 get_forward_timestep()
const;
939 set_timestep_no(
const unsigned int step_no);
946 set_sweep_no(
const unsigned int sweep_no);
983 Flags(
const bool delete_and_rebuild_tria,
984 const unsigned int wakeup_level_to_build_grid,
985 const unsigned int sleep_level_to_delete_grid);
1146 std::vector<std::vector<std::pair<unsigned int, double>>>;
1158 const unsigned int first_sweep_with_correction = 0,
1159 const unsigned int min_cells_for_correction = 0,
1160 const double cell_number_corridor_top = (1 << dim),
1161 const double cell_number_corridor_bottom = 1,
1164 const unsigned int cell_number_correction_steps = 0,
1165 const bool mirror_flags_to_previous_grid =
false,
1166 const bool adapt_grids =
false);
1207 const std::vector<std::vector<std::pair<unsigned int, double>>>
1245 <<
"The value " << arg1
1246 <<
" for the cell number corridor does not fulfill " 1247 "its natural requirements.");
1265 const double coarsening_threshold = 0);
1286 <<
"The value " << arg1
1287 <<
" for the cell refinement thresholds does not fulfill " 1288 "its natural requirements.");
1336 grid_refinement = 0x1000
1365 const Flags & flags,
1395 wake_up(
const unsigned int wakeup_level)
override;
1411 sleep(
const unsigned int)
override;
1436 init_for_refinement();
1446 get_tria_refinement_criteria(Vector<float> &criteria)
const = 0;
1453 save_refine_flags();
1470 "When calling restore_grid(), you must have previously " 1471 "deleted the triangulation.");
1528 template <
typename InitFunctionObject,
typename LoopFunctionObject>
1531 LoopFunctionObject loop_function,
1546 const unsigned int n_timesteps =
timesteps.size();
1550 for (
unsigned int step = 0; step < n_timesteps; ++step)
1557 init_function((&*
timesteps[n_timesteps - step - 1]));
1563 for (
int step = -static_cast<int>(timestepping_data.
look_ahead); step < 0;
1566 look_ahead <= static_cast<int>(timestepping_data.
look_ahead);
1575 if (n_timesteps - (step +
look_ahead) < n_timesteps)
1581 for (
unsigned int step = 0; step < n_timesteps; ++step)
1609 loop_function((&*
timesteps[n_timesteps - step - 1]));
1623 if (n_timesteps - (step -
look_back) <= n_timesteps)
1631 for (
int step = n_timesteps;
1632 step < static_cast<int>(n_timesteps + timestepping_data.
look_back);
1635 look_back <= static_cast<int>(timestepping_data.
look_back);
1641 (step - look_back < static_cast<int>(n_timesteps)))
1646 (step - look_back < static_cast<int>(n_timesteps)))
const unsigned int look_back
const std::vector< std::vector< std::pair< unsigned int, double > > > correction_relaxations
TimeDependent(const TimeSteppingData &data_primal, const TimeSteppingData &data_dual, const TimeSteppingData &data_postprocess)
void solve_primal_problem()
void add_timestep(TimeStepBase *new_timestep)
void solve_dual_problem()
const TimeStepBase * next_timestep
const TimeSteppingData timestepping_data_postprocess
const unsigned int wakeup_level_to_build_grid
const TimeStepBase * previous_timestep
const TimeSteppingData timestepping_data_dual
const unsigned int cell_number_correction_steps
const unsigned int max_refinement_level
SmartPointer< const Triangulation< dim, dim >, TimeStepBase_Tria< dim > > coarse_grid
const double cell_number_corridor_top
void do_loop(InitFunctionObject init_function, LoopFunctionObject loop_function, const TimeSteppingData ×tepping_data, const Direction direction)
const RefinementFlags refinement_flags
std::vector< std::vector< std::pair< unsigned int, double > >> CorrectionRelaxations
#define DeclException1(Exception1, type1, outsequence)
std::size_t memory_consumption() const
std::vector< SmartPointer< TimeStepBase, TimeDependent > > timesteps
#define DeclExceptionMsg(Exception, defaulttext)
const TimeSteppingData timestepping_data_primal
static ::ExceptionBase & ExcInvalidPosition()
virtual void start_sweep(const unsigned int sweep_no)
#define DEAL_II_NAMESPACE_CLOSE
static CorrectionRelaxations default_correction_relaxations
const unsigned int first_sweep_with_correction
const unsigned int sleep_level_to_delete_grid
const double coarsening_threshold
void delete_timestep(const unsigned int position)
typename TimeStepBase_Tria_Flags::RefinementFlags< dim > RefinementFlags
#define DEAL_II_NAMESPACE_OPEN
typename TimeStepBase_Tria_Flags::Flags< dim > Flags
const double cell_number_corridor_bottom
const unsigned int look_ahead
const bool mirror_flags_to_previous_grid
const unsigned int min_cells_for_correction
void insert_timestep(const TimeStepBase *position, TimeStepBase *new_timestep)
std::vector< std::vector< bool > > refine_flags
const double refinement_threshold
typename TimeStepBase_Tria_Flags::RefinementData< dim > RefinementData
SmartPointer< Triangulation< dim, dim >, TimeStepBase_Tria< dim > > tria
std::vector< std::vector< bool > > coarsen_flags
const bool delete_and_rebuild_tria
TimeSteppingData(const unsigned int look_ahead, const unsigned int look_back)