12.07.2015 Views

DOLFIN User Manual - FEniCS Project

DOLFIN User Manual - FEniCS Project

DOLFIN User Manual - FEniCS Project

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>DOLFIN</strong> <strong>User</strong> <strong>Manual</strong>Hoffman, Jansson, Logg, WellsA simple example of using the solver:int main(){Mesh mesh("mesh.xml.gz");MyFunction f;MyBC bc;PoissonSolver::solve(mesh, f, bc);}return 0;Where “f” is a Function specifying the right-hand side of the equation and“bc” is a BoundaryCondition.12.1.2 PerformanceThe solver is an illustrative example and performance has not been a goal.It uses a GMRES linear solver, where a multi-grid linear solver would giveoptimal performance.12.1.3 LimitationsThe solver is meant to be the simplest example solver, and therefore somesimplifications have been made. Typically the general form of Poisson’s equationincludes a diffusion coefficient which has been omitted here.79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!