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 program test31
00026
00027 implicit none
00028 include 'med.hf'
00029
00030
00031 integer cret,fid
00032 character*64 maa
00033 character*200 des
00034 integer nmaa, mdim , nnoe, type, ind,sdim
00035 integer numglb(100),i
00036 character*16 nomcoo(2)
00037 character*16 unicoo(2)
00038 character(16) :: dtunit
00039 real*8 coo(8)
00040 integer nstep, stype, atype,chgt,tsf
00041 real*8 dt
00042 parameter (mdim = 2, maa = "maa1",sdim=2)
00043 parameter (dt = 0.0)
00044 data coo /0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0/
00045 data nomcoo /"x","y"/, unicoo /"cm","cm"/
00046
00047
00048
00049 call mfiope(fid,'test31.med',MED_ACC_RDWR, cret)
00050 print *,cret
00051 if (cret .ne. 0 ) then
00052 print *,'Erreur ouverture du fichier test31.med'
00053 call efexit(-1)
00054 endif
00055
00056
00057
00058 nnoe=4
00059 call mmhcre(fid,maa,mdim,sdim,
00060 & MED_UNSTRUCTURED_MESH,
00061 & 'un premier maillage pour test4',
00062 & "",MED_SORT_DTIT,MED_CARTESIAN,nomcoo,unicoo,cret)
00063 print *,cret
00064 if (cret .ne. 0 ) then
00065 print *,'Erreur creation du maillage'
00066 call efexit(-1)
00067 endif
00068
00069
00070
00071 call mmhcow(fid,maa,MED_NO_DT,MED_NO_IT,dt,
00072 & MED_FULL_INTERLACE,nnoe,coo,cret)
00073 print *,cret
00074 if (cret .ne. 0 ) then
00075 print *,'Erreur ecriture des coordonnees des noeuds'
00076 call efexit(-1)
00077 endif
00078
00079 print '(A,I1,A,A4,A,I1,A,I4)','maillage '
00080 & ,ind,' de nom ',maa,' et de dimension ',mdim,
00081 & ' comportant le nombre de noeud ',nnoe
00082
00083
00084
00085 if (nnoe.gt.100) nnoe=100
00086
00087 do i=1,nnoe
00088 numglb(i)=i+100
00089 enddo
00090
00091
00092 call mmhgnw(fid,maa,MED_NO_DT,MED_NO_IT,MED_NODE,MED_NONE,
00093 & nnoe,numglb,cret)
00094
00095 if (cret .ne. 0 ) then
00096 print *,'Erreur ecriture numerotation globale '
00097 call efexit(-1)
00098 endif
00099
00100 call mficlo(fid,cret)
00101 print *,cret
00102 if (cret .ne. 0 ) then
00103 print *,'Erreur fermeture du fichier'
00104 call efexit(-1)
00105 endif
00106
00107 end