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