CutDGOperator< dim, number, is_viscous > Class Template Reference

Developer Documentation: MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous > Class Template Reference
Developer Documentation
MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous > Class Template Reference

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

#include <cutdg_operator.hpp>

Public Types

using VectorType = dealii::LinearAlgebra::distributed::Vector< number >
 
using MappingInfoType = CutUtil::MappingInfoType< dim, number >
 
using MappingInfoVectorType = CutUtil::MappingInfoVectorType< dim, number >
 
using ConservedVariables = ConservedVariablesType< dim, number >
 
using ConservedVariablesGradient = ConservedVariablesGradientType< dim, number >
 
using ConvectionDiffusionOperator = Utils::DGConvectionDiffusionOperator< dim, number, ConvectiveFlux< dim, number >, DiffusiveFlux< dim, number > >
 
using ConvectionOperator = Utils::DGConvectionOperator< dim, number, ConvectiveFlux< dim, number > >
 

Public Member Functions

 CutDGOperator (OperationScratchData< dim, number > &flow_scratch_data, const MappingInfoType &mapping_info_surface_in, const MappingInfoVectorType &mapping_info_cells_in, const MappingInfoVectorType &mapping_info_faces_in)
 Constructor.
 
void set_inflow_field_unfitted_boundary (std::shared_ptr< dealii::Function< dim > > &inflow_function)
 Set the inflow field function in the case of an unfitted inflow boundary.
 
void set_unfitted_object_velocity (std::shared_ptr< dealii::Function< dim > > &velocity_function)
 Set the velocity function in the case of an unfitted (rigid) moving object.
 
template<CellEvaluatorType< dim, dim+2, number, dealii::VectorizedArray< number > > Integrator>
void do_cell_integral_rhs (Integrator &phi, const OperationScratchData< dim, number > &flow_scratch_data, const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > *constant_body_force, const unsigned int q) const
 Evaluate and submit the right-hand side cell integral contributions at a given quadrature point.
 
void do_surface_integral_rhs (dealii::FEPointEvaluation< dim+2, dim, dim, dealii::VectorizedArray< number > > &phi, const dealii::VectorizedArray< number > &interior_penalty_parameter, const OperationScratchData< dim, number > &flow_scratch_data, const unsigned int q) const
 Evaluate and submit the right-hand side cut surface integral contributions at a given quadrature point.
 
template<FaceEvaluatorType< dim, dim+2, number, dealii::VectorizedArray< number > > Integrator>
void do_face_integral_rhs (Integrator &phi_m, Integrator &phi_p, const dealii::VectorizedArray< number > &interior_penalty_parameter, const OperationScratchData< dim, number > &flow_scratch_data, const unsigned int q) const
 Evaluate and submit the right-and side face integral contributions at a given quadrature point.
 
template<FaceEvaluatorType< dim, dim+2, number, dealii::VectorizedArray< number > > Integrator>
void do_boundary_face_integral_rhs (Integrator &phi, const dealii::VectorizedArray< number > &interior_penalty_parameter, const OperationScratchData< dim, number > &flow_scratch_data, const auto boundary_id, const unsigned int q) const
 Evaluate and submit the right-hand side boundary face integral contributions at a given quadrature point.
 
void local_apply_cell_rhs (const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &cell_range) const
 Local applier for the cell integrals in the right-hand side evaluation.
 
void local_apply_face_rhs (const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &face_range) const
 Local applier for the face integrals in the right-hand side evaluation.
 
void local_apply_boundary_face_rhs (const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &face_range) const
 Local applier for the boundary face integral in the right-hand side evaluation.
 
void local_apply_cell_lhs (const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &cell_range) const
 Local applier for the cell integrals in the left-hand side matrix-vector product evaluation.
 
void local_apply_face_lhs (const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &face_range) const
 Local applier for the face integrals in the left-hand side matrix-vector product evaluation.
 
void local_apply_boundary_face_lhs (const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &face_range) const
 Local applier for the boundary face integrals in the left-hand side matrix-vector product evaluation.
 
