OperatorMatrixBased< dim, number > Class Template Reference

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

Operator handling matrix-based computations. More...

#include <operator_base.hpp>

Inheritance diagram for MeltPoolDG::OperatorMatrixBased< dim, number >:
[legend]
Collaboration diagram for MeltPoolDG::OperatorMatrixBased< dim, number >:
[legend]

Public Types

using SparseMatrixType = dealii::TrilinosWrappers::SparseMatrix
 
using SparsityPatternType = dealii::TrilinosWrappers::SparsityPattern
 
using VectorType = dealii::LinearAlgebra::distributed::Vector< number >
 
using BlockVectorType = dealii::LinearAlgebra::distributed::BlockVector< number >
 

Public Member Functions

virtual ~OperatorMatrixBased ()=default
 
virtual void compute_system_matrix_and_rhs (const VectorType &, VectorType &) const
 Compute the system matrix and right-hand side vector.
 
virtual void compute_system_matrix_and_rhs (const BlockVectorType &, VectorType &) const
 Compute the system matrix and right-hand side vector for block vectors.
 
virtual void compute_system_matrix_and_rhs (const VectorType &, BlockVectorType &) const
 Compute the system matrix and right-hand side block vector.
 
virtual void reinit_sparsity_pattern (const ScratchData< dim, dim, number > &scratch_data)
 Reinitialize the sparsity pattern of the system matrix.
 
const SparseMatrixTypeget_system_matrix () const
 
SparseMatrixTypeget_system_matrix ()
 
- Public Member Functions inherited from MeltPoolDG::OperatorBase< number >
virtual ~OperatorBase ()=default
 
void reset_dof_index (const unsigned int dof_idx_in)
 Set the index for the current degrees of freedom (DoF).
 
void reset_time_increment (const number dt)
 Set the time increment for the operator.
 
virtual void pre ()
 Prepare for computations (e.g. update ghost values). Can be overridden by derived classes.
 
virtual void post ()
 Finalize for computations (e.g. zero out ghost values). Can be overridden by derived classes.
 
virtual void reinit ()
 Reinitialize data structures. Can be overridden by derived classes.
 

Protected Attributes

SparseMatrixType system_matrix
 
SparsityPatternType dsp
 
- Protected Attributes inherited from MeltPoolDG::OperatorBase< number >
unsigned int dof_idx = dealii::numbers::invalid_unsigned_int
 
number time_increment = numbers::invalid_double
 
number time_increment_inv = numbers::invalid_double
 

Detailed Description

template<int dim, typename number>
class MeltPoolDG::OperatorMatrixBased< dim, number >

Operator handling matrix-based computations.

This class implements methods for creating and managing system matrices and right-hand side vectors.

Member Typedef Documentation

◆ BlockVectorType

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

◆ SparseMatrixType

template<int dim, typename number >
using MeltPoolDG::OperatorMatrixBased< dim, number >::SparseMatrixType = dealii::TrilinosWrappers::SparseMatrix

◆ SparsityPatternType

template<int dim, typename number >
using MeltPoolDG::OperatorMatrixBased< dim, number >::SparsityPatternType = dealii::TrilinosWrappers::SparsityPattern

◆ VectorType

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

Constructor & Destructor Documentation

◆ ~OperatorMatrixBased()

template<int dim, typename number >
virtual MeltPoolDG::OperatorMatrixBased< dim, number >::~OperatorMatrixBased ( )
virtualdefault

Member Function Documentation

◆ compute_system_matrix_and_rhs() [1/3]

template<int dim, typename number >
virtual void MeltPoolDG::OperatorMatrixBased< dim, number >::compute_system_matrix_and_rhs ( const BlockVectorType ,
VectorType  
) const
inlinevirtual

Compute the system matrix and right-hand side vector for block vectors.

Parameters
srcSource block vector.
dstDestination vector.

Reimplemented in MeltPoolDG::LevelSet::CurvatureOperator< dim, number >.

◆ compute_system_matrix_and_rhs() [2/3]

template<int dim, typename number >
virtual void MeltPoolDG::OperatorMatrixBased< dim, number >::compute_system_matrix_and_rhs ( const VectorType ,
BlockVectorType  
) const
inlinevirtual

Compute the system matrix and right-hand side block vector.

Parameters
srcSource vector.
dstDestination block vector.

Reimplemented in MeltPoolDG::LevelSet::NormalVectorOperator< dim, number >.

◆ compute_system_matrix_and_rhs() [3/3]

template<int dim, typename number >
virtual void MeltPoolDG::OperatorMatrixBased< dim, number >::compute_system_matrix_and_rhs ( const VectorType ,
VectorType  
) const
inlinevirtual

Compute the system matrix and right-hand side vector.

Parameters
srcSource vector.
dstDestination vector.

Reimplemented in MeltPoolDG::LevelSet::AdvectionDiffusionOperator< dim, number >, and MeltPoolDG::LevelSet::OlssonOperator< dim, number >.

◆ get_system_matrix() [1/2]

template<int dim, typename number >
SparseMatrixType & MeltPoolDG::OperatorMatrixBased< dim, number >::get_system_matrix ( )
inline

◆ get_system_matrix() [2/2]

template<int dim, typename number >
const SparseMatrixType & MeltPoolDG::OperatorMatrixBased< dim, number >::get_system_matrix ( ) const
inline

◆ reinit_sparsity_pattern()

template<int dim, typename number >
virtual void MeltPoolDG::OperatorMatrixBased< dim, number >::reinit_sparsity_pattern ( const ScratchData< dim, dim, number > &  scratch_data)
inlinevirtual

Reinitialize the sparsity pattern of the system matrix.

Parameters
scratch_dataReference to the ScratchData object.

Member Data Documentation

◆ dsp

template<int dim, typename number >
SparsityPatternType MeltPoolDG::OperatorMatrixBased< dim, number >::dsp
protected

◆ system_matrix

template<int dim, typename number >
SparseMatrixType MeltPoolDG::OperatorMatrixBased< dim, number >::system_matrix
mutableprotected

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