Reference documentation for deal.II version 9.5.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\}}\)
Loading...
Searching...
No Matches
theta_timestepping.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2010 - 2023 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16
17#ifndef dealii_theta_timestepping_h
18#define dealii_theta_timestepping_h
19
20#include <deal.II/base/config.h>
21
24
26
28
29// Forward declaration
30#ifndef DOXYGEN
32#endif
33
34namespace Algorithms
35{
46 {
48 double time;
50 double step;
51 };
52
286 template <typename VectorType>
288 {
289 public:
296
308 virtual void
309 operator()(AnyData &out, const AnyData &in) override;
310
314 virtual void
315 notify(const Event &) override;
316
321 void
323
327 static void
329
333 void
335
339 double
340 current_time() const;
341
345 double
346 theta() const;
347
351 double
352 theta(double new_theta);
353
360 const TimestepData &
361 explicit_data() const;
362
369 const TimestepData &
370 implicit_data() const;
371
377
378 private:
384
389 double vtheta;
394
399
404
405
417
429
435 };
436
437
438 template <typename VectorType>
439 inline const TimestepData &
441 {
442 return d_explicit;
443 }
444
445
446 template <typename VectorType>
447 inline const TimestepData &
449 {
450 return d_implicit;
451 }
452
453
454 template <typename VectorType>
455 inline TimestepControl &
457 {
458 return control;
459 }
460
461 template <typename VectorType>
462 inline void
464 {
465 output = &out;
466 }
467
468
469 template <typename VectorType>
470 inline double
472 {
473 return vtheta;
474 }
475
476
477 template <typename VectorType>
478 inline double
480 {
481 const double tmp = vtheta;
482 vtheta = new_theta;
483 return tmp;
484 }
485
486
487 template <typename VectorType>
488 inline double
490 {
491 return control.now();
492 }
493} // namespace Algorithms
494
496
497#endif
void parse_parameters(ParameterHandler &param)
const TimestepData & implicit_data() const
ThetaTimestepping(OperatorBase &op_explicit, OperatorBase &op_implicit)
static void declare_parameters(ParameterHandler &param)
SmartPointer< OutputOperator< VectorType >, ThetaTimestepping< VectorType > > output
virtual void operator()(AnyData &out, const AnyData &in) override
virtual void notify(const Event &) override
SmartPointer< OperatorBase, ThetaTimestepping< VectorType > > op_implicit
SmartPointer< OperatorBase, ThetaTimestepping< VectorType > > op_explicit
void set_output(OutputOperator< VectorType > &output)
const TimestepData & explicit_data() const
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
double time
The current time.
double step
The current step size times something.