test25.f
Aller à la documentation de ce fichier.
C* This file is part of MED.
C*
C* COPYRIGHT (C) 1999 - 2020 EDF R&D, CEA/DEN
C* MED is free software: you can redistribute it and/or modify
C* it under the terms of the GNU Lesser General Public License as published by
C* the Free Software Foundation, either version 3 of the License, or
C* (at your option) any later version.
C*
C* MED is distributed in the hope that it will be useful,
C* but WITHOUT ANY WARRANTY; without even the implied warranty of
C* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
C* GNU Lesser General Public License for more details.
C*
C* You should have received a copy of the GNU Lesser General Public License
C* along with MED. If not, see <http://www.gnu.org/licenses/>.
C*
C *******************************************************************************
C * - Nom du fichier : test25.f
C *
C * - Description : ecriture de mailles MED_POLYEDRE dans un maillage MED
C *
C ******************************************************************************
program test25
C
implicit none
include 'med.hf'
C
integer*8 fid
integer cret,mdim, sdim
parameter(mdim = 3, sdim = 3)
character*64 maa
integer n
parameter(n=2)
C Connectivite nodale
integer np,nf
parameter(nf=9,np=3)
integer indexp(np),indexf(nf)
integer conn(24)
C Connectivite descendante
integer np2,nf2
parameter(nf2=8,np2=3)
integer indexp2(np2),indexf2(nf2)
integer conn2(nf2)
character*16 nom(n)
integer num(n),fam(n)
C ** tables des noms et des unites des coordonnees **
C profil : (dimension) **
character*16 nomcoo(3)
character*16 unicoo(3)
C
data indexp / 1,5,9 /
data indexf / 1,4,7,10,13,16,19,22,25 /
data conn / 1,2,3,4,5,6,7,8,9,10,11,12,13,14,
& 15,16,17,18,19,20,21,22,23,24 /
data indexp2 / 1,5,9 /
data indexf2 / med_tria3,med_tria3,med_tria3,med_tria3,
& med_tria3,med_tria3,med_tria3,med_tria3 /
data conn2 / 1,2,3,4,5,6,7,8 /
data nom / "poly1", "poly2"/
data num / 1,2 /, fam / 0,-1 /
data maa /"maa1"/
data nomcoo /"x","y","z"/, unicoo /"cm","cm","cm"/
C ** Creation du fichier test25.med **
call mfiope(fid,'test25.med',med_acc_rdwr, cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur creation du fichier'
call efexit(-1)
endif
print *,'Creation du fichier test25.med'
C ** Creation du maillage **
call mmhcre(fid,maa,mdim,sdim,
& med_unstructured_mesh,'un maillage pour test 25',
& "",med_sort_dtit,med_cartesian,nomcoo,unicoo,cret)
if (cret .ne. 0 ) then
print *,'Erreur creation du maillage'
call efexit(-1)
endif
print *,cret
print *,'Creation du maillage'
C ** Ecriture des connectivites des mailles polyedres en mode nodal **
call mmhphw(fid,maa,med_no_dt,med_no_it,med_undef_dt,med_cell,
& med_nodal,np,indexp,nf,indexf,conn,cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur ecriture connectivite des polyedres'
call efexit(-1)
endif
print *,'Ecriture des connectivites des mailles
& de type MED_POLYEDRE'
print *,'Description nodale'
C ** Ecriture des connectivites des mailles polyedres en mode descendant **
call mmhphw(fid,maa,med_no_dt,med_no_it,med_undef_dt,med_cell,
& med_descending,np2,indexp2,nf2,indexf2,conn2,cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur ecriture connectivite des polyedres'
call efexit(-1)
endif
print *,'Ecriture des connectivites des mailles
& de type MED_POLYEDRE'
print *,'Description descendante'
C ** Ecriture des noms des mailles polyedres **
call mmheaw(fid,maa,med_no_dt,med_no_it,med_cell,
& med_polyhedron,n,nom,cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur ecriture noms des polyedres'
call efexit(-1)
endif
print *,'Ecriture des noms des polyedress'
C ** Ecriture des numeros des mailles polyedres **
call mmhenw(fid,maa,med_no_dt,med_no_it,med_cell,
& med_polyhedron,n,num,cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur ecriture numeros des polyedres'
call efexit(-1)
endif
print *,'Ecriture des numeros des polyedres'
C ** Ecriture des numeros des familles des segments **
call mmhfnw(fid,maa,med_no_dt,med_no_it,med_cell,
& med_polyhedron,n,fam,cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur ecriture numeros de familles polyedres'
call efexit(-1)
endif
print *,'Ecriture des numeros de familles des polyedres'
C ** Fermeture du fichier **
call mficlo(fid,cret)
print *,cret
if (cret .ne. 0 ) then
print *,'Erreur fermeture du fichier'
call efexit(-1)
endif
print *,'Fermeture du fichier'
C
end
mfiope
subroutine mfiope(fid, name, access, cret)
Definition medfile.f:42
mficlo
subroutine mficlo(fid, cret)
Definition medfile.f:82
mmhcre
subroutine mmhcre(fid, name, sdim, mdim, mtype, desc, dtunit, stype, atype, aname, aunit, cret)
Definition medmesh.f:20
mmheaw
subroutine mmheaw(fid, mname, numdt, numit, entype, geotype, n, ename, cret)
Definition medmesh.f:508
mmhfnw
subroutine mmhfnw(fid, name, numdt, numit, entype, geotype, n, num, cret)
Definition medmesh.f:466
mmhenw
subroutine mmhenw(fid, name, numdt, numit, entype, geotype, n, num, cret)
Definition medmesh.f:424
mmhphw
subroutine mmhphw(fid, name, numdt, numit, dt, entype, cmode, fisize, findex, nisize, nindex, con, cret)
Definition medmesh.f:933
test25
program test25
Definition test25.f:24