DGOperatorExplicit< dim, number, n_species > Class Template Reference

Developer Documentation: MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species > Class Template Reference
Developer Documentation
MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species > Class Template Referencefinal

Operator for the matrix-free evaluation of a compressible single-phase flow cutDG formulation for explicit time integration. More...

#include <dg_operator_explicit.hpp>

Inheritance diagram for MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >:
[legend]
Collaboration diagram for MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >:
[legend]

Public Types

using VectorType = dealii::LinearAlgebra::distributed::Vector< number >
 
using ConservedVariables = ConservedVariablesType< dim, number, n_species >
 
using ConservedVariablesGradient = ConservedVariablesGradientType< dim, number, n_species >
 
using FlowFluxType = FluxType< dim, number, n_species >
 
using FlowSourceType = SourceType< dim, number, n_species >
 
using ConvectiveKernel = NSpeciesConvectiveFlux< dim, n_species, number, ConservedVariables, FlowFluxType >
 
using DiffusiveKernel = NSpeciesDiffusiveFlux< dim, n_species, number, ConservedVariables, ConservedVariablesGradient, FlowFluxType >
 
using ConvectionDiffusionOperator = Utils::DGConvectionDiffusionOperator< dim, number, ConvectiveKernel, DiffusiveKernel >
 
using ConvectionOperator = Utils::DGConvectionOperator< dim, number, ConvectiveKernel >
 

Public Member Functions

 DGOperatorExplicit (OperationScratchData< dim, number > &flow_scratch_data)
 Constructor.
 
void advance_time_step (number time, number time_step) override
 Advances solver by a single time step.
 
void reinit () override
 Reinitialize the internal data structures.
 
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' = f(y).
 
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, ...).
 
- Public Member Functions inherited from MeltPoolDG::CompressibleFlow::DGOperatorBase< dim, number, n_species >
virtual ~DGOperatorBase ()=default
 

Private Member Functions

bool is_viscous () const
 
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.
 
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.
 
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.
 

Private Attributes

OperationScratchData< dim, number > & flow_scratch_data
 Scratch data for compressible flows.
 
TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number > time_integrator
 Time integrator class used for the time integration.
 
std::vector< std::shared_ptr< ExternalFlowForce< dim, number, n_species > > > external_forces
 
number current_time_step
 Current time step size.
 

Detailed Description

template<int dim, typename number, int n_species = 1>
class MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >

Operator for the matrix-free evaluation of a compressible single-phase flow cutDG formulation for explicit time integration.

Template Parameters
dimDimension of the considered simulation case.
numberFloating point format type.
n_speciesThe number of species in a multi-component case. The default value is 1 for a single-component flow.

Member Typedef Documentation

◆ ConservedVariables

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::ConservedVariables = ConservedVariablesType<dim, number, n_species>

◆ ConservedVariablesGradient

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::ConservedVariablesGradient = ConservedVariablesGradientType<dim, number, n_species>

◆ ConvectionDiffusionOperator

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::ConvectionDiffusionOperator = Utils::DGConvectionDiffusionOperator<dim, number, ConvectiveKernel, DiffusiveKernel>

◆ ConvectionOperator

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::ConvectionOperator = Utils::DGConvectionOperator<dim, number, ConvectiveKernel>

◆ ConvectiveKernel

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::ConvectiveKernel = NSpeciesConvectiveFlux<dim, n_species, number, ConservedVariables, FlowFluxType>

◆ DiffusiveKernel

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::DiffusiveKernel = NSpeciesDiffusiveFlux<dim, n_species, number, ConservedVariables, ConservedVariablesGradient, FlowFluxType>

◆ FlowFluxType

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::FlowFluxType = FluxType<dim, number, n_species>

◆ FlowSourceType

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::FlowSourceType = SourceType<dim, number, n_species>

◆ VectorType

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::VectorType = dealii::LinearAlgebra::distributed::Vector<number>

Constructor & Destructor Documentation

◆ DGOperatorExplicit()

template<int dim, typename number , int n_species>
MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::DGOperatorExplicit ( OperationScratchData< dim, number > &  flow_scratch_data)
explicit

Constructor.

Parameters
flow_scratch_dataReference to the flow scratch data object (usually owned by the corresponding operation class).

Member Function Documentation

◆ add_external_force()

