include/meltpooldg/compressible_flow/dg_operator_explicit.hpp Source File

Developer Documentation: include/meltpooldg/compressible_flow/dg_operator_explicit.hpp Source File
Developer Documentation
dg_operator_explicit.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <deal.II/lac/la_parallel_vector.h>
4
5#include <deal.II/matrix_free/matrix_free.h>
6
16
17#include <functional>
18#include <memory>
19#include <utility>
20
22{
31 template <int dim, typename number, int n_species = 1>
32 class DGOperatorExplicit final : public DGOperatorBase<dim, number, n_species>
33 {
34 public:
35 using VectorType = dealii::LinearAlgebra::distributed::Vector<number>;
36
39
42
46 n_species,
47 number,
51
54
56
64
76 void
77 advance_time_step(number time, number time_step) override;
78
85 void
86 reinit() override;
87
101 void
102 apply_operator(number time,
103 number time_step,
104 VectorType &dst,
105 const VectorType &src,
106 const std::function<void(unsigned int, unsigned int)> &func) const;
107
113 void
115 std::shared_ptr<ExternalFlowForceJacobian<dim, number, n_species>>) override;
116
117 private:
120
123
126 std::vector<std::shared_ptr<ExternalFlowForce<dim, number, n_species>>> external_forces;
127
129 mutable number current_time_step;
130
137 bool
138 is_viscous() const;
139
151 void
152 local_apply_cell(const dealii::MatrixFree<dim, number> &matrix_free,
153 VectorType &dst,
154 const VectorType &src,
155 const std::pair<unsigned int, unsigned int> &cell_range) const;
156
168 void
169 local_apply_face(const dealii::MatrixFree<dim, number> &matrix_free,
170 VectorType &dst,
171 const VectorType &src,
172 const std::pair<unsigned int, unsigned int> &face_range) const;
173
185 void
186 local_apply_boundary_face(const dealii::MatrixFree<dim, number> &matrix_free,
187 VectorType &dst,
188 const VectorType &src,
189 const std::pair<unsigned int, unsigned int> &face_range) const;
190 };
191} // namespace MeltPoolDG::CompressibleFlow
Interface of the compressible flow operator interacting with the compressible flow operation.
Definition dg_operator_base.hpp:15
Operator for the matrix-free evaluation of a compressible single-phase flow cutDG formulation for exp...
Definition dg_operator_explicit.hpp:33
SourceType< dim, number, n_species > FlowSourceType
Definition dg_operator_explicit.hpp:41
std::vector< std::shared_ptr< ExternalFlowForce< dim, number, n_species > > > external_forces
Definition dg_operator_explicit.hpp:126
void local_apply_boundary_face(const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &face_range) const
Local boundary face applier.
Definition dg_operator_explicit.cpp:254
dealii::LinearAlgebra::distributed::Vector< number > VectorType
Definition dg_operator_explicit.hpp:35
void local_apply_cell(const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &cell_range) const
Local cell applier.
Definition dg_operator_explicit.cpp:120
void add_external_force(std::shared_ptr< ExternalFlowForce< dim, number, n_species > > external_force, std::shared_ptr< ExternalFlowForceJacobian< dim, number, n_species > >) override
Add external fluid forces (e.g. gravity, ...).
Definition dg_operator_explicit.cpp:110
FluxType< dim, number, n_species > FlowFluxType
Definition dg_operator_explicit.hpp:40
TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number > time_integrator
Time integrator class used for the time integration.
Definition dg_operator_explicit.hpp:122
ConservedVariablesGradientType< dim, number, n_species > ConservedVariablesGradient
Definition dg_operator_explicit.hpp:38
void apply_operator(number time, number time_step, VectorType &dst, const VectorType &src, const std::function< void(unsigned int, unsigned int)> &func) const
Computes the value of the function f(y) for the compressible Navier-Stokes equations of the form y' =...
Definition dg_operator_explicit.cpp:73
OperationScratchData< dim, number > & flow_scratch_data
Scratch data for compressible flows.
Definition dg_operator_explicit.hpp:119
NSpeciesConvectiveFlux< dim, n_species, number, ConservedVariables, FlowFluxType > ConvectiveKernel
Definition dg_operator_explicit.hpp:44
void advance_time_step(number time, number time_step) override
Advances solver by a single time step.
Definition dg_operator_explicit.cpp:41
void reinit() override
Reinitialize the internal data structures.
Definition dg_operator_explicit.cpp:33
void local_apply_face(const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &face_range) const
Local face applier.
Definition dg_operator_explicit.cpp:171
NSpeciesDiffusiveFlux< dim, n_species, number, ConservedVariables, ConservedVariablesGradient, FlowFluxType > DiffusiveKernel
Definition dg_operator_explicit.hpp:50
number current_time_step
Current time step size.
Definition dg_operator_explicit.hpp:129
ConservedVariablesType< dim, number, n_species > ConservedVariables
Definition dg_operator_explicit.hpp:37
bool is_viscous() const
Definition dg_operator_explicit.cpp:63
Definition explicit_low_storage_runge_kutta_integrator.hpp:33
This file contains various functions that can be used to set and evaluate boundary conditions for the...
Definition boundary_condition_functions.hpp:17
dealii::Tensor< 1, n_conserved_variables< dim, n_species >, dealii::VectorizedArray< number > > SourceType
Definition data_types.hpp:70
typename ConcreteConvectiveFluxImpl< dim, n_species, number, Value, Flux >::type NSpeciesConvectiveFlux
Definition kernels_n_species.hpp:34
dealii::Tensor< 1, n_conserved_variables< dim, n_species >, dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > > FluxType
Definition data_types.hpp:51
typename ConcreteDiffusiveFluxImpl< dim, n_species, number, Value, Gradient, Flux >::type NSpeciesDiffusiveFlux
Definition kernels_n_species.hpp:64
dealii::Tensor< 1, n_conserved_variables< dim, n_species >, dealii::Tensor< 1, dim, VectorizedArrayType > > ConservedVariablesGradientType
Definition data_types.hpp:44
dealii::Tensor< 1, n_conserved_variables< dim, n_species >, VectorizedArrayType > ConservedVariablesType
Definition data_types.hpp:35
An abstract interface for defining external forces acting on the fluid that must be evaluated and inc...
Definition utils.hpp:117
Scratch data structure for compressible single-phase flow solvers.
Definition operation_scratch_data.hpp:33
Definition dg_generic_convection_diffusion_worker.hpp:232
Definition dg_generic_convection_diffusion_worker.hpp:67