void create_rhs (const number &time, const number &time_step, VectorType &dst, const VectorType &src) const
 Function for the matrix-free right-hand side vector evaluation.
 
void vmult (VectorType &dst, const VectorType &src) const
 Function for the matrix-free matrix-vector product evaluation.
 

Private Member Functions

void get_adjacent_face_values_at_unfitted_boundary (const dealii::Point< dim, dealii::VectorizedArray< number > > &q_point, const ConservedVariables &w_m, ConservedVariables &w_p, const ConservedVariablesGradient &grad_w_m, ConservedVariablesGradient &grad_w_p) const
 This function sets the corresponding values on the fictional outer face if the face is located at an unfitted boundary.
 

Private Attributes

OperationScratchData< dim, number > & flow_scratch_data
 Scratch data for compressible flows.
 
const MappingInfoTypemapping_info_surface
 Mapping information for integration over immersed boundaries.
 
const MappingInfoVectorTypemapping_info_cells
 Mapping information for integration over cut cells.
 
const MappingInfoVectorTypemapping_info_faces
 Mapping information for integration over cut faces.
 
dealii::FESystem< dim > fe_point_temp
 FESystem object, required by FEPointEvaluation.
 
const unsigned int n_dofs_per_cell
 Number of DoFs per cell.
 
number current_time_step = 0.
 Current time step size.
 
number current_inv_time_step = 0.
 Current inverse time step size.
 
std::shared_ptr< dealii::Function< dim > > unfitted_object_velocity
 Function, which describes the velocity of the unfitted object.
 
std::shared_ptr< dealii::Function< dim > > unfitted_inflow
 Inflow function for unfitted inflow boundary.
 

Detailed Description

template<int dim, typename number, bool is_viscous = true>
class MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >

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

Template Parameters
dimDimension of the considered simulation case.
numberFloating point format type.
is_viscousIndicates whether the flow is viscous.

Member Typedef Documentation

◆ ConservedVariables

template<int dim, typename number , bool is_viscous = true>
using MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::ConservedVariables = ConservedVariablesType<dim, number>

◆ ConservedVariablesGradient

template<int dim, typename number , bool is_viscous = true>
using MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::ConservedVariablesGradient = ConservedVariablesGradientType<dim, number>

◆ ConvectionDiffusionOperator

template<int dim, typename number , bool is_viscous = true>
using MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::ConvectionDiffusionOperator = Utils::DGConvectionDiffusionOperator<dim, number, ConvectiveFlux<dim, number>, DiffusiveFlux<dim, number> >

◆ ConvectionOperator

template<int dim, typename number , bool is_viscous = true>
using MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::ConvectionOperator = Utils::DGConvectionOperator<dim, number, ConvectiveFlux<dim, number> >

◆ MappingInfoType

template<int dim, typename number , bool is_viscous = true>
using MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::MappingInfoType = CutUtil::MappingInfoType<dim, number>

◆ MappingInfoVectorType

template<int dim, typename number , bool is_viscous = true>
using MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::MappingInfoVectorType = CutUtil::MappingInfoVectorType<dim, number>

◆ VectorType

template<int dim, typename number , bool is_viscous = true>
using MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::VectorType = dealii::LinearAlgebra::distributed::Vector<number>

Constructor & Destructor Documentation

◆ CutDGOperator()

template<int dim, typename number , bool is_viscous>
MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::CutDGOperator ( OperationScratchData< dim, number > &  flow_scratch_data,
const MappingInfoType mapping_info_surface_in,
const MappingInfoVectorType mapping_info_cells_in,
const MappingInfoVectorType mapping_info_faces_in 
)
explicit

Constructor.

Initializes the operators, integrators, and mapping objects needed to compute the matrix-free evaluation of a compressible single-phase flow cutDG formulation.

