This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

What is dolfin::LocalSolver and how do I use it?

+3 votes
asked Jun 13, 2014 by Garth N. Wells FEniCS Expert (35,930 points)

1 Answer

+3 votes

Local solver solves problems cell-by-cell, whith the small local (cell-wise) problems solved using Eigen. The interface is:

/// Solve local (cell-wise) problem and copy result into global
/// vector x.
LocalSolver::solve(GenericVector& x, const Form& a, const Form& L,
                              bool symmetric=false) const;

The result is the same as regular a solve if the test/trial functions are discontinuous and involve no facet integrals, but uses virtually no memory and is much faster.

If the test/trial functions are continuous, LocalSolve can still be used but the results will not be exact. This can, however, still be useful in some cases, e.g. approximate visualisation a solution.

answered Jun 13, 2014 by Garth N. Wells FEniCS Expert (35,930 points)
edited Jun 13, 2014 by Garth N. Wells
...