~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to dolfin/fem/SparsityPatternBuilder.h

  • Committer: Anders Logg
  • Date: 2008-05-15 16:02:44 UTC
  • Revision ID: logg@simula.no-20080515160244-e2a4wkfxfzmts16s
Add new class SingularSolver:

This class provides a linear solver for singular linear systems
Ax = b where A has a one-dimensional null-space (kernel). This
may happen for example when solving Poisson's equation with
pure Neumann boundary conditions.

The solver attempts to create an extended non-singular system
by adding the constraint [1, 1, 1, ...]^T x = 0.

If an optional mass matrix M is supplied, the solver attempts
to create an extended non-singular system by adding the
constraint m^T x = 0 where m is the lumped mass matrix. This
corresponds to setting the average (integral) of the finite
element function with coefficients x to zero.

The solver makes not attempt to check that the null-space is
indeed one-dimensional. It is also assumed that the system
Ax = b retains its sparsity pattern between calls to solve().

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    
27
27
    /// Build sparsity pattern
28
28
    static void build(GenericSparsityPattern& sparsity_pattern, Mesh& mesh,
29
 
                                  UFC& ufc, const DofMapSet& dof_map_set);
 
29
                      UFC& ufc, const DofMapSet& dof_map_set);
30
30
 
31
31
  };
32
32