ngsPETSc.vec
This module contains all the functions related to the NGSolve vector - PETSc vector mapping using the petsc4py interface.
Classes
This class creates a mapping between a PETSc vector and NGSolve |
Module Contents
- class ngsPETSc.vec.VectorMapping(parDescr, prefix='ngs_')
This class creates a mapping between a PETSc vector and NGSolve vectors
- Parameters:
parDescr – the finite element space for the vector or tuple (dofs, freeDofs)
prefix – prefix for PETSc options
- dofs
- bsize
- locfree
- isetlocfree
- nloc
- nglob
- sVec
- pVec
- ngsToPETScScat
- petscVec(ngsVec, petscVec=None)
This function generate a PETSc vector from a NGSolve vector
- Parameters:
ngsVec – the NGSolve vector
petscVec – the PETSc vector to be loaded with NGSolve
vector, if None new PETSc vector is generated, by deafault None.
- ngsVec(petscVec, ngsVec=None)
This function generate a NGSolve vector from a PETSc vector
- Parameters:
petscVec – the PETSc vector
ngsVec – the NGSolve vector vector to be loaded with PETSc
vector, if None new PETSc vector is generated, by deafault None.