Reference documentation for deal.II version GIT relicensing-245-g36f19064f7 2024-03-29 07:20:02+00:00
\(\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// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2010 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15
16#ifndef dealii_theta_timestepping_h
17#define dealii_theta_timestepping_h
18
19#include <deal.II/base/config.h>
20
23
25
27
28// Forward declaration
29#ifndef DOXYGEN
31#endif
32
33namespace Algorithms
34{
45 {
47 double time;
49 double step;
50 };
51
285 template <typename VectorType>
287 {
288 public:
295
307 virtual void
308 operator()(AnyData &out, const AnyData &in) override;
309
313 virtual void
314 notify(const Event &) override;
315
320 void
322
326 static void
328
332 void
334
338 double
339 current_time() const;
340
344 double
345 theta() const;
346
350 double
351 theta(double new_theta);
352
359 const TimestepData &
360 explicit_data() const;
361
368 const TimestepData &
369 implicit_data() const;
370
376
377 private:
383
388 double vtheta;
393
398
403
404
416
428
434 };
435
436
437 template <typename VectorType>
438 inline const TimestepData &
440 {
441 return d_explicit;
442 }
443
444
445 template <typename VectorType>
446 inline const TimestepData &
448 {
449 return d_implicit;
450 }
451
452
453 template <typename VectorType>
454 inline TimestepControl &
456 {
457 return control;
458 }
459
460 template <typename VectorType>
461 inline void
466
467
468 template <typename VectorType>
469 inline double
471 {
472 return vtheta;
473 }
474
475
476 template <typename VectorType>
477 inline double
479 {
480 const double tmp = vtheta;
481 vtheta = new_theta;
482 return tmp;
483 }
484
485
486 template <typename VectorType>
487 inline double
489 {
490 return control.now();
491 }
492} // namespace Algorithms
493
495
496#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:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
double time
The current time.
double step
The current step size times something.