Reference documentation for deal.II version 8.1.0
theta_timestepping.h
1 // ---------------------------------------------------------------------
2 // @f$Id: theta_timestepping.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 2010 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 
18 #ifndef __deal2__theta_timestepping_h
19 #define __deal2__theta_timestepping_h
20 
21 #include <deal.II/base/smartpointer.h>
22 #include <deal.II/algorithms/operator.h>
23 #include <deal.II/algorithms/timestep_control.h>
24 
26 
27 class ParameterHandler;
28 
29 namespace Algorithms
30 {
41  struct TimestepData
42  {
44  double time;
46  double step;
47  };
48 
172  template <class VECTOR>
173  class ThetaTimestepping : public Operator<VECTOR>
174  {
175  public:
185 
191  virtual void operator() (NamedData<VECTOR *> &out, const NamedData<VECTOR *> &in);
192 
197  virtual void notify(const Event &);
198 
207 
208  void declare_parameters (ParameterHandler &param);
209  void initialize (ParameterHandler &param);
214  const double &current_time() const;
218  const double &step_size() const;
223  const double &theta() const;
224 
236  const TimestepData &explicit_data() const;
237 
249  const TimestepData &implicit_data() const;
250 
255 
256  private:
263 
268  double vtheta;
273  bool adaptive;
274 
280 
286 
287 
309 
332 
338  };
339 
340 
341  template <class VECTOR>
342  inline
343  const TimestepData &
345  {
346  return d_explicit;
347  }
348 
349 
350  template <class VECTOR>
351  inline
352  const TimestepData &
354  {
355  return d_implicit;
356  }
357 
358  template <class VECTOR>
359  inline
361  {
362  output = &out;
363  }
364 }
365 
366 DEAL_II_NAMESPACE_CLOSE
367 
368 #endif
void set_output(OutputOperator< VECTOR > &output)
const double & theta() const
ThetaTimestepping(Operator< VECTOR > &op_explicit, Operator< VECTOR > &op_implicit)
virtual void operator()(NamedData< VECTOR * > &out, const NamedData< VECTOR * > &in)
double time
The current time.
SmartPointer< Operator< VECTOR >, ThetaTimestepping< VECTOR > > op_implicit
SmartPointer< OutputOperator< VECTOR >, ThetaTimestepping< VECTOR > > output
const double & step_size() const
double step
The current step size times something.
const double & current_time() const
const TimestepData & explicit_data() const
TimestepControl & timestep_control()
const TimestepData & implicit_data() const
SmartPointer< Operator< VECTOR >, ThetaTimestepping< VECTOR > > op_explicit