ExaDG
Loading...
Searching...
No Matches
time_int_bdf_coupled_solver.h
1/* ______________________________________________________________________
2 *
3 * ExaDG - High-Order Discontinuous Galerkin for the Exa-Scale
4 *
5 * Copyright (C) 2021 by the ExaDG authors
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 * ______________________________________________________________________
20 */
21
22#ifndef INCLUDE_EXADG_INCOMPRESSIBLE_NAVIER_STOKES_TIME_INTEGRATION_TIME_INT_BDF_COUPLED_SOLVER_H_
23#define INCLUDE_EXADG_INCOMPRESSIBLE_NAVIER_STOKES_TIME_INTEGRATION_TIME_INT_BDF_COUPLED_SOLVER_H_
24
25// deal.II
26#include <deal.II/lac/la_parallel_block_vector.h>
27
28// ExaDG
29#include <exadg/incompressible_navier_stokes/time_integration/time_int_bdf.h>
30
31namespace ExaDG
32{
33namespace IncNS
34{
35// forward declarations
36template<int dim, typename Number>
37class OperatorCoupled;
38
39template<int dim, typename Number>
40class TimeIntBDFCoupled : public TimeIntBDF<dim, Number>
41{
42private:
44
45 typedef typename Base::VectorType VectorType;
46
47 typedef dealii::LinearAlgebra::distributed::BlockVector<Number> BlockVectorType;
48
50
51public:
52 TimeIntBDFCoupled(std::shared_ptr<Operator> operator_in,
53 std::shared_ptr<HelpersALE<dim, Number> const> helpers_ale_in,
54 std::shared_ptr<PostProcessorInterface<Number>> postprocessor_in,
55 Parameters const & param_in,
56 MPI_Comm const & mpi_comm_in,
57 bool const is_test_in);
58
59 void
60 postprocessing_stability_analysis();
61
62 void
63 print_iterations() const final;
64
65 VectorType const &
66 get_velocity() const final;
67
68 VectorType const &
69 get_velocity_np() const final;
70
71 VectorType const &
72 get_pressure() const final;
73
74 VectorType const &
75 get_pressure_np() const final;
76
77private:
78 void
79 allocate_vectors() final;
80
81 void
82 setup_derived() final;
83
84 void
85 initialize_current_solution() final;
86
87 void
88 initialize_former_multistep_dof_vectors() final;
89
90 void
91 do_timestep_solve() final;
92
93 void
94 solve_steady_problem() final;
95
96 double
97 evaluate_residual();
98
99 void
100 penalty_step();
101
102 void
103 prepare_vectors_for_next_timestep() final;
104
105 VectorType const &
106 get_velocity(unsigned int i /* t_{n-i} */) const final;
107
108 VectorType const &
109 get_pressure(unsigned int i /* t_{n-i} */) const final;
110
111 void
112 set_velocity(VectorType const & velocity, unsigned int const i /* t_{n-i} */) final;
113
114 void
115 set_pressure(VectorType const & pressure, unsigned int const i /* t_{n-i} */) final;
116
117 std::shared_ptr<Operator> pde_operator;
118
119 std::vector<BlockVectorType> solution;
120 BlockVectorType solution_np;
121
122 // required for strongly-coupled partitioned FSI
123 BlockVectorType solution_last_iter;
124 VectorType velocity_penalty_last_iter;
125
126 // iteration counts
127 std::pair<
128 unsigned int /* calls */,
129 std::tuple<unsigned long long, unsigned long long> /* iteration counts {Newton, linear} */>
130 iterations;
131 std::pair<unsigned int /* calls */, unsigned long long /* iteration counts */> iterations_penalty;
132
133 // scaling factor continuity equation
134 double scaling_factor_continuity;
135 double characteristic_element_length;
136};
137
138} // namespace IncNS
139} // namespace ExaDG
140
141#endif /* INCLUDE_EXADG_INCOMPRESSIBLE_NAVIER_STOKES_TIME_INTEGRATION_TIME_INT_BDF_COUPLED_SOLVER_H_ \
142 */
Definition lambda_functions_ale.h:40
Definition operator_coupled.h:189
Definition parameters.h:46
Definition postprocessor_interface.h:34
Definition time_int_bdf_coupled_solver.h:41
Definition time_int_bdf.h:46
Definition driver.cpp:33