ngsPETSc.mat

This module contains all the functions related to wrapping NGSolve matrices to PETSc matrices using the petsc4py interface.

Classes

Matrix

This class creates a PETSc Matrix

Module Contents

class ngsPETSc.mat.Matrix(ngsMat, parDescr, matType='aij', petscMat=None)

Bases: object

This class creates a PETSc Matrix

Parameters:
  • ngsMat – the NGSolve matrix

  • freeDofs – free DOFs of the FE spaces used to construct the matrix

  • matType – type of PETSc matrix, i.e. PETSc sparse: aij,

MKL sparse: aijmkl or CUDA: aijcusparse

localMat
indMat
colMat
view()

This function display PETSc Mat info