00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 program MEDloc2
00023
00024 implicit none
00025 include 'med.hf'
00026
00027
00028 integer cret
00029 integer fid
00030 character*64 fname,lname1,giname1,isname1
00031 character*64 giname,isname
00032 parameter (fname="Unittest_MEDlocalization_1.med")
00033 parameter (lname1 = "Localization name")
00034 parameter (giname1=MED_NO_INTERPOLATION)
00035 parameter (isname1=MED_NO_MESH_SUPPORT)
00036 integer gtype1,sdim1,nip1
00037 integer gtype,sdim,nip
00038 parameter(gtype1=MED_TRIA3)
00039 parameter(sdim1=2)
00040 parameter(nip1=3)
00041 real*8 ecoo1(6), ipcoo1(6), wght1(3)
00042 real*8 ecoo(6), ipcoo(6), wght(3)
00043 data ecoo1 / 0.0, 0.0, 1.0, 0.0, 0.0,1.0 /
00044 data ipcoo1 / 0.166666, 0.166666, 0.66666, 0.166666,
00045 & 0.166666, 0.666666 /
00046 data wght1 / 0.166666, 0.166666, 0.166666 /
00047 integer nsmc, nsmc1
00048 parameter (nsmc1=0)
00049 integer sgtype,sgtype1
00050 parameter (sgtype1=MED_UNDEF_GEOTYPE)
00051
00052
00053
00054 call mfiope(fid,fname,MED_ACC_RDONLY,cret)
00055 print *,cret
00056 if (cret .ne. 0 ) then
00057 print *,'ERROR : open file'
00058 call efexit(-1)
00059 endif
00060
00061
00062
00063 call mlclni(fid, lname1, gtype, sdim, nip,
00064 & giname, isname, nsmc, sgtype, cret)
00065 print *,cret
00066 if (cret .ne. 0 ) then
00067 print *,'ERROR : read information'
00068 call efexit(-1)
00069 endif
00070 if ((gtype .ne. gtype1) .or.
00071 & (sdim .ne. sdim1) .or.
00072 & (nip .ne. nip1) .or.
00073 & (giname .ne. giname1) .or.
00074 & (isname .ne. isname1) .or.
00075 & (nsmc .ne. nsmc1) .or.
00076 & (sgtype .ne. sgtype1) ) then
00077 print *,cret
00078 print *,'ERROR : read information'
00079 call efexit(-1)
00080 endif
00081
00082
00083
00084 call mlclor(fid,lname1,MED_FULL_INTERLACE,
00085 & ecoo,ipcoo,wght,cret)
00086 print *,cret
00087 if (cret .ne. 0 ) then
00088 print *,'ERROR : read localization'
00089 call efexit(-1)
00090 endif
00091
00092 if ((ecoo(1) .ne. ecoo1(1)) .or.
00093 & (ecoo(2) .ne. ecoo1(2)) .or.
00094 & (ecoo(3) .ne. ecoo1(3)) .or.
00095 & (ecoo(4) .ne. ecoo1(4)) .or.
00096 & (ecoo(5) .ne. ecoo1(5)) .or.
00097 & (ecoo(6) .ne. ecoo1(6))) then
00098 print *,'ERROR : read localization'
00099 call efexit(-1)
00100 endif
00101
00102 if ((ipcoo(1) .ne. ipcoo1(1)) .or.
00103 & (ipcoo(2) .ne. ipcoo1(2)) .or.
00104 & (ipcoo(3) .ne. ipcoo1(3)) .or.
00105 & (ipcoo(4) .ne. ipcoo1(4)) .or.
00106 & (ipcoo(5) .ne. ipcoo1(5)) .or.
00107 & (ipcoo(6) .ne. ipcoo1(6))) then
00108 print *,'ERROR : read localization'
00109 call efexit(-1)
00110 endif
00111
00112 if ((wght(1) .ne. wght1(1)) .or.
00113 & (wght(2) .ne. wght1(2)) .or.
00114 & (wght(3) .ne. wght1(3))) then
00115 print *,'ERROR : read localization'
00116 call efexit(-1)
00117 endif
00118
00119
00120
00121 call mficlo(fid,cret)
00122 print *,cret
00123 if (cret .ne. 0 ) then
00124 print *,'ERROR : close file'
00125 call efexit(-1)
00126 endif
00127
00128
00129
00130 end
00131