~ubuntu-branches/ubuntu/saucy/rheolef/saucy

« back to all changes in this revision

Viewing changes to nfem/ptst/interpolate_tst.cc

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Saramito
  • Date: 2011-03-23 11:14:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110323111426-cjvhey7lxt6077ty
Tags: 5.93-1
* New upstream release (minor changes):
  - some extra warning message deleted in heap_allocator
  - graphic output with mayavi2 fixed
  - add doc refman in .info and .pdf format

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
size_t N;
26
26
Float f (const point& x) { return 1+(0.5/N)*(x[0]*(1-x[0])+x[1]*(1-x[1])+x[2]*(1-x[2])); }
27
27
int main(int argc, char**argv) {
28
 
  environment parallel(argc, argv);
 
28
  environment distributed(argc, argv);
 
29
  geo omega (argv[1]);
 
30
  space Vh (omega, argv[2]);
29
31
  Float prec = (argc > 3) ? atof(argv[3]) : 1e-10;
30
 
  geo omega (argv[1]);
31
 
  space Vh (omega, "P1");
32
32
  N = omega.dimension();
33
33
  field fh = interpolate(Vh, f);
34
 
  pcout << setprecision(15) << compose(rounder(prec),fh);
 
34
  dcout << setprecision(15) << compose(rounder(prec),fh);
35
35
}