AdvectionDGOperator< dim, number > Class Template Reference

Developer Documentation: MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number > Class Template Reference
Developer Documentation
MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number > Class Template Reference

#include <advection_DG_operator.hpp>

Collaboration diagram for MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >:
[legend]

Public Types

using VectorType = dealii::LinearAlgebra::distributed::Vector< number >
 
using BlockVectorType = dealii::LinearAlgebra::distributed::BlockVector< number >
 
using scalar = dealii::VectorizedArray< number >
 
using vector = dealii::Tensor< 1, dim, scalar >
 

Public Member Functions

 AdvectionDGOperator (const MeltPoolDG::ScratchData< dim, dim, number > &scratch_data_in, const unsigned int advec_diff_dof_idx_in, const unsigned int advec_diff_quad_idx_in, const std::shared_ptr< MeltPoolDG::BoundaryConditionManager< dim, number > > &boundary_conditions_in)
 
void set_advection_velocity_function (const std::shared_ptr< dealii::Function< dim, number > > &advection_velocity_function_in)
 Assigns a time-dependent advection velocity function.
 
void set_advection_velocity (const VectorType &advection_velocity_in, const unsigned int velocity_dof_idx_in)
 Sets the discrete advection velocity vector and its DoF index.
 
void update_time_velocity_function (const number time) const
 
void apply_operator (number time, VectorType &dst, const VectorType &src, const std::function< void(unsigned int, unsigned int)> &func={}) const
 
void apply_dirichlet_boundary_operator (const number time, VectorType &dst, const VectorType &src) const
 

Public Attributes

bool update_field_functions
 

Private Member Functions

void local_apply_domain (const dealii::MatrixFree< dim, number > &data, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &cell_range) const
 
void local_apply_domain_dummy (const dealii::MatrixFree< dim, number > &data, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &cell_range) const
 
void local_apply_inner_face (const dealii::MatrixFree< dim, number > &data, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &cell_range) const
 
void local_apply_inner_face_dummy (const dealii::MatrixFree< dim, number > &data, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &cell_range) const
 
void local_apply_homogenous_boundary_face (const dealii::MatrixFree< dim, number > &data, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &cell_range) const
 
void local_apply_inhomogenous_boundary_face (const dealii::MatrixFree< dim, number > &data, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &cell_range) const
 

Private Attributes

const MeltPoolDG::ScratchData< dim, dim, number > & scratch_data_
 
const unsigned int advec_diff_dof_idx = 0
 
const unsigned int advec_diff_quad_idx = 0
 
std::shared_ptr< MeltPoolDG::BoundaryConditionManager< dim, number > > boundary_conditions
 
const VectorTypeadvection_velocity_ = nullptr
 
unsigned int velocity_dof_idx = dealii::numbers::invalid_unsigned_int
 
std::shared_ptr< dealii::Function< dim, number > > advection_velocity_function = nullptr
 

Member Typedef Documentation

◆ BlockVectorType

template<int dim, typename number >
using MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::BlockVectorType = dealii::LinearAlgebra::distributed::BlockVector<number>

◆ scalar

template<int dim, typename number >
using MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::scalar = dealii::VectorizedArray<number>

◆ vector

template<int dim, typename number >
using MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::vector = dealii::Tensor<1, dim, scalar>

◆ VectorType

template<int dim, typename number >
using MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::VectorType = dealii::LinearAlgebra::distributed::Vector<number>

Constructor & Destructor Documentation

◆ AdvectionDGOperator()

template<int dim, typename number >
MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::AdvectionDGOperator ( const MeltPoolDG::ScratchData< dim, dim, number > &  scratch_data_in,
const unsigned int  advec_diff_dof_idx_in,
const unsigned int  advec_diff_quad_idx_in,
const std::shared_ptr< MeltPoolDG::BoundaryConditionManager< dim, number > > &  boundary_conditions_in 
)

Member Function Documentation

◆ apply_dirichlet_boundary_operator()

template<int dim, typename number >
void MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::apply_dirichlet_boundary_operator ( const number  time,
VectorType dst,
const VectorType src 
) const

Applies the dirichlet contribution of the DG advection operator to the

Parameters
srcvector and stores the result in the
dstvector. The dst vector is NOT zeroed out before the operation.
timecurrent time for time dependent dirichlet conditions.

◆ apply_operator()

template<int dim, typename number >
void MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::apply_operator ( number  time,
VectorType dst,
const VectorType src,
const std::function< void(unsigned int, unsigned int)> &  func = {} 
) const

