Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
freefem [2012/11/07 14:59] – créée adminfreefem [2013/02/19 09:00] (Version actuelle) – [MPI version] admin
Ligne 9: Ligne 9:
 ====== Installed version ====== ====== Installed version ======
  
-  * 3.6+  * 3.16 
 +  * 3.20 (with all depencies) 
 +====== Examples ====== 
 +{{ :th4.jpg?400|}} 
 +  * **A very small example ''2d'' of how to solve the Poisson equation on a ''L'' shape:**  
 +<file  c poisson.edp> 
 + 
 +border aaa(t=0,1){x=t;y=0;}; 
 +border bbb(t=0,0.5){x=1;y=t;}; 
 +border ccc(t=0,0.5){x=1-t;y=0.5;}; 
 +border ddd(t=0.5,1){x=0.5;y=t;}; 
 +border eee(t=0.5,1){x=1-t;y=1;}; 
 +border fff(t=0,1){x=0;y=1-t;}; 
 +mesh Th = buildmesh (aaa(6) + bbb(4) + ccc(4) +ddd(4) + eee(4) + fff(6)); 
 +fespace Vh(Th,P1);   //  to change P1 in P2 to make P2 finite element. 
 +Vh u=0,v; 
 +func f= 1; 
 +func g= 0; 
 +int i=0; 
 +real error=0.1, coef= 0.1^(1./5.); 
 +problem Probem1(u,v,solver=CG,eps=-1.0e-6) = 
 +    int2d(Th)(  dx(u)*dx(v) + dy(u)*dy(v))  
 +  + int2d(Th) ( v*f )  
 +  + on(aaa,bbb,ccc,ddd,eee,fff,u=g)  ; 
 +   
 +for (i=0;i< 10;i++) 
 +{    
 +  real d = clock(); 
 +  Probem1; //  solve the problem  
 +  plot(u,Th,wait=1); 
 +  Th=adaptmesh(Th,u,inquire=1,err=error); 
 +  error = error * coef; 
 +} ; 
 + 
 +</file> 
 + 
 +====== Using FreeFem++ ====== 
 +===== Interactive mode ===== 
 + 
 +<note tip>**Use mesoshared.univ-fcomte.fr**</note> 
 + 
 +<code bash> 
 +$ module laod freefem++ 
 +</code> 
 + 
 +<code bash> 
 + 
 +$ freefem++ poisson.edp 
 + 
 +</code> 
 + 
 + 
 + 
 +===== Sequential version ===== 
 +<note tip>**Use mesoseq.univ-fcomte.fr**</note> 
 +  * 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  
 + 
 +</file>  
 + 
 + 
 +===== MPI version ===== 
 + 
 +Here is an example how to execute with MPI: 
 + 
 +<code bash> 
 + 
 +mpirun -np 2 FreeFem++-mpi schwarz.edp 
 + 
 +</code> 
 +    
 + 
 +  * 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 
 + 
 +</file>  
 +====== Documentation ====== 
 +  * http://www.freefem.org/ff++/ 
 +  * http://www.um.es/freefem/ff++/pmwiki.php?n=Main.HomePage 
  • freefem.1352300389.txt.gz
  • Dernière modification : 2015/02/25 08:45
  • (modification externe)