~ubuntu-branches/ubuntu/wily/freefem++/wily

« back to all changes in this revision

Viewing changes to examples++-tutorial/intlevelset.edp

  • Committer: Package Import Robot
  • Author(s): Dimitrios Eftaxiopoulos, Dimitrios Eftaxiopoulos, Christophe Trophime
  • Date: 2013-09-12 00:02:58 UTC
  • mfrom: (1.2.1) (11.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130912000258-aclq2zfa1svt0p3x
Tags: 3.25-1
[ Dimitrios Eftaxiopoulos ]
* Imported Upstream version 3.25 (Closes: #701161 #706714)
* Change installation directory of header-like *.idp files
  from /usr/lib/freefem++ to /usr/include/freefem++, in order
  to fix a lintian warning
* Update patch to examples++-load/Makefile.am in order to enable
  functioning of load *.so and include *.idp commands in *.edp
  scripts
* Delete patches to src/Graphics/sansgraph.cpp and
  src/Graphics/xglrgraph.cpp because they are not needed any more
* Fix lintian warning about missing LDFLAGS
* Override dh_auto_test in debian/rules, such that in case it is 
  used, it completes executing all *.edp example files, regardless
  of aborting on some of them
* Add libmetis-dev to build-deps in d/control
* Remove libparmetis-dev from build deps
* Add --parallel option to dh $@ in debian/rules
* Add hardening compilation flags to mpic++
* Allow testing of compiling and running the example files after build

[ Christophe Trophime ]
* update C. Trophime email
* add support for nlopt, ipopt - simplify debian/rules
* upload CT changes to 3.20
* add patch for configure
* add patch for examples++-mpi
* fix bamg install
* add corrected scripts to build plugins
* add patch for properly build examples++-load
* add lintian overrides for libfreefem++
* add some missing files
* update patches
* update rules
* reorder BuildDepends - comment out unsupported libs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
int err=0;
 
2
mesh Th=square(50,50,[3*x-1.5,3*y-1.5]);
 
3
func r = sqrt(x*x +y*y);
 
4
// wrong ...
 
5
real lc ;
 
6
verbosity=10;
 
7
lc = int1d(Th,levelset=r-1.)(1.) ; 
 
8
cout << " len of the level set = " <<  lc  << " =  2pi " << 2*pi ;
 
9
cout << ", Ok = " << (abs(lc-2*pi) < 1e-1) << endl; 
 
10
if( abs(lc-2*pi) > 1e-1) err++;
 
11
fespace Vh(Th,P1);
 
12
// test linear and bilinear ... 
 
13
varf vl(u,v) = int1d(Th,levelset=r-1.)(v) + int1d(Th,levelset=r-1.)(u*v);
 
14
real[int] vv=vl(0,Vh);
 
15
 
 
16
cout << " len of the level set (varf linear ) = " <<  (lc=vv.sum)  << "=  2pi " << 2*pi ;
 
17
cout  << ", Ok = " << (abs(lc-2*pi) < 1e-1) << endl;
 
18
if( abs(lc-2*pi) > 1e-1) err++; 
 
19
real[int]  one(Vh.ndof); 
 
20
one=1.;
 
21
// sorry not implemented to day ... FH..
 
22
//matrix VV=vl(Vh,Vh); // no build of matrix with levelset ... sorry not implemented to day ... FH..
 
23
//vv = VV*one;
 
24
//cout << " len of the level set (varf bilinear ) = " <<  (lc=vv.sum)  << "=  2pi " << 2*pi;
 
25
//cout << ", Ok = " << (abs(lc-2*pi) < 1e-1) << endl;; 
 
26
//if( abs(lc-2*pi) > 1e-1) err++;
 
27
 
 
28
cout << " Nb err " << err << endl;
 
29
assert(err==0);
 
30