Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/v0.1.0/v0.9.0/cpp
DOLFINx  0.1.0
DOLFINx C++ interface
Public Member Functions | List of all members
dolfinx::la::VectorSpaceBasis Class Reference

This class defines a basis for vector spaces, typically used for expressing nullspaces of singular operators and 'near nullspaces' used in smoothed aggregation algebraic multigrid. More...

#include <VectorSpaceBasis.h>

Public Member Functions

 VectorSpaceBasis (const std::vector< std::shared_ptr< PETScVector >> &basis)
 Constructor.
 
 VectorSpaceBasis (const VectorSpaceBasis &basis)=delete
 Delete copy constructor.
 
 VectorSpaceBasis (VectorSpaceBasis &&basis)=default
 Move constructor.
 
 ~VectorSpaceBasis ()=default
 Destructor.
 
void orthonormalize (double tol=1.0e-10)
 Apply the Gram-Schmidt process to orthonormalize the basis. Throws an error if a (near) linear dependency is detected. Error is thrown if <x_i, x_i> < tol.
 
bool is_orthonormal (double tol=1.0e-10) const
 Test if basis is orthonormal.
 
bool is_orthogonal (double tol=1.0e-10) const
 Test if basis is orthogonal.
 
bool in_nullspace (const Mat A, double tol=1.0e-10) const
 Test if basis is in null space of A.
 
void orthogonalize (PETScVector &x) const
 Orthogonalize x with respect to basis.
 
int dim () const
 Number of vectors in the basis.
 
std::shared_ptr< const PETScVectoroperator[] (int i) const
 Get a particular basis vector.
 

Detailed Description

This class defines a basis for vector spaces, typically used for expressing nullspaces of singular operators and 'near nullspaces' used in smoothed aggregation algebraic multigrid.


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