31 parameter(fname =
"Unittest_MEDinterp_1.med")
33 parameter(name1=
"Interpolation family name")
35 parameter(gtype1=med_tria3)
37 parameter(cnode1=med_false)
38 integer nvar1,maxd1,nmaxc1
39 integer nvar,maxd,nmaxc
40 parameter(nvar1=2,maxd1=1,nmaxc1=3)
41 integer ncoef1,ncoef2,ncoef3,ncoef
42 parameter(ncoef1=3,ncoef2=1,ncoef3=1)
43 integer power1(6),power2(2),power3(2)
45 data power1 / 0,0, 1,0, 0,1 /
48 real*8 coef1(3), coef2(1), coef3(1)
50 data coef1 / 1., -1., -1. /
53 integer nbf,nbf1,it,size,size1,size2,size3
54 parameter(nbf1=3,size1=3,size2=1,size3=1)
58 call mfiope(fid,fname,med_acc_rdonly,cret)
59 print *,
'Open file',cret
60 if (cret .ne. 0 )
then
61 print *,
'ERROR : open file'
67 call mipiin(fid,name1,gtype,cnode,nbf,nvar,
69 print *,
'interpolation information',cret
70 if (cret .ne. 0 )
then
71 print *,
'ERROR : interpolation information'
75 if ( (gtype .ne. gtype1) .or.
76 & (cnode .ne. cnode1) .or.
77 & (nbf .ne. nbf1) .or.
78 & (nvar .ne. nvar1) .or.
79 & (maxd .ne. maxd1) .or.
80 & (nmaxc .ne. nmaxc1) )
then
81 print *,
'ERROR : interpolation information'
88 call mipcsz(fid,name1,it,
size,cret)
89 print *,
'memory size',cret
90 if (cret .ne. 0 )
then
91 print *,
'ERROR : memory size'
96 if (
size .ne. size1)
then
97 print *,
'ERROR : memory size size'
103 if (
size .ne. size2)
then
104 print *,
'ERROR : allocation size'
110 if (
size .ne. size3)
then
111 print *,
'ERROR : allocation size'
116 call mipbfr(fid,name1,it,ncoef,power,coef,cret)
117 print *,
'read function',cret
118 if (cret .ne. 0 )
then
119 print *,
'ERROR : read function'
124 if ( (ncoef .ne. ncoef1) .or.
125 & (power(1) .ne. power1(1)) .or.
126 & (power(2) .ne. power1(2)) .or.
127 & (power(3) .ne. power1(3)) .or.
128 & (power(4) .ne. power1(4)) .or.
129 & (power(5) .ne. power1(5)) .or.
130 & (power(6) .ne. power1(6)) .or.
131 & (coef(1) .ne. coef1(1)) .or.
132 & (coef(2) .ne. coef1(2)) .or.
133 & (coef(3) .ne. coef1(3)) )
then
134 print *,
'ERROR : read function'
140 if ( (ncoef .ne. ncoef2) .or.
141 & (power(1) .ne. power2(1)) .or.
142 & (power(2) .ne. power2(2)) .or.
143 & (coef(1) .ne. coef2(1)) )
then
144 print *,
'ERROR : read function'
150 if ( (ncoef .ne. ncoef3) .or.
151 & (power(1) .ne. power3(1)) .or.
152 & (power(2) .ne. power3(2)) .or.
153 & (coef(1) .ne. coef3(1)) )
then
154 print *,
'ERROR : read function'
163 print *,
'Close file',cret
164 if (cret .ne. 0 )
then
165 print *,
'ERROR : close file'
subroutine mipcsz(fid, name, it, n, cret)
Cette routine retourne ne nombre de coefficients/monômes de la fonction de base/forme n° basisfunctit...
subroutine mipbfr(fid, name, it, nc, pw, co, cret)
Cette routine permet la lecture d'une fonction de base/forme de l'interpolation interpname.
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
subroutine mipiin(fid, name, gtype, cnode, nbf, nvar, maxd, nmaxc, cret)
Cette fonction informe des caractéristiques de la fonction d'interpolation nommée interpname...
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.