Petsc API

1. Vector PETSc Double

Class VectorPetscDouble (feelpp._alg.VectorPetscDouble)

1.1. Methods

  • __init__(*args, **kwargs) : Overloaded function.

    1. __init__(). The vector created is empty.

    2. __init__(arg0: int, arg1: feelpp._core.WorldComm). The vector created has a size arg0.

    3. __init__(arg0: int, arg1: int, arg2: feelpp._core.WorldComm). The vector created has a global size arg0, and a local size arg1.

    4. __init__(arg0: feelpp._alg.DataMap, arg1: bool)

  • clear() : clear PETSc vector

  • size()int : return PETSc Vector size

  • vec()vec : return a PETSc Vector that can be manipulated with funciton of the module petsc4py. The functions of this class can be found on the documentation of PETSc4py.

  • zero() : zero PETSc vector

2. Matrix PETSc Double

Class MatrixPetscDouble (feelpp._alg.MatrixPetscDouble). The methods of this class are similar to the previous class, the apply on matrices insted of vectors.

2.1. Methods

  • __init__(*args, **kwargs) : Overloaded function.

    1. __init__(arg0: feelpp._core.WorldComm)

    2. __init__(arg0: feelpp._alg.DataMap, arg1: feelpp._alg.DataMap)

    3. __init__(arg1: feelpp._alg.DataMap, arg2: feelpp._core.WorldComm)

  • clear() : clear PETSc matrix

  • mat(…​)mat : return a PETSc sparse matrix. See the documentation.

  • rowStart()int : return PETSc Matrix row start. This method is usefull is the matrix is shared with many processors, as the following.

  • rowStop()int : return PETSc Matrix row stop

  • size1()int : return PETSc Matrix row size

  • size2()int : return PETSc Matrix column size

  • shape()Tuple[int,int] : return PETSc Matrix shape ((row size, column size))

  • zero() : zero PETSc matrix