DOLFIN
DOLFIN C++ interface
Public Member Functions | Static Public Member Functions | List of all members
dolfin::PETScDMCollection Class Reference

#include <PETScDMCollection.h>

Inheritance diagram for dolfin::PETScDMCollection:
Inheritance graph
[legend]
Collaboration diagram for dolfin::PETScDMCollection:
Collaboration graph
[legend]

Public Member Functions

 PETScDMCollection (std::vector< std::shared_ptr< const FunctionSpace >> function_spaces)
 
 ~PETScDMCollection ()
 Destructor.
 
DM get_dm (int i)
 
void check_ref_count () const
 These are test/debugging functions that will be removed.
 
void reset (int i)
 Debugging use - to be removed.
 
- Public Member Functions inherited from dolfin::PETScObject
 PETScObject ()
 Constructor. Ensures that PETSc has been initialised.
 
virtual ~PETScObject ()
 Destructor.
 

Static Public Member Functions

static std::shared_ptr< PETScMatrixcreate_transfer_matrix (const FunctionSpace &coarse_space, const FunctionSpace &fine_space)
 
- Static Public Member Functions inherited from dolfin::PETScObject
static void petsc_error (int error_code, std::string filename, std::string petsc_function)
 Print error message for PETSc calls that return an error.
 

Detailed Description

This class builds and stores of collection of PETSc DM objects from a hierarchy of FunctionSpaces objects. The DM objects are used to construct multigrid solvers via PETSc.

Warning: This classs is highly experimental and will change

Constructor & Destructor Documentation

◆ PETScDMCollection()

PETScDMCollection::PETScDMCollection ( std::vector< std::shared_ptr< const FunctionSpace >>  function_spaces)

Construct PETScDMCollection from a vector of FunctionSpaces. The vector of FunctionSpaces is stored from coarse to fine.

Member Function Documentation

◆ create_transfer_matrix()

std::shared_ptr< PETScMatrix > PETScDMCollection::create_transfer_matrix ( const FunctionSpace coarse_space,
const FunctionSpace fine_space 
)
static

Create the interpolation matrix from the coarse to the fine space (prolongation matrix)

◆ get_dm()

DM PETScDMCollection::get_dm ( int  i)

Return the ith DM objects. The coarest DM has index 0. Use i=-1 to get the DM for the finest level, i=-2 for the DM for the second finest level, etc.


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