Parameters
flow_scratch_dataFlow scratch data object holding all relevant compressible flow data required by the operator.
mapping_info_surface_indealii::NonMatching::MappingInfo object, provides the mapping information computation and mapping data storage of the surface.
mapping_info_cells_inVector of dealii::NonMatching::MappingInfo objects, provides the mapping information computation and mapping data storage of the cells on the inner subdomain and the outer subdomain, respectively.
mapping_info_faces_inVector of dealii::NonMatching::MappingInfo objects, provides the mapping information computation and mapping data storage of the faces on the inner subdomain and the outer subdomain, respectively.

Member Function Documentation

◆ create_rhs()

template<int dim, typename number , bool is_viscous>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::create_rhs ( const number &  time,
const number &  time_step,
VectorType dst,
const VectorType src 
) const

Function for the matrix-free right-hand side vector evaluation.

Parameters
timeCurrent simulation time.
time_stepCurrent time step size.
dstVector where the computed right-hand side rhs(src) is stored.
srcThe solution vector at the current time.

◆ do_boundary_face_integral_rhs()

template<int dim, typename number , bool is_viscous>
template<FaceEvaluatorType< dim, dim+2, number, dealii::VectorizedArray< number > > Integrator>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::do_boundary_face_integral_rhs ( Integrator &  phi,
const dealii::VectorizedArray< number > &  interior_penalty_parameter,
const OperationScratchData< dim, number > &  flow_scratch_data,
const auto  boundary_id,
const unsigned int  q 
) const

Evaluate and submit the right-hand side boundary face integral contributions at a given quadrature point.

This function can be used for both cut and non-cut faces, depending on the templated Integrator type.

Template Parameters
IntegratorType of the matrix-free face integrator providing the interface for evaluating and submitting values at quadrature points.
Parameters
phiFace integrator used to access solution values and to submit the local integral contributions at quadrature point q at the boundary face.
interior_penalty_parameterInterior penalty parameter for symmetric interior penalty flux.
flow_scratch_dataFlow scratch data object holding all relevant compressible flow data.
boundary_idBoundary id of the current face.
qIndex of the quadrature point.

◆ do_cell_integral_rhs()

template<int dim, typename number , bool is_viscous>
template<CellEvaluatorType< dim, dim+2, number, dealii::VectorizedArray< number > > Integrator>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::do_cell_integral_rhs ( Integrator &  phi,
const OperationScratchData< dim, number > &  flow_scratch_data,
const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > *  constant_body_force,
const unsigned int  q 
) const

Evaluate and submit the right-hand side cell integral contributions at a given quadrature point.

This function can be used for both cut and non-cut elements, depending on the templated Integrator type.

Template Parameters
IntegratorType of the matrix-free cell integrator providing the interface for evaluating and submitting values at quadrature points.
Parameters
phiCell integrator used to access solution values and to submit the local integral contributions at quadrature point q.
flow_scratch_dataFlow scratch data object holding all relevant compressible flow data.
constant_body_forceValue of the body force. If the body force is not constant the pointer must be set to nullptr.
qIndex of the quadrature point.

◆ do_face_integral_rhs()

template<int dim, typename number , bool is_viscous>
template<FaceEvaluatorType< dim, dim+2, number, dealii::VectorizedArray< number > > Integrator>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::do_face_integral_rhs ( Integrator &  phi_m,
Integrator &  phi_p,
const dealii::VectorizedArray< number > &  interior_penalty_parameter,
const OperationScratchData< dim, number > &  flow_scratch_data,
const unsigned int  q 
) const

Evaluate and submit the right-and side face integral contributions at a given quadrature point.

This function can be used for both cut and non-cut faces, depending on the templated Integrator type. s

Template Parameters
IntegratorType of the matrix-free face integrator providing the interface for evaluating and submitting values at quadrature points.
Parameters
phi_mFace integrator used to access solution values and to submit the local integral contributions at quadrature point q at the interior face.
phi_pFace integrator used to access solution values and to submit the local integral contributions at quadrature point q at the exterior face.
interior_penalty_parameterInterior penalty parameter for symmetric interior penalty flux.
flow_scratch_dataFlow scratch data object holding all relevant compressible flow data.
qIndex of the quadrature point.

◆ do_surface_integral_rhs()

