MED fichier
Unittest_MEDlink_1.f
Aller à la documentation de ce fichier.
1C* This file is part of MED.
2C*
3C* COPYRIGHT (C) 1999 - 2020 EDF R&D, CEA/DEN
4C* MED is free software: you can redistribute it and/or modify
5C* it under the terms of the GNU Lesser General Public License as published by
6C* the Free Software Foundation, either version 3 of the License, or
7C* (at your option) any later version.
8C*
9C* MED is distributed in the hope that it will be useful,
10C* but WITHOUT ANY WARRANTY; without even the implied warranty of
11C* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12C* GNU Lesser General Public License for more details.
13C*
14C* You should have received a copy of the GNU Lesser General Public License
15C* along with MED. If not, see <http://www.gnu.org/licenses/>.
16C*
17
18C******************************************************************************
19C * Tests for link module
20C *
21C *****************************************************************************
22 program medlink1
23C
24 implicit none
25 include 'med.hf'
26C
27C
28 integer cret
29 integer*8 fid
30
31 character*64 fname
32 parameter(fname = "Unittest_MEDlink_1.med")
33 character*64 mname1, mname2,lname1,lname2
34 parameter(mname1 = "mesh name")
35 parameter(lname1 = "/local/study1/filename.med")
36 parameter(mname2 = "second mesh name")
37 parameter(lname2 = "/local/study2/filename.med")
38C
39C
40C file creation
41 call mfiope(fid,fname,med_acc_creat,cret)
42 print *,'Open file',cret
43 if (cret .ne. 0 ) then
44 print *,'ERROR : file creation'
45 call efexit(-1)
46 endif
47C
48C
49C links creation
50 call mlnliw(fid,mname1,lname1,cret)
51 print *,'Create a link',cret
52 if (cret .ne. 0 ) then
53 print *,'ERROR : link creation'
54 call efexit(-1)
55 endif
56c
57 call mlnliw(fid,mname2,lname2,cret)
58 print *,'Create a link',cret
59 if (cret .ne. 0 ) then
60 print *,'ERROR : link creation'
61 call efexit(-1)
62 endif
63C
64C
65C close file
66 call mficlo(fid,cret)
67 print *,'Close file',cret
68 if (cret .ne. 0 ) then
69 print *,'ERROR : close file'
70 call efexit(-1)
71 endif
72C
73C
74C
75 end
76
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.
Definition medfile.f:42
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
Definition medfile.f:82
subroutine mlnliw(fid, mname, lname, cret)
Cette routine permet d'écrire un lien dans un fichier MED.
Definition medlink.f:21