Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| freefem [2012/11/07 15:00] – [Installed version] admin | freefem [2013/02/19 09:00] (Version actuelle) – [MPI version] admin | ||
|---|---|---|---|
| Ligne 10: | Ligne 10: | ||
| * 3.16 | * 3.16 | ||
| + | * 3.20 (with all depencies) | ||
| + | ====== Examples ====== | ||
| + | {{ : | ||
| + | * **A very small example '' | ||
| + | < | ||
| + | |||
| + | border aaa(t=0, | ||
| + | border bbb(t=0, | ||
| + | border ccc(t=0, | ||
| + | border ddd(t=0.5, | ||
| + | border eee(t=0.5, | ||
| + | border fff(t=0, | ||
| + | mesh Th = buildmesh (aaa(6) + bbb(4) + ccc(4) +ddd(4) + eee(4) + fff(6)); | ||
| + | fespace Vh(Th, | ||
| + | Vh u=0,v; | ||
| + | func f= 1; | ||
| + | func g= 0; | ||
| + | int i=0; | ||
| + | real error=0.1, coef= 0.1^(1./ | ||
| + | problem Probem1(u, | ||
| + | int2d(Th)( | ||
| + | + int2d(Th) ( v*f ) | ||
| + | + on(aaa, | ||
| + | | ||
| + | for (i=0;i< 10;i++) | ||
| + | { | ||
| + | real d = clock(); | ||
| + | Probem1; // solve the problem | ||
| + | plot(u, | ||
| + | Th=adaptmesh(Th, | ||
| + | error = error * coef; | ||
| + | } ; | ||
| + | |||
| + | </ | ||
| + | |||
| + | ====== Using FreeFem++ ====== | ||
| + | ===== Interactive mode ===== | ||
| + | |||
| + | <note tip> | ||
| + | |||
| + | <code bash> | ||
| + | $ module laod freefem++ | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | |||
| + | $ freefem++ poisson.edp | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== Sequential version ===== | ||
| + | <note tip> | ||
| + | * SGE script example of sequential program | ||
| + | |||
| + | <file bash free_fem++_seq.sge> | ||
| + | |||
| + | #!/bin/bash -l | ||
| + | |||
| + | |||
| + | #$ -o $JOB_NAME.o$JOB_ID | ||
| + | | ||
| + | #$ -e $JOB_NAME.e$JOB_ID | ||
| + | |||
| + | |||
| + | #$ -N freefem_test | ||
| + | |||
| + | #$ -V | ||
| + | |||
| + | module load freefem++ | ||
| + | |||
| + | Freefem++-nw poisson.edp | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ===== MPI version ===== | ||
| + | |||
| + | Here is an example how to execute with MPI: | ||
| + | |||
| + | <code bash> | ||
| + | |||
| + | mpirun -np 2 FreeFem++-mpi schwarz.edp | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | * SGE scrip example of a parallel program | ||
| + | |||
| + | |||
| + | |||
| + | <file bash free_fem++_MPI.sge> | ||
| + | |||
| + | #!/bin/bash -l | ||
| + | |||
| + | |||
| + | #$ -o $JOB_NAME.o$JOB_ID | ||
| + | | ||
| + | #$ -e $JOB_NAME.e$JOB_ID | ||
| + | |||
| + | #$ -pe impi_tight 4 | ||
| + | |||
| + | #$ -N freefem_test | ||
| + | |||
| + | #$ -V | ||
| + | |||
| + | module load freefem++ | ||
| + | |||
| + | mpirun -np $NSLOTS FreeFem++-mpi schwarz.edp | ||
| + | |||
| + | </ | ||
| + | ====== Documentation ====== | ||
| + | * http:// | ||
| + | * http:// | ||
| + | |||