template<int dim, typename number , int n_species>
void MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::add_external_force ( std::shared_ptr< ExternalFlowForce< dim, number, n_species > >  external_force,
std::shared_ptr< ExternalFlowForceJacobian< dim, number, n_species > >   
)
overridevirtual

Add external fluid forces (e.g. gravity, ...).

Parameters
external_forceA provided shared pointer to an external force definition.

Implements MeltPoolDG::CompressibleFlow::DGOperatorBase< dim, number, n_species >.

◆ advance_time_step()

template<int dim, typename number , int n_species>
void MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::advance_time_step ( number  time,
number  time_step 
)
overridevirtual

Advances solver by a single time step.

This function performs a single explicit time step of size time_step starting from the solution at time time.

Note
The function does not take care about updating the solution history object or similar operations which are not directly related to the integration. It only advances the solution by a single time step starting from the current solution in the solution history object of the flow_scratch_data object.

Implements MeltPoolDG::CompressibleFlow::DGOperatorBase< dim, number, n_species >.

◆ apply_operator()

template<int dim, typename number , int n_species>
void MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::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' = f(y).

From a discretization perspective, f(y) is given by f(y) = M^(-1) * F(y), where M is the mass matrix and F(y) is the sum of all flux contributions: F_v + F_c + F_rhs.

Parameters
timeThe current time at which the function is evaluated.
dstVector where the computed value of f(y) is stored.
srcThe solution vector, y, at the current time.
funcA function to be executed after f(y) has been computed. This function is applied to the resulting vector in dst.

◆ is_viscous()

template<int dim, typename number , int n_species>
bool MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::is_viscous ( ) const
private

Return true if the flow is viscous, false otherwise. In single component flows, this is determined by the value of the dynamic viscosity in the material data. In multi-component flows, a flow is considered viscous if the dynamic viscosity is greater than zero for at least one of the components.

◆ local_apply_boundary_face()

template<int dim, typename number , int n_species = 1>
void MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::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
private

Local boundary face applier.

Computes the boundary face contribution to the rhs if the compressible Navier-Stokes equations are written in the form y'=rhs(y).

Parameters
matrix_freeMatrix free object on which the applier works on.
dstDestination vector to which the result is added.
srcCurrent solution.
face_rangeBoundary face range which is considered in the applier.

◆ local_apply_cell()

template<int dim, typename number , int n_species = 1>
void MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::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
private

Local cell applier.

Computes the cell contribution to the rhs if the compressible Navier-Stokes equations are written in the form y'=rhs(y).

Parameters
matrix_freeMatrix free object on which the applier works on.
dstDestination vector to which the result is added.
srcCurrent solution.
cell_rangeCell range which is considered in the applier.

◆ local_apply_face()

template<int dim, typename number , int n_species = 1>
void MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::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
private

Local face applier.

Computes the face contribution to the rhs if the compressible Navier-Stokes equations are written in the form y'=rhs(y).

Parameters
matrix_freeMatrix free object on which the applier works on.
dstDestination vector to which the result is added.
srcCurrent solution.
face_rangeFace range which is considered in the applier.

◆ reinit()

template<int dim, typename number , int n_species>
void MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::reinit ( )
overridevirtual

Reinitialize the internal data structures.

The reinitialization includes setting a new required size for the solution history object according to the demands of the used time integrator.

Implements MeltPoolDG::CompressibleFlow::DGOperatorBase< dim, number, n_species >.

Member Data Documentation

◆ current_time_step

template<int dim, typename number , int n_species = 1>
number MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::current_time_step
mutableprivate

Current time step size.

◆ external_forces

template<int dim, typename number , int n_species = 1>
std::vector<std::shared_ptr<ExternalFlowForce<dim, number, n_species> > > MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::external_forces
private

This pointer may hold an instance of an external fluid force contribution (e.g., gravity, body forces, or user - defined source terms)

◆ flow_scratch_data

template<int dim, typename number , int n_species = 1>
OperationScratchData<dim, number>& MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::flow_scratch_data
private

Scratch data for compressible flows.

◆ time_integrator

template<int dim, typename number , int n_species = 1>
TimeIntegration::LowStorageExplicitRungeKuttaIntegrator<number> MeltPoolDG::CompressibleFlow::DGOperatorExplicit< dim, number, n_species >::time_integrator
private

Time integrator class used for the time integration.


The documentation for this class was generated from the following files: