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_STRUCTURE_SPATIAL_DISCRETIZATION_INTERFACE_H_
23#define EXADG_STRUCTURE_SPATIAL_DISCRETIZATION_INTERFACE_H_
24
25// deal.II
26#include <deal.II/lac/la_parallel_vector.h>
27
28// ExaDG
29#include <exadg/structure/time_integration/time_int_gen_alpha.h>
30
31namespace ExaDG
32{
33namespace Structure
34{
35namespace Interface
36{
37template<typename Number>
38class Operator
39{
40public:
41 typedef dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
42
43 Operator()
44 {
45 }
46
47 virtual ~Operator()
48 {
49 }
50
51 virtual void
52 initialize_dof_vector(VectorType & src) const = 0;
53
54 virtual void
55 prescribe_initial_displacement(VectorType & displacement, double const time) const = 0;
56
57 virtual void
58 prescribe_initial_velocity(VectorType & velocity, double const time) const = 0;
59
60 virtual void
61 compute_initial_acceleration(VectorType & acceleration,
62 VectorType const & displacement,
63 double const time) const = 0;
64
65 virtual void
66 evaluate_mass_operator(VectorType & dst, VectorType const & src) const = 0;
67
68 virtual void
69 apply_add_damping_operator(VectorType & dst, VectorType const & src) const = 0;
70
71 virtual std::tuple<unsigned int, unsigned int>
72 solve_nonlinear(VectorType & sol,
73 VectorType const & rhs,
74 double const scaling_factor_acceleration,
75 double const scaling_factor_velocity,
76 double const time,
77 bool const update_preconditioner) const = 0;
78
79 virtual void
80 rhs(VectorType & dst, double const time) const = 0;
81
82 virtual unsigned int
83 solve_linear(VectorType & sol,
84 VectorType const & rhs,
85 double const scaling_factor_acceleration,
86 double const scaling_factor_velocity,
87 double const time,
88 bool const update_preconditioner) const = 0;
89};
90
91} // namespace Interface
92} // namespace Structure
93} // namespace ExaDG
94
95#endif /* EXADG_STRUCTURE_SPATIAL_DISCRETIZATION_INTERFACE_H_ */
Definition driver.cpp:33