00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 program test17
00028
00029 implicit none
00030 include 'med.hf'
00031
00032 integer :: cret,ret, fid, nse2, mdim
00033 integer, allocatable, dimension(:) ::se2
00034 character*16, allocatable, dimension(:) ::nomse2
00035 integer, allocatable, dimension(:) ::numse2,nufase2
00036 integer ntr3
00037 integer, allocatable, dimension(:) ::tr3
00038 character*16, allocatable, dimension(:) ::nomtr3
00039 integer, allocatable, dimension(:) ::numtr3
00040 integer, allocatable, dimension(:) ::nufatr3
00041 character*32 :: maa = "maa1"
00042 character*200 :: desc
00043 logical :: inoele1,inuele1,inoele2,inuele2
00044 integer tse2,ttr3
00045 integer i,type
00046
00047
00048 call efouvr(fid,'test16.med',MED_LECTURE, cret)
00049 print *,cret
00050
00051
00052 if (cret.eq.0) then
00053 call efmaai(fid,1,maa,mdim,type,desc,cret)
00054 print *,"Maillage de nom : ",maa," et de dimension ",mdim
00055 endif
00056 print *,cret
00057
00058
00059 if (cret.eq.0) then
00060 call efnema(fid,maa,MED_CONN,MED_ARETE,MED_SEG2,MED_DESC,nse2,cret)
00061 endif
00062 print *,cret
00063
00064 if (cret.eq.0) then
00065 call efnema(fid,maa,MED_CONN,MED_MAILLE,MED_TRIA3,MED_DESC,ntr3,cret)
00066 endif
00067 print *,cret
00068
00069 print *,"Nombre de MED_SEG2 : ",nse2," - nombre de MED_TRIA3 : ",ntr3
00070
00071
00072 tse2 = 2;
00073 allocate(se2(tse2*nse2),nomse2(nse2),numse2(nse2),nufase2(nse2),STAT=ret)
00074 ttr3 = 3;
00075 allocate(tr3(ntr3*ttr3),nomtr3(ntr3),numtr3(ntr3),nufatr3(ntr3),STAT=ret)
00076
00077
00078
00079
00080
00081
00082 if (cret.eq.0) then
00083 call efelel(fid,maa,mdim,se2,MED_NO_INTERLACE,nomse2,inoele1,numse2,inuele1, &
00084 & nufase2,nse2,MED_ARETE,MED_SEG2,MED_DESC,cret)
00085 endif
00086 print *,cret
00087
00088
00089
00090
00091
00092
00093
00094 if (cret.eq.0) then
00095 call efelel(fid,maa,mdim,tr3,MED_NO_INTERLACE,nomtr3,inoele2,numtr3,inuele2, &
00096 & nufatr3,ntr3,MED_MAILLE,MED_TRIA3,MED_DESC,cret)
00097 endif
00098 print *,cret
00099
00100
00101 call efferm (fid,cret)
00102 print *,cret
00103
00104
00105 if (cret.eq.0) then
00106 print *,"Connectivite des segments : ",nse2
00107
00108 if (inoele1) then
00109 print *,"Noms des segments : ",nomse2
00110 endif
00111
00112 if (inuele1) then
00113 print *,"Numeros des segments : ",numse2
00114 endif
00115
00116 print *,"Numeros des familles des segments : ",nufase2
00117
00118
00119 print *,"Connectivite des triangles : ",tr3
00120
00121 if (inoele2) then
00122 print *,"Noms des triangles :", nomtr3
00123 endif
00124
00125 if (inuele2) then
00126 print *,"Numeros des triangles :", numtr3
00127 endif
00128
00129 print *,"Numeros des familles des triangles :", nufatr3
00130
00131 end if
00132
00133
00134
00135 deallocate(se2,nomse2,numse2,nufase2);
00136 deallocate(tr3,nomtr3,numtr3,nufatr3);
00137
00138
00139 call efexit(cret)
00140
00141 end program test17