deal.II version GIT relicensing-6839-g338455934c 2026-10-02 12:10:01+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: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2010 - 2024 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13
14#ifndef dealii_theta_timestepping_h
15#define dealii_theta_timestepping_h
16
17#include <deal.II/base/config.h>
18
21
23
25
26// Forward declaration
27#ifndef DOXYGEN
29#endif
30
31namespace Algorithms
32{
43 {
45 double time;
47 double step;
48 };
49
283 template <typename VectorType>
285 {
286 public:
292 ThetaTimestepping(OperatorBase &op_explicit, OperatorBase &op_implicit);
293
305 virtual void
306 operator()(AnyData &out, const AnyData &in) override;
307
311 virtual void
312 notify(const Event &) override;
313
318 void
319 set_output(OutputOperator<VectorType> &output);
320
324 static void
326
330 void
332
336 double
337 current_time() const;
338
342 double
343 theta() const;
344
348 double
349 theta(double new_theta);
350
357 const TimestepData &
358 explicit_data() const;
359
366 const TimestepData &
367 implicit_data() const;
368
373 timestep_control();
374
375 private:
381
386 double vtheta;
391
396
401
402
414
426
432 };
433
434
435 template <typename VectorType>
436 inline const TimestepData &
438 {
439 return d_explicit;
440 }
441
442
443 template <typename VectorType>
444 inline const TimestepData &
446 {
447 return d_implicit;
448 }
449
450
451 template <typename VectorType>
452 inline TimestepControl &
454 {
455 return control;
456 }
457
458 template <typename VectorType>
459 inline void
464
465
466 template <typename VectorType>
467 inline double
469 {
470 return vtheta;
471 }
472
473
474 template <typename VectorType>
475 inline double
477 {
478 const double tmp = vtheta;
479 vtheta = new_theta;
480 return tmp;
481 }
482
483
484 template <typename VectorType>
485 inline double
487 {
488 return control.now();
489 }
490} // namespace Algorithms
491
493
494#endif
void parse_parameters(ParameterHandler &param)
const TimestepData & implicit_data() const
ThetaTimestepping(OperatorBase &op_explicit, OperatorBase &op_implicit)
static void declare_parameters(ParameterHandler &param)
ObserverPointer< OperatorBase, ThetaTimestepping< VectorType > > op_explicit
ObserverPointer< OperatorBase, ThetaTimestepping< VectorType > > op_implicit
ObserverPointer< OutputOperator< VectorType >, ThetaTimestepping< VectorType > > output
virtual void operator()(AnyData &out, const AnyData &in) override
virtual void notify(const Event &) override
void set_output(OutputOperator< VectorType > &output)
const TimestepData & explicit_data() const
#define DEAL_II_DEPRECATED
Definition config.h:294
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
double time
The current time.
double step
The current step size times something.