ExaDG
Loading...
Searching...
No Matches
interface.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_COMPRESSIBLE_NAVIER_STOKES_SPATIAL_DISCRETIZATION_INTERFACE_H_
23#define EXADG_COMPRESSIBLE_NAVIER_STOKES_SPATIAL_DISCRETIZATION_INTERFACE_H_
24
25// deal.II
26#include <deal.II/lac/la_parallel_vector.h>
27
28namespace ExaDG
29{
30namespace CompNS
31{
32namespace Interface
33{
34template<typename Number>
35class Operator
36{
37public:
38 typedef dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
39
40 Operator()
41 {
42 }
43
44 virtual ~Operator()
45 {
46 }
47
48 // time integration: initialize dof vectors
49 virtual void
50 initialize_dof_vector(VectorType & src) const = 0;
51
52 // time integration: prescribe initial conditions
53 virtual void
54 prescribe_initial_conditions(VectorType & src, double const evaluation_time) const = 0;
55
56 // time step calculation: CFL condition
57 virtual double
58 calculate_time_step_cfl_global() const = 0;
59
60 // Calculate time step size according to diffusion term
61 virtual double
62 calculate_time_step_diffusion() const = 0;
63
64 // explicit time integration: evaluate operator
65 virtual void
66 evaluate(VectorType & dst, VectorType const & src, Number const evaluation_time) const = 0;
67
68 // analysis of computational costs
69 virtual double
70 get_wall_time_operator_evaluation() const = 0;
71};
72
73} // namespace Interface
74} // namespace CompNS
75} // namespace ExaDG
76
77#endif /* EXADG_COMPRESSIBLE_NAVIER_STOKES_SPATIAL_DISCRETIZATION_INTERFACE_H_ */
Definition driver.cpp:33