MED fichier: Fichier source de test16.f

MED fichier

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

test16.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
19 C ******************************************************************************
20 C * - Nom du fichier : test16.f
21 C *
22 C * - Description : ecriture d'elements d'un maillage MED
23 C * via les routines de niveau 2
24 C * - equivalent a test6.f
25 C *
26 C ******************************************************************************
27 program test16
28 C
29 implicit none
30 include 'med.hf'
31 C
32 C
33 integer*8 fid
34 integer cret, mdim, nse2, ntr3, sdim
35 character*64 maa
36 parameter(mdim = 2,nse2 = 5,maa = "maa1", ntr3 = 2, sdim=2)
37 integer se2 (2*nse2)
38 character*16 nomse2(nse2)
39 integer numse2(nse2),nufase2(nse2)
40 integer tr3 (3*ntr3)
41 character*16 nomtr3(ntr3)
42 integer numtr3(ntr3), nufatr3(ntr3)
43 data se2 /1,2,1,3,2,4,3,4,2,3/
44 data nomse2 /"se1","se2","se3","se4","se5"/
45 data numse2 /1,2,3,4,5/, nufase2 /-1,-1,0,-2,-3/
46 data tr3 /1,2,-5,-5,3,-4/
47 data nomtr3 /"tr1","tr2"/,numtr3/4,5/,nufatr3/0,-1/
48 character*16 nomcoo(2)
49 character*16 unicoo(2)
50 real*8 dt
51 data nomcoo /"x","y"/, unicoo /"cm","cm"/
52 parameter(dt=0.0)
53
54 C ** Creation du fichier test16.med **
55 call mfiope(fid,'test16.med',med_acc_rdwr, cret)
56 print *,cret
57 if (cret .ne. 0 ) then
58 print *,'Erreur creation du fichier'
59 call efexit(-1)
60 endif
61
62 C ** Creation du maillage **
63 call mmhcre(fid,maa,mdim,sdim,med_unstructured_mesh,
64 & 'Un maillage pour test16',"",
65 & med_sort_dtit,med_cartesian,nomcoo,unicoo,cret)
66 print *,cret
67 if (cret .ne. 0 ) then
68 print *,'Erreur creation du maillage'
69 call efexit(-1)
70 endif
71
72 C ** Ecriture des aretes segments MED_SEG2 :
73 C - Connectivite
74 C - Noms (optionnel)
75 C - Numeros (optionnel)
76 C - Numeros des familles **
77 call mmhelw(fid,maa,med_no_dt,med_no_it,dt,med_descending_edge,
78 & med_seg2,med_descending,med_no_interlace,nse2,se2,
79 & med_true,nomse2,med_true,numse2,med_true,nufase2,
80 & cret)
81 print *,cret
82 if (cret .ne. 0 ) then
83 print *,'Erreur des elements'
84 call efexit(-1)
85 endif
86
87 C ** Ecriture des mailles MED_TRIA3 :
88 C - Connectivite
89 C - Noms (optionnel)
90 C - Numeros (optionnel)
91 C - Numeros des familles **
92 call mmhelw(fid,maa,med_no_dt,med_no_it,dt,med_cell,
93 & med_tria3,med_descending,med_no_interlace,ntr3,tr3,
94 & med_true,nomtr3,med_true,numtr3,med_true,nufatr3,
95 & cret)
96 print *,cret
97 if (cret .ne. 0 ) then
98 print *,'Erreur ecriture des elements'
99 call efexit(-1)
100 endif
101
102 C ** Fermeture du fichier **
103 call mficlo(fid,cret)
104 print *,cret
105 if (cret .ne. 0 ) then
106 print *,'Erreur fermeture du fichier'
107 call efexit(-1)
108 endif
109 C
110 end
111
mmhelw
subroutine mmhelw(fid, name, numdt, numit, dt, entype, geotype, cmode, swm, n, con, iname, nname, inum, num, ifam, fam, cret)
Definition: medmesh.f:751
mfiope
subroutine mfiope(fid, name, access, cret)
Definition: medfile.f:42
test16
program test16
Definition: test16.f:27
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