ASPECT
Public Member Functions | Private Member Functions | Private Attributes | List of all members
aspect::MatrixFreeStokesOperators::ABlockOperator< dim, degree_v, number > Class Template Reference

Inherits Base< dim, ::LinearAlgebra::distributed::Vector< number > >.

Public Member Functions

 ABlockOperator ()
 
void clear () override
 
void set_cell_data (const OperatorCellData< dim, number > &data)
 
void compute_diagonal () override
 
void set_diagonal (const ::LinearAlgebra::distributed::Vector< number > &diag)
 

Private Member Functions

void apply_add (::LinearAlgebra::distributed::Vector< number > &dst, const ::LinearAlgebra::distributed::Vector< number > &src) const override
 
void local_apply (const ::MatrixFree< dim, number > &data, ::LinearAlgebra::distributed::Vector< number > &dst, const ::LinearAlgebra::distributed::Vector< number > &src, const std::pair< unsigned int, unsigned int > &cell_range) const
 
void local_compute_diagonal (const MatrixFree< dim, number > &data, ::LinearAlgebra::distributed::Vector< number > &dst, const unsigned int &dummy, const std::pair< unsigned int, unsigned int > &cell_range) const
 

Private Attributes

const OperatorCellData< dim, number > * cell_data
 

Detailed Description

template<int dim, int degree_v, typename number>
class aspect::MatrixFreeStokesOperators::ABlockOperator< dim, degree_v, number >

Operator for the A block of the Stokes matrix. The same class is used for both active and level mesh operators.

Definition at line 346 of file stokes_matrix_free.h.

Constructor & Destructor Documentation

§ ABlockOperator()

template<int dim, int degree_v, typename number>
aspect::MatrixFreeStokesOperators::ABlockOperator< dim, degree_v, number >::ABlockOperator ( )

Constructor

Member Function Documentation

§ clear()

template<int dim, int degree_v, typename number>
void aspect::MatrixFreeStokesOperators::ABlockOperator< dim, degree_v, number >::clear ( )
override

Reset the operator.

§ set_cell_data()

template<int dim, int degree_v, typename number>
void aspect::MatrixFreeStokesOperators::ABlockOperator< dim, degree_v, number >::set_cell_data ( const OperatorCellData< dim, number > &  data)

Pass in a reference to the problem data.

§ compute_diagonal()

template<int dim, int degree_v, typename number>
void aspect::MatrixFreeStokesOperators::ABlockOperator< dim, degree_v, number >::compute_diagonal ( )
override

Computes the diagonal of the matrix. Since matrix-free operators have not access to matrix elements, we must apply the matrix-free operator to the unit vectors to recover the diagonal.

§ set_diagonal()

template<int dim, int degree_v, typename number>
void aspect::MatrixFreeStokesOperators::ABlockOperator< dim, degree_v, number >::set_diagonal ( const ::LinearAlgebra::distributed::Vector< number > &  diag)

Manually set the diagonal inside the matrix-free object. This function is needed when using tangential constraints as the function compute_diagonal() cannot handle non-Dirichlet boundary conditions.

§ apply_add()

template<int dim, int degree_v, typename number>
void aspect::MatrixFreeStokesOperators::ABlockOperator< dim, degree_v, number >::apply_add ( ::LinearAlgebra::distributed::Vector< number > &  dst,
const ::LinearAlgebra::distributed::Vector< number > &  src 
) const
overrideprivate

Performs the application of the matrix-free operator. This function is called by vmult() functions MatrixFreeOperators::Base.

§ local_apply()

template<int dim, int degree_v, typename number>
void aspect::MatrixFreeStokesOperators::ABlockOperator< dim, degree_v, number >::local_apply ( const ::MatrixFree< dim, number > &  data,
::LinearAlgebra::distributed::Vector< number > &  dst,
const ::LinearAlgebra::distributed::Vector< number > &  src,
const std::pair< unsigned int, unsigned int > &  cell_range 
) const
private

Defines the application of the cell matrix.

§ local_compute_diagonal()

template<int dim, int degree_v, typename number>
void aspect::MatrixFreeStokesOperators::ABlockOperator< dim, degree_v, number >::local_compute_diagonal ( const MatrixFree< dim, number > &  data,
::LinearAlgebra::distributed::Vector< number > &  dst,
const unsigned int &  dummy,
const std::pair< unsigned int, unsigned int > &  cell_range 
) const
private

Computes the diagonal contribution from a cell matrix.

Member Data Documentation

§ cell_data

template<int dim, int degree_v, typename number>
const OperatorCellData<dim,number>* aspect::MatrixFreeStokesOperators::ABlockOperator< dim, degree_v, number >::cell_data
private

A pointer to the current cell data that contains viscosity and other required parameters per cell.

Definition at line 408 of file stokes_matrix_free.h.


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