MED fichier: Fichier source de test31.f

MED fichier

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

test31.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 : test31.f
21 C *
22 C * - Description : ecriture d'une numerotation globale dans un maillage MED
23 C *
24 C ******************************************************************************
25 program test31
26 C
27 implicit none
28 include 'med.hf'
29 C
30 C
31 integer*8 fid
32 integer cret
33 character*64 maa
34 character*200 des
35 integer nmaa, mdim , nnoe, type, ind,sdim
36 integer numglb(100),i
37 character*16 nomcoo(2)
38 character*16 unicoo(2)
39 character(16) :: dtunit
40 real*8 coo(8)
41 integer nstep, stype, atype,chgt,tsf
42 real*8 dt
43 parameter(mdim = 2, maa = "maa1",sdim=2)
44 parameter(dt = 0.0)
45 data coo /0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0/
46 data nomcoo /"x","y"/, unicoo /"cm","cm"/
47
48
49 C ** Ouverture du fichier test4.med **
50 call mfiope(fid,'test31.med',med_acc_rdwr, cret)
51 print *,cret
52 if (cret .ne. 0 ) then
53 print *,'Erreur ouverture du fichier test31.med'
54 call efexit(-1)
55 endif
56
57 C ** Creation du maillage maa de dimension 2 **
58 C ** et de type non structure **
59 nnoe=4
60 call mmhcre(fid,maa,mdim,sdim,
61 & med_unstructured_mesh,
62 & 'un premier maillage pour test4',
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
70 C ** Ecriture des coordonnees en mode MED_FULL_INTERLACE : **
71 C ** (X1,Y1, X2,Y2, X3,Y3, ...) dans un repere cartesien **
72 call mmhcow(fid,maa,med_no_dt,med_no_it,dt,
73 & med_full_interlace,nnoe,coo,cret)
74 print *,cret
75 if (cret .ne. 0 ) then
76 print *,'Erreur ecriture des coordonnees des noeuds'
77 call efexit(-1)
78 endif
79
80 print '(A,I1,A,A4,A,I1,A,I4)','maillage '
81 & ,ind,' de nom ',maa,' et de dimension ',mdim,
82 & ' comportant le nombre de noeud ',nnoe
83
84 C ** construction des numeros globaux
85
86 if (nnoe.gt.100) nnoe=100
87
88 do i=1,nnoe
89 numglb(i)=i+100
90 enddo
91
92 C ** ecriture de la numerotation globale
93 call mmhgnw(fid,maa,med_no_dt,med_no_it,med_node,med_none,
94 & nnoe,numglb,cret)
95
96 if (cret .ne. 0 ) then
97 print *,'Erreur ecriture numerotation globale '
98 call efexit(-1)
99 endif
100 C ** Fermeture du fichier **
101 call mficlo(fid,cret)
102 print *,cret
103 if (cret .ne. 0 ) then
104 print *,'Erreur fermeture du fichier'
105 call efexit(-1)
106 endif
107 C
108 end
mmhgnw
subroutine mmhgnw(fid, name, numdt, numit, entype, geotype, n, num, cret)
Definition: medmesh.f:976
mmhcow
subroutine mmhcow(fid, name, numdt, numit, dt, swm, n, coo, cret)
Definition: medmesh.f:299
test31
program test31
Definition: test31.f:25
mfiope
subroutine mfiope(fid, name, access, cret)
Definition: medfile.f:42
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