ThunderEgg  1.0.0
ThunderEgg::PETSc::MatWrapper< D > Class Template Reference

Wraps a PETSc Mat object for use as an Operator. More...

#include <MatWrapper.h>

Inheritance diagram for ThunderEgg::PETSc::MatWrapper< D >:
Collaboration diagram for ThunderEgg::PETSc::MatWrapper< D >:

Public Member Functions

 MatWrapper (Mat A_in)
 Construct a new MatWrapper object. More...
 
MatWrapper< D > * clone () const override
 Clone this wrapper. More...
 
void apply (const Vector< D > &x, Vector< D > &b) const override
 Virtual function that base classes have to implement. More...
 
- Public Member Functions inherited from ThunderEgg::Operator< D >
virtual ~Operator ()
 Destroy the Operator object.
 

Detailed Description

template<int D>
class ThunderEgg::PETSc::MatWrapper< D >

Wraps a PETSc Mat object for use as an Operator.

Constructor & Destructor Documentation

◆ MatWrapper()

template<int D>
ThunderEgg::PETSc::MatWrapper< D >::MatWrapper ( Mat  A_in)
inlineexplicit

Construct a new MatWrapper object.

This object will not deallocate the PETSc Mat, you are responsible for deallocating it.

Parameters
A_inthe PETSc Mat to wrap

Member Function Documentation

◆ apply()

template<int D>
void ThunderEgg::PETSc::MatWrapper< D >::apply ( const Vector< D > &  x,
Vector< D > &  b 
) const
inlineoverridevirtual

Virtual function that base classes have to implement.

Parameters
xthe input vector.
bthe output vector.

Implements ThunderEgg::Operator< D >.

◆ clone()

template<int D>
MatWrapper<D>* ThunderEgg::PETSc::MatWrapper< D >::clone ( ) const
inlineoverridevirtual

Clone this wrapper.

Returns
MatWrapper<D>* a newly allocated copy

Implements ThunderEgg::Operator< D >.


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