~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to demo/pde/poisson/cpp/main.cpp

  • Committer: Garth N. Wells
  • Date: 2008-03-29 09:34:25 UTC
  • Revision ID: gnw20@cam.ac.uk-20080329093425-3ea2vhjvccq56zvi
Add some basic build & install instructions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
//
15
15
// and boundary conditions given by
16
16
//
17
 
//     u(x, y)     = 0               for x = 0
18
 
//     du/dn(x, y) = 25 sin(5 pi y)  for x = 1
19
 
//     du/dn(x, y) = 0               otherwise
 
17
//     u(x, y)     = 0  for x = 0
 
18
//     du/dn(x, y) = 1  for x = 1
 
19
//     du/dn(x, y) = 0  otherwise
20
20
 
21
21
#include <dolfin.h>
22
22
#include "Poisson.h"
86
86
 
87
87
  // Solve PDE
88
88
  Function u;
89
 
  pde.set("PDE linear solver", "iterative");
90
89
  pde.solve(u);
91
90
 
92
91
  // Plot solution
93
92
  plot(u);
94
 
 
 
93
  
95
94
  // Save solution to file
96
95
  File file("poisson.pvd");
97
96
  file << u;