00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024       program test5
00025 
00026       implicit none
00027       include 'med.hf'
00028 
00029 
00030       integer cret, ret
00031       integer fid
00032       
00033 
00034       integer mdim
00035 
00036       character*32 maa
00037       character*200 desc
00038 
00039       integer nnoe 
00040 
00041       real*8, allocatable, dimension (:) ::  coo
00042       real*8, allocatable, dimension (:) ::  coo2
00043 
00044       character*16 nomcoo(2)   
00045       character*16 unicoo(2)
00046 
00047 
00048 
00049       character*16, allocatable, dimension (:) :: nomnoe
00050       integer,     allocatable, dimension (:) :: numnoe
00051       integer,     allocatable, dimension (:) :: nufano
00052       integer,     parameter                  :: profil(2) =  (/ 2, 3 /)
00053  
00054       integer i,rep
00055       logical inonoe,inunoe
00056       integer type
00057 
00058 
00059       call efouvr(fid,'test4.med',MED_LECTURE, cret)
00060       print *,cret
00061 
00062 
00063       if (cret.eq.0) then
00064          call efmaai(fid,1,maa,mdim,type,desc,cret)
00065       endif
00066       print *,cret
00067     
00068 
00069 
00070       if (cret.eq.0) then
00071          nnoe = 0
00072          call efnema(fid,maa,MED_COOR,MED_NOEUD,0,0,        &
00073      &        nnoe,cret)   
00074       endif
00075       print *,cret,' Nombre de noeuds : ',nnoe
00076 
00077        
00078 
00079 
00080 
00081 
00082 
00083       
00084       allocate( coo(nnoe*mdim),coo2(nnoe*mdim), numnoe(nnoe),nufano(nnoe),  &
00085      &     nomnoe(nnoe),STAT=ret )
00086       print *,ret
00087       
00088 
00089 
00090       if (cret.eq.0) then
00091          call efcool(fid,maa,mdim,coo,MED_FULL_INTERLACE,   & 
00092      &        2,profil,0,rep,nomcoo,unicoo,cret)
00093       endif
00094       print *,cret
00095       print *,'Lecture des composantes 2 des coordonnees : '
00096       print *,coo
00097 
00098 
00099       if (cret.eq.0) then
00100          call efcool(fid,maa,mdim,coo,MED_FULL_INTERLACE,   & 
00101      &        1,profil,0,rep,nomcoo,unicoo,cret)
00102       endif
00103       print *,cret
00104       print *,'Lecture des composantes 1 des coordonnees : '
00105       print *,coo
00106 
00107 
00108       if (cret.eq.0) then
00109          call efcool(fid,maa,mdim,coo2,MED_FULL_INTERLACE,   & 
00110      &        1,profil,2,rep,nomcoo,unicoo,cret)
00111       endif
00112       print *,cret
00113       print *,'Lecture des composantes 1 des coordonnees avec le profil : '
00114       print *,coo2
00115 
00116 
00117       if (cret.eq.0) then
00118          call efcool(fid,maa,mdim,coo2,MED_FULL_INTERLACE,   & 
00119      &        MED_ALL,profil,0,rep,nomcoo,unicoo,cret)
00120       endif
00121       print *,cret
00122       print *,'Lecture des toutes les composantes des coordonnees : '
00123       print *,coo2
00124  
00125 
00126       if (cret.eq.0) then
00127          call efnoml(fid,maa,nomnoe,nnoe,MED_NOEUD,         &
00128      &               0,ret)
00129       endif
00130     
00131       if (ret <0) then
00132          inonoe = .FALSE.
00133       else
00134          inonoe = .TRUE.
00135       endif
00136 
00137 
00138       if (cret.eq.0) then
00139          call efnuml(fid,maa,numnoe,nnoe,MED_NOEUD,0,ret)
00140       endif
00141       if (ret <0) then
00142          inunoe = .FALSE.
00143       else
00144          inunoe = .TRUE.
00145       endif
00146       
00147 
00148       if (cret.eq.0) then
00149          call effaml(fid,maa,nufano,nnoe,MED_NOEUD,0,cret)
00150       endif
00151       print *,cret
00152 
00153 
00154       call efferm (fid,cret)
00155       print *,cret
00156       
00157 
00158 
00159       if (cret.eq.0) then
00160 
00161          
00162          print *,"Type de repere         : ", rep
00163          print *,"Nom des coordonnees    : "
00164          print *, nomcoo
00165          
00166          print *,"Unites des coordonnees : "
00167          print *, unicoo
00168          
00169          print *,"Coordonnees des noeuds : "
00170          print *, coo 
00171          
00172          if (inonoe) then
00173             print *,"Noms des noeuds : "
00174             print *,nomnoe
00175          endif
00176 
00177          if (inunoe) then
00178             print *,"Numeros des noeuds : "
00179             print *,numnoe
00180          endif
00181 
00182          print *,"Numeros des familles des noeuds : "
00183          print *,nufano
00184          
00185       endif
00186       
00187 
00188       deallocate(coo,nomnoe,numnoe,nufano);
00189 
00190 
00191       call efexit(cret)
00192       
00193       end program test5
00194 
00195 
00196 
00197 
00198 
00199