| 1 |
C* This file is part of MED. |
| 2 |
C* |
| 3 |
C* COPYRIGHT (C) 1999 - 2020 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 * Tests for localization module |
| 20 |
C * |
| 21 |
C ***************************************************************************** |
| 22 |
program MEDloc3 |
| 23 |
C |
| 24 |
implicit none |
| 25 |
include 'med.hf' |
| 26 |
C |
| 27 |
C |
| 28 |
integer cret |
| 29 |
integer*8 fid |
| 30 |
|
| 31 |
character*64 fname,lname1,giname1,isname1 |
| 32 |
character*64 giname,isname |
| 33 |
parameter (fname="Unittest_MEDlocalization_1.med") |
| 34 |
integer it,n,nloc |
| 35 |
parameter (nloc=1) |
| 36 |
parameter (giname1=MED_NO_INTERPOLATION) |
| 37 |
parameter (isname1=MED_NO_MESH_SUPPORT) |
| 38 |
integer gtype1,sdim1,nip1 |
| 39 |
integer gtype,sdim,nip |
| 40 |
parameter(gtype1=MED_TRIA3) |
| 41 |
parameter(sdim1=2) |
| 42 |
parameter(nip1=3) |
| 43 |
integer sgtype,sgtype1 |
| 44 |
parameter (sgtype1=MED_UNDEF_GEOTYPE) |
| 45 |
integer nsmc, nsmc1 |
| 46 |
parameter (nsmc1=0) |
| 47 |
C |
| 48 |
C |
| 49 |
C open file |
| 50 |
call mfiope(fid,fname,MED_ACC_RDONLY,cret) |
| 51 |
print *,cret |
| 52 |
if (cret .ne. 0 ) then |
| 53 |
print *,'ERROR : open file' |
| 54 |
call efexit(-1) |
| 55 |
endif |
| 56 |
C |
| 57 |
C |
| 58 |
C number of localization |
| 59 |
call mlcnlc(fid,n,cret) |
| 60 |
print *,cret |
| 61 |
if ((cret .ne. 0) .or. |
| 62 |
& (n .ne. nloc) )then |
| 63 |
print *,'ERROR : number of localization' |
| 64 |
call efexit(-1) |
| 65 |
endif |
| 66 |
C |
| 67 |
C |
| 68 |
C informations bt iteration |
| 69 |
do it=1,n |
| 70 |
call mlclci(fid,it,lname1,gtype,sdim,nip, |
| 71 |
& giname,isname,nsmc,sgtype,cret) |
| 72 |
print *,cret |
| 73 |
if (cret .ne. 0 ) then |
| 74 |
print *,'ERROR : read information' |
| 75 |
call efexit(-1) |
| 76 |
endif |
| 77 |
c |
| 78 |
if ((gtype .ne. gtype1) .or. |
| 79 |
& (sdim .ne. sdim1) .or. |
| 80 |
& (nip .ne. nip1) .or. |
| 81 |
& (giname .ne. giname1) .or. |
| 82 |
& (isname .ne. isname1) .or. |
| 83 |
& (nsmc .ne. nsmc1) .or. |
| 84 |
& (sgtype .ne. sgtype1) ) then |
| 85 |
print *,cret |
| 86 |
print *,'ERROR : read information' |
| 87 |
call efexit(-1) |
| 88 |
endif |
| 89 |
enddo |
| 90 |
C |
| 91 |
C |
| 92 |
C close file |
| 93 |
call mficlo(fid,cret) |
| 94 |
print *,cret |
| 95 |
if (cret .ne. 0 ) then |
| 96 |
print *,'ERROR : close file' |
| 97 |
call efexit(-1) |
| 98 |
endif |
| 99 |
C |
| 100 |
C |
| 101 |
C |
| 102 |
end |
| 103 |
|