~ubuntu-branches/ubuntu/trusty/rheolef/trusty

« back to all changes in this revision

Viewing changes to nfem/ptst/field_expr4_tst.cc

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito
  • Date: 2012-04-06 09:12:21 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120406091221-m58me99p1nxqui49
Tags: 6.0-1
* New upstream release 6.0 (major changes):
  - massively distributed and parallel support
  - full FEM characteristic method (Lagrange-Gakerkin method) support
  - enhanced users documentation 
  - source code supports g++-4.7 (closes: #667356)
* debian/control: dependencies for MPI distributed solvers added
* debian/rules: build commands simplified
* debian/librheolef-dev.install: man1/* to man9/* added
* debian/changelog: package description rewritted (closes: #661689)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
/// =========================================================================
21
21
// check f(field_expr) for f in std::math
22
22
#include "rheolef.h"
23
 
#include "rounder.h"
 
23
#include "rheolef/rounder.h"
24
24
using namespace rheolef;
25
25
using namespace std;
26
26
Float g (const point& x) { return sin(x[0]+x[1]+0.5); }
27
27
int main(int argc, char**argv) {
28
 
  environment distributed(argc, argv);
 
28
  environment rheolef(argc, argv);
29
29
  geo omega (argv[1]); 
30
30
  string dom_name = (argc > 2) ? argv[2] : "right";
31
31
  Float prec = (argc > 3) ? atof(argv[3]) : 1e-10;
34
34
  field fh = interpolate(Vh, g);
35
35
  field gh = interpolate(Wh, g);
36
36
  field zh (Wh);
37
 
warning_macro ("expr...");
38
37
  zh = sin(gh) - sin(gh + 2*fh[dom_name]) + compose (rounder(prec), 2*gh-fh[dom_name]);
39
 
warning_macro ("expr done");
40
 
  dcout << setprecision(15) << compose (rounder(prec),zh);
 
38
  dout << setprecision(15) << field(compose (rounder(prec),zh));
41
39
}