svMultiPhysics
Loading...
Searching...
No Matches
Public Member Functions | List of all members
TrilinosMatVec Class Reference

This class implements the pure virtual class Epetra_Operator for the AztecOO iterative solve which only uses the Apply() method to compute the matrix vector product. More...

#include <trilinos_impl.h>

Inheritance diagram for TrilinosMatVec:
[legend]

Public Member Functions

 TrilinosMatVec (const Teuchos::RCP< Trilinos > &trilinos)
 
void apply (const Tpetra_MultiVector &X, Tpetra_MultiVector &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar_d alpha=Teuchos::ScalarTraits< Scalar_d >::one(), Scalar_d beta=Teuchos::ScalarTraits< Scalar_d >::zero()) const override
 
Teuchos::RCP< const Tpetra_Map > getDomainMap () const override
 
Teuchos::RCP< const Tpetra_Map > getRangeMap () const override
 

Detailed Description

This class implements the pure virtual class Epetra_Operator for the AztecOO iterative solve which only uses the Apply() method to compute the matrix vector product.

Constructor & Destructor Documentation

◆ TrilinosMatVec()

TrilinosMatVec::TrilinosMatVec ( const Teuchos::RCP< Trilinos > &  trilinos)
inline

Define matrix vector operation at each iteration of the linear solver adds on the coupled neuman boundary contribution to the matrix

Parameters
xvector to be applied on the operator
yresult of sparse matrix vector multiplication

Member Function Documentation

◆ apply()

void TrilinosMatVec::apply ( const Tpetra_MultiVector &  x,
Tpetra_MultiVector &  y,
Teuchos::ETransp  mode = Teuchos::NO_TRANS,
Scalar_d  alpha = Teuchos::ScalarTraits< Scalar_d >::one(),
Scalar_d  beta = Teuchos::ScalarTraits<Scalar_d>::zero() 
) const
override

Define the matrix vector multiplication operation to do at each iteration of an iterative linear solver. This function is called by the AztecOO (K + v1*v1' + v2*v2' + ...) x = K*x + v1(v1'x) + v2(v2'*x), where [v1, v2, ...] = bdryVec_list

For coupled Neumann boundary terms (v1*v1', v2*v2'), we use efficient an vectorized operation rather than explicitly forming the rank 1 outer product matrix and adding it to the global stiffness matrix K.

Parameters
xvector to be applied on the operator
yresult of sprase matrix vector multiplication

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