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

« back to all changes in this revision

Viewing changes to doc/pexamples/navier_stokes_criterion.icc

  • 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:
 
1
field navier_stokes_criterion (Float Re, const field& uh) {
 
2
  space Xh  (uh.get_geo(), "P1d", "vector");
 
3
  form mpt (uh.get_space(), Xh, "mass");
 
4
  form inv_m  (Xh, Xh, "inv_mass");
 
5
  field c1 = norm2(inv_m*(mpt*uh));
 
6
  space Th  (uh.get_geo(), "P1d", "tensor");
 
7
  form two_D (uh.get_space(), Th, "2D");
 
8
  form inv_mt (Th, Th, "inv_mass");
 
9
  field two_Duh = inv_mt*(two_D*uh);
 
10
  field c2 = norm2(two_Duh);
 
11
  return sqrt(Re*c1 + c2);
 
12
}