template<int dim, typename number , bool is_viscous>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::do_surface_integral_rhs ( dealii::FEPointEvaluation< dim+2, dim, dim, dealii::VectorizedArray< number > > &  phi,
const dealii::VectorizedArray< number > &  interior_penalty_parameter,
const OperationScratchData< dim, number > &  flow_scratch_data,
const unsigned int  q 
) const

Evaluate and submit the right-hand side cut surface integral contributions at a given quadrature point.

Parameters
phiSurface integrator used to access solution values and to submit the local integral contributions at quadrature point q.
interior_penalty_parameterInterior penalty parameter for symmetric interior penalty flux.
flow_scratch_dataFlow scratch data object holding all relevant compressible flow data.
qIndex of the quadrature point.

◆ get_adjacent_face_values_at_unfitted_boundary()

template<int dim, typename number , bool is_viscous>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::get_adjacent_face_values_at_unfitted_boundary ( const dealii::Point< dim, dealii::VectorizedArray< number > > &  q_point,
const ConservedVariables w_m,
ConservedVariables w_p,
const ConservedVariablesGradient grad_w_m,
ConservedVariablesGradient grad_w_p 
) const
private

This function sets the corresponding values on the fictional outer face if the face is located at an unfitted boundary.

Parameters
q_pointLocation of the quadrature points at which the values shall be computed.
w_mConserved variables on the inner face.
w_pLocation where the corresponding boundary values are stored.
grad_w_mGradient of the conserved variables on the inner face.
grad_w_pLocation where the corresponding gradients of the boundary values shall be stored.

◆ local_apply_boundary_face_lhs()

template<int dim, typename number , bool is_viscous = true>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::local_apply_boundary_face_lhs ( const dealii::MatrixFree< dim, number > &  matrix_free,
VectorType dst,
const VectorType src,
const std::pair< unsigned int, unsigned int > &  face_range 
) const

Local applier for the boundary face integrals in the left-hand side matrix-vector product evaluation.

Parameters
matrix_freeMatrix-free object which contains all relevant data for matrix free evaluation.
dstDestination vector, in which the result is written.
srcSource vector for the operator evaluation.
face_rangeConsidered face range.

◆ local_apply_boundary_face_rhs()

template<int dim, typename number , bool is_viscous = true>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::local_apply_boundary_face_rhs ( const dealii::MatrixFree< dim, number > &  matrix_free,
VectorType dst,
const VectorType src,
const std::pair< unsigned int, unsigned int > &  face_range 
) const

Local applier for the boundary face integral in the right-hand side evaluation.

Parameters
matrix_freeMatrix-free object which contains all relevant data for matrix free evaluation.
dstDestination vector, in which the result is written.
srcSource vector for the operator evaluation.
face_rangeConsidered face range.

◆ local_apply_cell_lhs()

template<int dim, typename number , bool is_viscous = true>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::local_apply_cell_lhs ( const dealii::MatrixFree< dim, number > &  matrix_free,
VectorType dst,
const VectorType src,
const std::pair< unsigned int, unsigned int > &  cell_range 
) const

Local applier for the cell integrals in the left-hand side matrix-vector product evaluation.

Parameters
matrix_freeMatrix-free object which contains all relevant data for matrix free evaluation.
dstDestination vector, in which the result is written.
srcSource vector for the operator evaluation.
cell_rangeConsidered cell range.

◆ local_apply_cell_rhs()

template<int dim, typename number , bool is_viscous = true>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::local_apply_cell_rhs ( const dealii::MatrixFree< dim, number > &  matrix_free,
VectorType dst,
const VectorType src,
const std::pair< unsigned int, unsigned int > &  cell_range 
) const

Local applier for the cell integrals in the right-hand side evaluation.

Parameters
matrix_freeMatrix-free object which contains all relevant data for matrix free evaluation.
dstDestination vector, in which the result is written.
srcSource vector for the operator evaluation.
cell_rangeConsidered cell range.

◆ local_apply_face_lhs()

