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 test8
00025 
00026         implicit none
00027         include 'med.hf'
00028 
00029         integer cret, fid
00030         
00031         character*32  maa 
00032         integer       mdim
00033         character*32  nomfam
00034         integer       numfam
00035         character*200 attdes
00036         integer       natt, attide, attval
00037         integer       ngro
00038         character*80  gro
00039         integer       nfamn
00040         character*16   str
00041         
00042         parameter  ( mdim = 2, nfamn = 2 )
00043         data       maa /"maa1"/
00044         
00045 
00046         call efouvr(fid,'test8.med',MED_LECTURE_ECRITURE, cret)
00047         print *,cret
00048         if (cret .ne. 0 ) then
00049            print *,'Erreur creation du fichier'
00050            call efexit(-1)
00051         endif      
00052         
00053 
00054         call efmaac(fid,maa,mdim,MED_NON_STRUCTURE,
00055      &                 'un maillage pour test8',cret)
00056         print *,cret
00057         if (cret .ne. 0 ) then
00058            print *,'Erreur creation du maillage'
00059            call efexit(-1)
00060         endif      
00061         
00062 
00063 
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073         numfam = 0
00074         nomfam="FAMILLE_0"
00075         call effamc(fid,maa,nomfam,numfam,attide,attval,attdes,
00076      &          0,gro,0,cret)  
00077         print *,cret
00078         if (cret .ne. 0 ) then
00079            print *,'Erreur creation de la famille 0'
00080            call efexit(-1)
00081         endif      
00082 
00083 
00084 
00085         do numfam=-1,-3,-1
00086            write(str,'(I1.0)') (-numfam)
00087            nomfam = "FAMILLE_ELEMENT_"//str
00088            attide = 1
00089            attval = numfam*100
00090            natt = 1
00091            attdes="description attribut"
00092            gro="groupe1"
00093            ngro = 1
00094            print *, nomfam," - ",numfam," - ",attide," - ",
00095      &                attval," - ",ngro
00096 
00097            call effamc(fid,maa,nomfam,numfam,attide,attval,attdes,
00098      &                natt,gro,ngro,cret)  
00099            print *,cret
00100            if (cret .ne. 0 ) then
00101               print *,'Erreur creation de famille'
00102               call efexit(-1)
00103            endif      
00104         end do
00105   
00106         do numfam=1,nfamn
00107            write(str,'(I1.0)') numfam
00108            nomfam = "FAMILLE_NOEUD_"//str
00109            attide = 1
00110            attval = numfam*100
00111            natt = 1
00112            attdes="description attribut"
00113            gro="groupe1"
00114            ngro = 1
00115            print *, nomfam," - ",numfam," - ",attide," - ",
00116      &                attval," - ",ngro
00117            call effamc(fid,maa,nomfam,numfam,attide,attval,attdes,
00118      &                natt,gro,ngro,cret)  
00119            print *,cret
00120            if (cret .ne. 0 ) then
00121               print *,'Erreur creation de famille'
00122               call efexit(-1)
00123            endif      
00124         end do
00125                
00126 
00127 
00128         call efferm (fid,cret)
00129         print *,cret
00130         if (cret .ne. 0 ) then
00131            print *,'Erreur fermeture du fichier'
00132            call efexit(-1)
00133         endif      
00134 
00135         end 
00136 
00137 
00138 
00139 
00140 
00141