ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
convection_diffusion
time_integration
create_time_integrator.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_CONVECTION_DIFFUSION_TIME_INTEGRATION_CREATE_TIME_INTEGRATOR_H_
23
#define EXADG_CONVECTION_DIFFUSION_TIME_INTEGRATION_CREATE_TIME_INTEGRATOR_H_
24
25
// ExaDG
26
#include <exadg/convection_diffusion/time_integration/time_int_bdf.h>
27
#include <exadg/convection_diffusion/time_integration/time_int_explicit_runge_kutta.h>
28
#include <exadg/convection_diffusion/user_interface/parameters.h>
29
30
namespace
ExaDG
31
{
32
namespace
ConvDiff
33
{
37
template
<
int
dim,
typename
Number>
38
std::shared_ptr<TimeIntBase>
39
create_time_integrator(std::shared_ptr<
Operator<dim, Number>
> pde_operator,
40
std::shared_ptr<HelpersALE<dim, Number>
const
> helpers_ale,
41
std::shared_ptr<
PostProcessorInterface<Number>
> postprocessor,
42
Parameters
const
& parameters,
43
MPI_Comm
const
& mpi_comm,
44
bool
const
is_test)
45
{
46
std::shared_ptr<TimeIntBase> time_integrator;
47
48
if
(parameters.temporal_discretization == TemporalDiscretization::ExplRK)
49
{
50
time_integrator = std::make_shared<TimeIntExplRK<Number>>(
51
pde_operator, postprocessor, parameters, mpi_comm, is_test);
52
}
53
else
if
(parameters.temporal_discretization == TemporalDiscretization::BDF)
54
{
55
time_integrator = std::make_shared<TimeIntBDF<dim, Number>>(
56
pde_operator, helpers_ale, postprocessor, parameters, mpi_comm, is_test);
57
}
58
else
59
{
60
AssertThrow(parameters.temporal_discretization == TemporalDiscretization::ExplRK or
61
parameters.temporal_discretization == TemporalDiscretization::BDF,
62
dealii::ExcMessage(
"Specified time integration scheme is not implemented!"
));
63
}
64
65
return
time_integrator;
66
}
67
68
}
// namespace ConvDiff
69
}
// namespace ExaDG
70
71
#endif
/* EXADG_CONVECTION_DIFFUSION_TIME_INTEGRATION_CREATE_TIME_INTEGRATOR_H_ */
ExaDG::ConvDiff::Operator
Definition
operator.h:49
ExaDG::ConvDiff::Parameters
Definition
parameters.h:46
ExaDG::ConvDiff::PostProcessorInterface
Definition
postprocessor_base.h:44
ExaDG
Definition
driver.cpp:33
Generated by
1.17.0