MED fichier: Fichier source de test23.f

MED fichier

- Documentation MED
- Guides d'utilisation
- Guides de référence

test23.f
Aller à la documentation de ce fichier.
1 C* This file is part of MED.
2 C*
3 C* COPYRIGHT (C) 1999 - 2019 EDF R&D, CEA/DEN
4 C* MED is free software: you can redistribute it and/or modify
5 C* it under the terms of the GNU Lesser General Public License as published by
6 C* the Free Software Foundation, either version 3 of the License, or
7 C* (at your option) any later version.
8 C*
9 C* MED is distributed in the hope that it will be useful,
10 C* but WITHOUT ANY WARRANTY; without even the implied warranty of
11 C* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 C* GNU Lesser General Public License for more details.
13 C*
14 C* You should have received a copy of the GNU Lesser General Public License
15 C* along with MED. If not, see <http://www.gnu.org/licenses/>.
16 C*
17
18 C *******************************************************************************
19 C * - Nom du fichier : test23.f
20 C *
21 C * - Description : ecriture de mailles MED_POLYGONE dans un maillage MED
22 C *
23 C ******************************************************************************
24 program test23
25 C
26 implicit none
27 include 'med.hf'
28 C
29 integer*8 fid
30 integer cret,mdim,sdim
31 parameter(mdim = 2, sdim = 2)
32 character*64 maa
33 integer ni, n
34 parameter(ni=4, n=3)
35 integer index(ni)
36 character*16 nom(n)
37 integer num(n),fam(n)
38 integer con(16)
39 C ** tables des noms et des unites des coordonnees **
40 C profil : (dimension) **
41 character*16 nomcoo(2)
42 character*16 unicoo(2)
43 C
44 data con / 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 /
45 data nom / "poly1", "poly2", "poly3"/
46 data num / 1,2,3 /, fam /0,-1,-2/
47 data index /1,6,12,17/
48 data maa /"maa1"/
49 data nomcoo /"x","y"/, unicoo /"cm","cm"/
50
51 C ** Creation du fichier test23.med **
52 call mfiope(fid,'test23.med',med_acc_rdwr, cret)
53 print *,cret
54 if (cret .ne. 0 ) then
55 print *,'Erreur creation du fichier'
56 call efexit(-1)
57 endif
58 print *,'Creation du fichier test23.med'
59
60 C ** Creation du maillage **
61 call mmhcre(fid,maa,mdim,sdim,
62 & med_unstructured_mesh,'un maillage pour test 23',
63 & "",med_sort_dtit,med_cartesian,nomcoo,unicoo,cret)
64 print *,cret
65 if (cret .ne. 0 ) then
66 print *,'Erreur creation du maillage'
67 call efexit(-1)
68 endif
69 print *,'Creation du maillage'
70
71 C ** Ecriture de la connectivite des mailles polygones **
72 call mmhpgw(fid,maa,med_no_dt,med_no_it,med_undef_dt,med_cell,
73 & med_nodal,ni,index,con,cret)
74 if (cret .ne. 0 ) then
75 print *,'Erreur ecriture des connectivite polygones'
76 call efexit(-1)
77 endif
78 print *,cret
79 print *,'Ecriture des connectivites des mailles de type
80 & MED_POLYGONE'
81
82 C ** Ecriture des noms des mailles polygones **
83 call mmheaw(fid,maa,med_no_dt,med_no_it,med_cell,
84 & med_polygon,n,nom,cret)
85 print *,cret
86 if (cret .ne. 0 ) then
87 print *,'Erreur ecriture des noms polygones'
88 call efexit(-1)
89 endif
90 print *,'Ecriture des noms des polygones'
91
92 C ** Ecriture des numeros des mailles polygones **
93 call mmhenw(fid,maa,med_no_dt,med_no_it,med_cell,
94 & med_polygon,n,num,cret)
95 if (cret .ne. 0 ) then
96 print *,'Erreur ecriture des numeros polygones'
97 call efexit(-1)
98 endif
99 print *,cret
100 print *,'Ecriture des numeros des polygones'
101
102 C ** Ecriture des numeros des familles des mailles polygones **
103 call mmhfnw(fid,maa,med_no_dt,med_no_it,med_cell,
104 & med_polygon,n,fam,cret)
105 if (cret .ne. 0 ) then
106 print *,'Erreur ecriture des numeros de famille polygones'
107 call efexit(-1)
108 endif
109 print *,cret
110 print *,'Ecriture des numeros de familles des polygones'
111
112 C ** Fermeture du fichier **
113 call mficlo(fid,cret)
114 print *,cret
115 if (cret .ne. 0 ) then
116 print *,'Erreur fermeture du fichier'
117 call efexit(-1)
118 endif
119 print *,'Fermeture du fichier'
120 C
121 end
mmhpgw
subroutine mmhpgw(fid, name, numdt, numit, dt, entype, cmode, isize, index, con, cret)
Definition: medmesh.f:890
mmheaw
subroutine mmheaw(fid, mname, numdt, numit, entype, geotype, n, ename, cret)
Definition: medmesh.f:508
mfiope
subroutine mfiope(fid, name, access, cret)
Definition: medfile.f:42
mmhenw
subroutine mmhenw(fid, name, numdt, numit, entype, geotype, n, num, cret)
Definition: medmesh.f:424
mmhfnw
subroutine mmhfnw(fid, name, numdt, numit, entype, geotype, n, num, cret)
Definition: medmesh.f:466
test23
program test23
Definition: test23.f:24
mmhcre
subroutine mmhcre(fid, name, sdim, mdim, mtype, desc, dtunit, stype, atype, aname, aunit, cret)
Definition: medmesh.f:20
mficlo
subroutine mficlo(fid, cret)
Definition: medfile.f:82