4
using namespace dolfin;
9
class Source : public Function
13
Source(Mesh& mesh) : Function(mesh) {}
15
real eval(const real* x) const
19
return 500.0*exp(-(dx*dx + dy*dy)/0.02);
25
UnitCube mesh(8, 8, 8);
34
PoissonBilinearForm a(n,h);
35
PoissonLinearForm L(f);
36
LinearPDE pde(a, L, mesh);
40
pde.set("PDE linear solver", "direct");
46
// Save solution to file
47
File file("poisson.pvd");