ExaDG
Loading...
Searching...
No Matches
viscosity_model_base.h
1/* ______________________________________________________________________
2 *
3 * ExaDG - High-Order Discontinuous Galerkin for the Exa-Scale
4 *
5 * Copyright (C) 2023 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_INCOMPRESSIBLE_NAVIER_STOKES_SPATIAL_DISCRETIZATION_VISCOSITY_MODEL_BASE_H_
23#define INCLUDE_EXADG_INCOMPRESSIBLE_NAVIER_STOKES_SPATIAL_DISCRETIZATION_VISCOSITY_MODEL_BASE_H_
24
25// deal.II
26#include <deal.II/lac/la_parallel_vector.h>
27
28// ExaDG
29#include <exadg/incompressible_navier_stokes/spatial_discretization/operators/viscous_operator.h>
30#include <exadg/incompressible_navier_stokes/user_interface/parameters.h>
31#include <exadg/incompressible_navier_stokes/user_interface/viscosity_model_data.h>
32#include <exadg/matrix_free/integrators.h>
33
34namespace ExaDG
35{
36namespace IncNS
37{
41template<int dim, typename Number>
42class ViscosityModelBase : public dealii::Subscriptor
43{
44private:
45 typedef dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
46
47public:
48 /*
49 * Constructor.
50 */
52
53 /*
54 * Destructor.
55 */
56 virtual ~ViscosityModelBase(){};
57
58 /*
59 * Initialization function of base class.
60 */
61 void
62 initialize(dealii::MatrixFree<dim, Number> const & matrix_free_in,
63 std::shared_ptr<Operators::ViscousKernel<dim, Number>> viscous_kernel_in,
64 unsigned int const dof_index_velocity_in);
65
69 virtual void
70 set_viscosity(VectorType const & velocity) const = 0;
71
76 virtual void
77 add_viscosity(VectorType const & velocity) const = 0;
78
79protected:
80 unsigned int dof_index_velocity;
81
82 dealii::MatrixFree<dim, Number> const * matrix_free;
83
84 std::shared_ptr<Operators::ViscousKernel<dim, Number>> viscous_kernel;
85};
86
87} // namespace IncNS
88} // namespace ExaDG
89
90#endif /* INCLUDE_EXADG_INCOMPRESSIBLE_NAVIER_STOKES_SPATIAL_DISCRETIZATION_VISCOSITY_MODEL_BASE_H_ \
91 */
Definition viscous_operator.h:49
Definition viscosity_model_base.h:43
virtual void set_viscosity(VectorType const &velocity) const =0
virtual void add_viscosity(VectorType const &velocity) const =0
Definition driver.cpp:33