template<int dim, typename number , bool is_viscous>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::local_apply_face_lhs ( const dealii::MatrixFree< dim, number > &  matrix_free,
VectorType dst,
const VectorType src,
const std::pair< unsigned int, unsigned int > &  face_range 
) const

Local applier for the face integrals in the left-hand side matrix-vector product evaluation.

Parameters
matrix_freeMatrix-free object which contains all relevant data for matrix free evaluation.
dstDestination vector, in which the result is written.
srcSource vector for the operator evaluation.
face_rangeConsidered face range.

◆ local_apply_face_rhs()

template<int dim, typename number , bool is_viscous>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::local_apply_face_rhs ( const dealii::MatrixFree< dim, number > &  matrix_free,
VectorType dst,
const VectorType src,
const std::pair< unsigned int, unsigned int > &  face_range 
) const

Local applier for the face integrals in the right-hand side evaluation.

Parameters
matrix_freeMatrix-free object which contains all relevant data for matrix free evaluation.
dstDestination vector, in which the result is written.
srcSource vector for the operator evaluation.
face_rangeConsidered face range.

◆ set_inflow_field_unfitted_boundary()

template<int dim, typename number , bool is_viscous>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::set_inflow_field_unfitted_boundary ( std::shared_ptr< dealii::Function< dim > > &  inflow_function)

Set the inflow field function in the case of an unfitted inflow boundary.

Parameters
inflow_functionFunction which describes the inflow field at the unfitted inflow boundary.

◆ set_unfitted_object_velocity()

template<int dim, typename number , bool is_viscous>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::set_unfitted_object_velocity ( std::shared_ptr< dealii::Function< dim > > &  velocity_function)

Set the velocity function in the case of an unfitted (rigid) moving object.

Parameters
velocity_functionScalar function which describes the velocity of an unfitted (rigid) moving object

◆ vmult()

template<int dim, typename number , bool is_viscous>
void MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::vmult ( VectorType dst,
const VectorType src 
) const

Function for the matrix-free matrix-vector product evaluation.

Parameters
dstVector where the computed evaluated vector-matrix product is stored.
srcThe solution vector at the current time.

Member Data Documentation

◆ current_inv_time_step

template<int dim, typename number , bool is_viscous = true>
number MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::current_inv_time_step = 0.
mutableprivate

Current inverse time step size.

◆ current_time_step

template<int dim, typename number , bool is_viscous = true>
number MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::current_time_step = 0.
mutableprivate

Current time step size.

◆ fe_point_temp

template<int dim, typename number , bool is_viscous = true>
dealii::FESystem<dim> MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::fe_point_temp
private

FESystem object, required by FEPointEvaluation.

◆ flow_scratch_data

template<int dim, typename number , bool is_viscous = true>
OperationScratchData<dim, number>& MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::flow_scratch_data
private

Scratch data for compressible flows.

◆ mapping_info_cells

template<int dim, typename number , bool is_viscous = true>
const MappingInfoVectorType& MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::mapping_info_cells
private

Mapping information for integration over cut cells.

◆ mapping_info_faces

template<int dim, typename number , bool is_viscous = true>
const MappingInfoVectorType& MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::mapping_info_faces
private

Mapping information for integration over cut faces.

◆ mapping_info_surface

template<int dim, typename number , bool is_viscous = true>
const MappingInfoType& MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::mapping_info_surface
private

Mapping information for integration over immersed boundaries.

◆ n_dofs_per_cell

template<int dim, typename number , bool is_viscous = true>
const unsigned int MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::n_dofs_per_cell
private

Number of DoFs per cell.

◆ unfitted_inflow

template<int dim, typename number , bool is_viscous = true>
std::shared_ptr<dealii::Function<dim> > MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::unfitted_inflow
private

Inflow function for unfitted inflow boundary.

◆ unfitted_object_velocity

template<int dim, typename number , bool is_viscous = true>
std::shared_ptr<dealii::Function<dim> > MeltPoolDG::CompressibleFlow::CutDGOperator< dim, number, is_viscous >::unfitted_object_velocity
private

Function, which describes the velocity of the unfitted object.


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