ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
incompressible_navier_stokes
time_integration
driver_steady_problems.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_DRIVER_STEADY_PROBLEMS_H_
23
#define EXADG_INCOMPRESSIBLE_NAVIER_STOKES_TIME_INTEGRATION_DRIVER_STEADY_PROBLEMS_H_
24
25
// deal.II
26
#include <deal.II/base/timer.h>
27
#include <deal.II/lac/la_parallel_block_vector.h>
28
#include <deal.II/lac/la_parallel_vector.h>
29
30
// ExaDG
31
#include <exadg/utilities/timer_tree.h>
32
33
namespace
ExaDG
34
{
35
namespace
IncNS
36
{
37
// forward declarations
38
class
Parameters
;
39
40
template
<
int
dim,
typename
Number>
41
class
OperatorCoupled
;
42
43
template
<
typename
Number>
44
class
PostProcessorInterface
;
45
46
template
<
int
dim,
typename
Number>
47
class
DriverSteadyProblems
48
{
49
public
:
50
typedef
dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
51
typedef
dealii::LinearAlgebra::distributed::BlockVector<Number> BlockVectorType;
52
53
DriverSteadyProblems(std::shared_ptr<
OperatorCoupled<dim, Number>
> operator_,
54
std::shared_ptr<
PostProcessorInterface<Number>
> postprocessor_,
55
Parameters
const
& param_,
56
MPI_Comm
const
& mpi_comm_,
57
bool
const
is_test_);
58
59
void
60
setup();
61
62
void
63
solve(
double
const
time = 0.0,
bool
unsteady_problem =
false
);
64
65
VectorType
const
&
66
get_velocity()
const
;
67
68
std::shared_ptr<TimerTree>
69
get_timings()
const
;
70
71
void
72
print_iterations()
const
;
73
74
private
:
75
void
76
initialize_vectors();
77
78
void
79
initialize_solution();
80
81
void
82
do_solve(
double
const
time = 0.0,
bool
unsteady_problem =
false
);
83
84
bool
85
print_solver_info(
double
const
time,
bool
unsteady_problem =
false
)
const
;
86
87
void
88
postprocessing(
double
const
time = 0.0,
bool
unsteady_problem =
false
)
const
;
89
90
std::shared_ptr<OperatorCoupled<dim, Number>> pde_operator;
91
92
Parameters
const
& param;
93
94
MPI_Comm
const
mpi_comm;
95
96
bool
is_test;
97
98
dealii::Timer global_timer;
99
std::shared_ptr<TimerTree> timer_tree;
100
101
dealii::ConditionalOStream pcout;
102
103
BlockVectorType solution;
104
BlockVectorType rhs_vector;
105
106
std::shared_ptr<PostProcessorInterface<Number>> postprocessor;
107
108
// iteration counts
109
std::pair<
110
unsigned
int
/* calls */
,
111
std::tuple<unsigned long long, unsigned long long>
/* iteration counts {Newton, linear} */
>
112
iterations;
113
};
114
115
}
// namespace IncNS
116
}
// namespace ExaDG
117
118
#endif
/* EXADG_INCOMPRESSIBLE_NAVIER_STOKES_TIME_INTEGRATION_DRIVER_STEADY_PROBLEMS_H_ */
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