hyper.deal
Loading...
Searching...
No Matches
time_integrators.h
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2020 by the hyper.deal authors
4//
5// This file is part of the hyper.deal library.
6//
7// The hyper.deal 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 3.0 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 hyper.deal.
13//
14// ---------------------------------------------------------------------
15
16#ifndef HYPERDEAL_FUNCTIONALITIES_TIME_INGEGRATORS
17#define HYPERDEAL_FUNCTIONALITIES_TIME_INGEGRATORS
18
19#include <hyper.deal/base/config.h>
20
21#include <deal.II/base/config.h>
22
23#include <deal.II/base/exceptions.h>
24
25#include <deal.II/lac/petsc_block_vector.h>
26#include <deal.II/lac/petsc_vector.h>
27#include <deal.II/lac/trilinos_parallel_block_vector.h>
28#include <deal.II/lac/trilinos_vector.h>
29
30#include <functional>
31#include <string>
32#include <type_traits>
33#include <vector>
34
35namespace hyperdeal
36{
47 template <typename Number, typename VectorType>
49 {
50 public:
57 LowStorageRungeKuttaIntegrator(VectorType & vec_Ki,
58 VectorType & vec_Ti,
59 const std::string type,
60 const bool only_Ti_is_ghosted = true);
61
68 void
70 VectorType & solution,
71 const Number &current_time,
72 const Number &time_step,
73 const std::function<void(const VectorType &, VectorType &, const Number)>
74 &op);
75
76 unsigned int
77 n_stages() const;
78
79 private:
84 VectorType &vec_Ki;
85
89 VectorType &vec_Ti;
90
94 const bool only_Ti_is_ghosted;
95
99 std::vector<Number> ai, bi;
100
104 static constexpr bool manual_compress =
105 false
106#ifdef DEAL_II_WITH_PETSC
107 || std::is_same_v<VectorType, dealii::PETScWrappers::MPI::Vector> ||
108 std::is_same_v<VectorType, dealii::PETScWrappers::MPI::BlockVector>
109#endif
110#ifdef DEAL_II_WITH_TRILINOS
111 || std::is_same_v<VectorType, dealii::TrilinosWrappers::MPI::Vector> ||
112 std::is_same_v<VectorType, dealii::TrilinosWrappers::MPI::BlockVector>
113#endif
114 ;
115 };
116
117
118} // namespace hyperdeal
119
120#endif
Definition time_integrators.h:49
void perform_time_step(VectorType &solution, const Number &current_time, const Number &time_step, const std::function< void(const VectorType &, VectorType &, const Number)> &op)
Definition time_integrators.templates.h:93
LowStorageRungeKuttaIntegrator(VectorType &vec_Ki, VectorType &vec_Ti, const std::string type, const bool only_Ti_is_ghosted=true)
Definition time_integrators.templates.h:24