|
Reference documentation for deal.II version 9.2.0
|
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\)
\(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\)
\(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\)
\(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Go to the documentation of this file.
16 #ifndef dealii_time_dependent_h
17 # define dealii_time_dependent_h
37 template <
typename number>
39 template <
int dim,
int spacedim>
437 const TimeSteppingData &data_dual,
438 const TimeSteppingData &data_postprocess);
561 template <
typename InitFunctionObject,
typename LoopFunctionObject>
563 do_loop(InitFunctionObject init_function,
564 LoopFunctionObject loop_function,
565 const TimeSteppingData ×tepping_data,
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);
743 sleep(
const unsigned int);
1146 std::vector<std::vector<std::pair<unsigned int, double>>>;
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.");
1286 <<
"The value " << arg1
1287 <<
" for the cell refinement thresholds does not fulfill "
1288 "its natural requirements.");
1395 wake_up(
const unsigned int wakeup_level)
override;
1411 sleep(
const unsigned int)
override;
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;
1565 for (
int look_ahead = 0;
1566 look_ahead <= static_cast<int>(timestepping_data.
look_ahead);
1571 if (step + look_ahead >= 0)
1572 timesteps[step + look_ahead]->wake_up(look_ahead);
1575 if (n_timesteps - (step + look_ahead) < n_timesteps)
1576 timesteps[n_timesteps - (step + look_ahead)]->wake_up(look_ahead);
1581 for (
unsigned int step = 0; step < n_timesteps; ++step)
1585 for (
unsigned int look_ahead = 0;
1591 if (step + look_ahead < n_timesteps)
1592 timesteps[step + look_ahead]->wake_up(look_ahead);
1595 if (n_timesteps > (step + look_ahead))
1596 timesteps[n_timesteps - (step + look_ahead) - 1]->wake_up(
1609 loop_function((&*
timesteps[n_timesteps - step - 1]));
1614 for (
unsigned int look_back = 0; look_back <= timestepping_data.
look_back;
1619 if (step >= look_back)
1620 timesteps[step - look_back]->sleep(look_back);
1623 if (n_timesteps - (step - look_back) <= n_timesteps)
1624 timesteps[n_timesteps - (step - look_back) - 1]->sleep(
1631 for (
int step = n_timesteps;
1632 step < static_cast<int>(n_timesteps + timestepping_data.
look_back);
1634 for (
int look_back = 0;
1635 look_back <= static_cast<int>(timestepping_data.
look_back);
1640 if ((step - look_back >= 0) &&
1641 (step - look_back < static_cast<int>(n_timesteps)))
1642 timesteps[step - look_back]->sleep(look_back);
1645 if ((step - look_back >= 0) &&
1646 (step - look_back < static_cast<int>(n_timesteps)))
1647 timesteps[n_timesteps - (step - look_back) - 1]->sleep(look_back);
const unsigned int wakeup_level_to_build_grid
#define DeclExceptionMsg(Exception, defaulttext)
typename TimeStepBase_Tria_Flags::RefinementFlags< dim > RefinementFlags
const double coarsening_threshold
TimeSteppingData(const unsigned int look_ahead, const unsigned int look_back)
void add_timestep(TimeStepBase *new_timestep)
const unsigned int look_back
SmartPointer< Triangulation< dim, dim >, TimeStepBase_Tria< dim > > tria
RefinementFlags(const unsigned int max_refinement_level=0, const unsigned int first_sweep_with_correction=0, const unsigned int min_cells_for_correction=0, const double cell_number_corridor_top=(1<< dim), const double cell_number_corridor_bottom=1, const CorrectionRelaxations &correction_relaxations=CorrectionRelaxations(), const unsigned int cell_number_correction_steps=0, const bool mirror_flags_to_previous_grid=false, const bool adapt_grids=false)
static ::ExceptionBase & ExcInvalidValue(double arg1)
SmartPointer< const Triangulation< dim, dim >, TimeStepBase_Tria< dim > > coarse_grid
const bool delete_and_rebuild_tria
std::vector< std::vector< bool > > coarsen_flags
const unsigned int cell_number_correction_steps
void set_previous_timestep(const TimeStepBase *previous)
const double cell_number_corridor_bottom
virtual void wake_up(const unsigned int)
const TimeSteppingData timestepping_data_postprocess
virtual std::size_t memory_consumption() const
const bool mirror_flags_to_previous_grid
TimeStepBase & operator=(const TimeStepBase &)=delete
void solve_dual_problem()
std::vector< std::vector< std::pair< unsigned int, double > >> CorrectionRelaxations
const TimeStepBase * next_timestep
void delete_timestep(const unsigned int position)
virtual std::size_t memory_consumption() const override
static ::ExceptionBase & ExcInvalidPosition()
virtual void init_for_postprocessing()
virtual void sleep(const unsigned int) override
const unsigned int min_cells_for_correction
virtual void postprocess_timestep()
void solve_primal_problem()
const unsigned int sleep_level_to_delete_grid
static ::ExceptionBase & ExcInvalidValue(double arg1)
typename TimeStepBase_Tria_Flags::RefinementData< dim > RefinementData
const double refinement_threshold
std::size_t memory_consumption() const
#define DEAL_II_NAMESPACE_OPEN
virtual void init_for_refinement()
virtual void start_sweep()
TimeStepBase(const double time)
#define DeclException1(Exception1, type1, outsequence)
void set_sweep_no(const unsigned int sweep_no)
const TimeSteppingData timestepping_data_dual
void set_timestep_no(const unsigned int step_no)
static CorrectionRelaxations default_correction_relaxations
std::vector< std::vector< bool > > refine_flags
const unsigned int max_refinement_level
void set_next_timestep(const TimeStepBase *next)
static ::ExceptionBase & ExcGridNotDeleted()
const TimeStepBase * previous_timestep
void refine_grid(const RefinementData data)
const double cell_number_corridor_top
virtual ~TimeStepBase() override=default
const unsigned int first_sweep_with_correction
void insert_timestep(const TimeStepBase *position, TimeStepBase *new_timestep)
double get_backward_timestep() const
typename TimeStepBase_Tria_Flags::Flags< dim > Flags
unsigned int get_timestep_no() const
const TimeSteppingData timestepping_data_primal
virtual void solve_primal_problem()=0
virtual void start_sweep(const unsigned int sweep_no)
virtual void sleep(const unsigned int)
virtual void wake_up(const unsigned int wakeup_level) override
virtual ~TimeStepBase_Tria() override
#define DEAL_II_NAMESPACE_CLOSE
void do_loop(InitFunctionObject init_function, LoopFunctionObject loop_function, const TimeSteppingData ×tepping_data, const Direction direction)
const std::vector< std::vector< std::pair< unsigned int, double > > > correction_relaxations
virtual void solve_dual_problem()
virtual void get_tria_refinement_criteria(Vector< float > &criteria) const =0
virtual void init_for_primal_problem()
const unsigned int look_ahead
RefinementData(const double refinement_threshold, const double coarsening_threshold=0)
double get_forward_timestep() const
std::vector< SmartPointer< TimeStepBase, TimeDependent > > timesteps
TimeDependent(const TimeSteppingData &data_primal, const TimeSteppingData &data_dual, const TimeSteppingData &data_postprocess)
virtual void init_for_dual_problem()
const RefinementFlags refinement_flags