Applies the DG advection operator to the src vector and stores the result in the dst vector. Dirichlet boundary conditions are applied in a different function The dst vector is zeroed out before the operation. The time needs to be explicitly passed for the case, that time dependent boundary conditions or time dependent field functions are used.

Parameters
timecurrent time
dstresult of the operator applied to
src
scrsource vector for the operator

◆ local_apply_domain()

template<int dim, typename number >
void MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::local_apply_domain ( const dealii::MatrixFree< dim, number > &  data,
VectorType dst,
const VectorType src,
const std::pair< unsigned int, unsigned int > &  cell_range 
) const
private

◆ local_apply_domain_dummy()

template<int dim, typename number >
void MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::local_apply_domain_dummy ( const dealii::MatrixFree< dim, number > &  data,
VectorType dst,
const VectorType src,
const std::pair< unsigned int, unsigned int > &  cell_range 
) const
inlineprivate

Is needed in apply_dirichlet_boundary_operator. loop needs an operator for the domain, but only the boundary contribution is added to dst.

◆ local_apply_homogenous_boundary_face()

template<int dim, typename number >
void MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::local_apply_homogenous_boundary_face ( const dealii::MatrixFree< dim, number > &  data,
VectorType dst,
const VectorType src,
const std::pair< unsigned int, unsigned int > &  cell_range 
) const
private

◆ local_apply_inhomogenous_boundary_face()

template<int dim, typename number >
void MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::local_apply_inhomogenous_boundary_face ( const dealii::MatrixFree< dim, number > &  data,
VectorType dst,
const VectorType src,
const std::pair< unsigned int, unsigned int > &  cell_range 
) const
private

◆ local_apply_inner_face()

template<int dim, typename number >
void MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::local_apply_inner_face ( const dealii::MatrixFree< dim, number > &  data,
VectorType dst,
const VectorType src,
const std::pair< unsigned int, unsigned int > &  cell_range 
) const
private

◆ local_apply_inner_face_dummy()

template<int dim, typename number >
void MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::local_apply_inner_face_dummy ( const dealii::MatrixFree< dim, number > &  data,
VectorType dst,
const VectorType src,
const std::pair< unsigned int, unsigned int > &  cell_range 
) const
inlineprivate

Is needed in apply_dirichlet_boundary_operator. loop needs an operator for the inner faces, but only the boundary contribution is added to dst.

◆ set_advection_velocity()

template<int dim, typename number >
void MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::set_advection_velocity ( const VectorType advection_velocity_in,
const unsigned int  velocity_dof_idx_in 
)

Sets the discrete advection velocity vector and its DoF index.

Parameters
advection_velocity_inDiscrete velocity field.
velocity_dof_idx_inIndex of the associated DoF handler.

◆ set_advection_velocity_function()

template<int dim, typename number >
void MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::set_advection_velocity_function ( const std::shared_ptr< dealii::Function< dim, number > > &  advection_velocity_function_in)

Assigns a time-dependent advection velocity function.

Parameters
advection_velocity_function_inShared pointer to a velocity field function.

◆ update_time_velocity_function()

template<int dim, typename number >
void MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::update_time_velocity_function ( const number  time) const

If an analytical function for the velocity field is provided and an analytical update is enabled, this function sets the velocity according to the anylytical function. Otherwise the provided velocity reference is used.

Parameters
timecurrent time

Member Data Documentation

◆ advec_diff_dof_idx

template<int dim, typename number >
const unsigned int MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::advec_diff_dof_idx = 0
private

◆ advec_diff_quad_idx

template<int dim, typename number >
const unsigned int MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::advec_diff_quad_idx = 0
private

◆ advection_velocity_

template<int dim, typename number >
const VectorType* MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::advection_velocity_ = nullptr
private

◆ advection_velocity_function

template<int dim, typename number >
std::shared_ptr<dealii::Function<dim, number> > MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::advection_velocity_function = nullptr
private

◆ boundary_conditions

template<int dim, typename number >
std::shared_ptr<MeltPoolDG::BoundaryConditionManager<dim, number> > MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::boundary_conditions
private

◆ scratch_data_

template<int dim, typename number >
const MeltPoolDG::ScratchData<dim, dim, number>& MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::scratch_data_
private

◆ update_field_functions

template<int dim, typename number >
bool MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::update_field_functions

Flag if old velocity needs to be updated

◆ velocity_dof_idx

template<int dim, typename number >
unsigned int MeltPoolDG::LevelSet::AdvectionDGOperator< dim, number >::velocity_dof_idx = dealii::numbers::invalid_unsigned_int
private

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