~ubuntu-branches/ubuntu/wily/dolfin/wily-proposed

« back to all changes in this revision

Viewing changes to demo/documented/singular-poisson/cpp/main.cpp

  • Committer: Package Import Robot
  • Author(s): Johannes Ring
  • Date: 2014-09-22 14:35:34 UTC
  • mfrom: (1.1.17) (19.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20140922143534-0yi89jyuqbgdxwm9
Tags: 1.4.0+dfsg-4
* debian/control: Disable libcgal-dev on i386, mipsel and sparc.
* debian/rules: Remove bad directives in pkg-config file dolfin.pc
  (closes: #760658).
* Remove debian/libdolfin-dev.lintian-overrides.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
  L.g = g;
81
81
 
82
82
  // Assemble system
83
 
  boost::shared_ptr<GenericMatrix> A(new Matrix);
 
83
  std::shared_ptr<GenericMatrix> A(new Matrix);
84
84
  Vector b;
85
85
  assemble(*A, a);
86
86
  assemble(b, L);
92
92
  KrylovSolver solver(A, "gmres");
93
93
 
94
94
  // Create vector that spans null space (normalised)
95
 
  boost::shared_ptr<GenericVector> null_space_ptr(b.copy());
 
95
  std::shared_ptr<GenericVector> null_space_ptr(b.copy());
96
96
  V.dofmap()->set(*null_space_ptr, sqrt(1.0/null_space_ptr->size()));
97
 
  std::vector<boost::shared_ptr<GenericVector> > null_space_basis;
 
97
  std::vector<std::shared_ptr<GenericVector> > null_space_basis;
98
98
  null_space_basis.push_back(null_space_ptr);
99
99
 
100
100
  // Create null space basis object and attach to Krylov solver
124
124
 
125
125
  return 0;
126
126
}
127
 
 
128