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

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

#include <MatShellCreator.h>

Static Public Member Functions

static Mat GetNewMatShell (const Operator< D > &op, const std::function< Vector< D >()> &vector_allocator)
 Get a new MatShell for use with PETSc. More...
 

Detailed Description

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

Wraps an Operator for use as a PETSc Mat.

Template Parameters
Dthe number of Cartesian dimensions

Member Function Documentation

◆ GetNewMatShell()

template<int D>
static Mat ThunderEgg::PETSc::MatShellCreator< D >::GetNewMatShell ( const Operator< D > &  op,
const std::function< Vector< D >()> &  vector_allocator 
)
inlinestatic

Get a new MatShell for use with PETSc.

Parameters
opthe operator we are wrapping
vector_allocatorfunction that allocates need TE vectors
Returns
Mat the wrapped operator, user is responsible for calling MatDestroy on this

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