ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
incompressible_navier_stokes
time_integration
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 EXADG_INCOMPRESSIBLE_NAVIER_STOKES_TIME_INTEGRATION_TIME_INT_BDF_COUPLED_SOLVER_H_
23
#define 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
31
namespace
ExaDG
32
{
33
namespace
IncNS
34
{
35
// forward declarations
36
template
<
int
dim,
typename
Number>
37
class
OperatorCoupled
;
38
39
template
<
int
dim,
typename
Number>
40
class
TimeIntBDFCoupled :
public
TimeIntBDF<dim, Number>
41
{
42
private
:
43
typedef
TimeIntBDF<dim, Number> Base;
44
45
typedef
typename
Base::VectorType VectorType;
46
47
typedef
dealii::LinearAlgebra::distributed::BlockVector<Number> BlockVectorType;
48
49
typedef
OperatorCoupled<dim, Number>
Operator;
50
51
public
:
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
77
private
:
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
update_after_deserialization()
final
;
92
93
void
94
do_timestep_solve()
final
;
95
96
void
97
solve_steady_problem()
final
;
98
99
double
100
evaluate_residual();
101
102
void
103
evaluate_right_hand_side(BlockVectorType & rhs,
104
bool
const
residual_evaluation,
105
BlockVectorType
const
& solution_np,
106
VectorType
const
& transport_velocity,
107
VectorType
const
& sum_alphai_ui);
108
109
void
110
penalty_step();
111
112
void
113
prepare_vectors_for_next_timestep()
final
;
114
115
VectorType
const
&
116
get_velocity(
unsigned
int
i
/* t_{n-i} */
)
const
final
;
117
118
VectorType
const
&
119
get_pressure(
unsigned
int
i
/* t_{n-i} */
)
const
final
;
120
121
void
122
set_velocity(VectorType
const
& velocity,
unsigned
int
const
i
/* t_{n-i} */
)
final
;
123
124
void
125
set_pressure(VectorType
const
& pressure,
unsigned
int
const
i
/* t_{n-i} */
)
final
;
126
127
std::shared_ptr<Operator> pde_operator;
128
129
std::vector<BlockVectorType> solution;
130
BlockVectorType solution_np;
131
132
// required for strongly-coupled partitioned FSI
133
BlockVectorType solution_last_iter;
134
VectorType velocity_penalty_last_iter;
135
136
// iteration counts
137
std::pair<
138
unsigned
int
/* calls */
,
139
std::tuple<unsigned long long, unsigned long long>
/* iteration counts {Newton, linear} */
>
140
iterations;
141
std::pair<
unsigned
int
/* calls */
,
unsigned
long
long
/* iteration counts */
> iterations_penalty;
142
143
// scaling factor continuity equation
144
double
scaling_factor_continuity;
145
double
characteristic_element_length;
146
};
147
148
}
// namespace IncNS
149
}
// namespace ExaDG
150
151
#endif
/* EXADG_INCOMPRESSIBLE_NAVIER_STOKES_TIME_INTEGRATION_TIME_INT_BDF_COUPLED_SOLVER_H_ \
152
*/
ExaDG::HelpersALE
Definition
lambda_functions_ale.h:40
ExaDG::IncNS::OperatorCoupled
Definition
operator_coupled.h:190
ExaDG::IncNS::Parameters
Definition
parameters.h:46
ExaDG::IncNS::PostProcessorInterface
Definition
postprocessor_interface.h:37
ExaDG
Definition
driver.cpp:33
Generated by
1.17.0