implicit none
include 'med.hf'
integer*8 fid
integer cret
integer mdim, sdim
character*64 maa
integer nnoe
real*8 coo(8)
character*16 nomcoo(2)
character*16 unicoo(2)
character*16 nomnoe(4)
integer numnoe(4)
integer nufano(4)
real*8 dt
parameter(mdim = 2, maa = "maa1",nnoe = 4, sdim=2)
parameter(dt = 0.0)
data coo /0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0/
data nomcoo /"x","y"/, unicoo /"cm","cm"/
data nomnoe /"nom1","nom2","nom3","nom4"/
data numnoe /1,2,3,4/, nufano /0,1,2,2/
call mfiope(fid,
'test4.med',med_acc_rdwr, cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur creation du fichier'
call efexit(-1)
endif
call mmhcre(fid,maa,mdim,sdim,
& med_unstructured_mesh,'un premier maillage pour test4',
& "",med_sort_dtit,med_cartesian,nomcoo,unicoo,cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur creation du maillage'
call efexit(-1)
endif
call mmhcow(fid,maa,med_no_dt,med_no_it,dt,
& med_full_interlace,nnoe,coo,cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur ecriture des coordonnees des noeuds'
call efexit(-1)
endif
call mmheaw(fid,maa,med_no_dt,med_no_it,med_node,
& med_none,nnoe,nomnoe,cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur ecriture des noms des noeuds'
call efexit(-1)
endif
call mmhenw(fid,maa,med_no_dt,med_no_it,med_node,
& med_none,nnoe,numnoe,cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur ecriture des numeros des noeuds'
call efexit(-1)
endif
call mmhfnw(fid,maa,med_no_dt,med_no_it,med_node,
& med_none,nnoe,nufano,cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur ecriture des numeros de famille'
call efexit(-1)
endif
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur fermeture du fichier'
call efexit(-1)
endif
end
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
subroutine mmhcre(fid, name, sdim, mdim, mtype, desc, dtunit, stype, atype, aname, aunit, cret)
Cette routine permet de créer un maillage dans un fichier.
subroutine mmheaw(fid, mname, numdt, numit, entype, geotype, n, ename, cret)
Cette routine permet d'écrire les noms d'un type d'entité d'un maillage.
subroutine mmhfnw(fid, name, numdt, numit, entype, geotype, n, num, cret)
subroutine mmhenw(fid, name, numdt, numit, entype, geotype, n, num, cret)
subroutine mmhcow(fid, name, numdt, numit, dt, swm, n, coo, cret)