32 parameter(fname =
"Unittest_MEDinterp_1.med")
34 parameter(name1=
"Interpolation family name")
36 parameter(gtype1=med_tria3)
38 parameter(cnode1=med_false)
39 integer nvar1,maxd1,nmaxc1
40 integer nvar,maxd,nmaxc
41 parameter(nvar1=2,maxd1=1,nmaxc1=3)
42 integer ncoef1,ncoef2,ncoef3,ncoef
43 parameter(ncoef1=3,ncoef2=1,ncoef3=1)
44 integer power1(6),power2(2),power3(2)
46 data power1 / 0,0, 1,0, 0,1 /
49 real*8 coef1(3), coef2(1), coef3(1)
51 data coef1 / 1., -1., -1. /
54 integer nbf,nbf1,it,size,size1,size2,size3
55 parameter(nbf1=3,size1=3,size2=1,size3=1)
59 call mfiope(fid,fname,med_acc_rdonly,cret)
60 print *,
'Open file',cret
61 if (cret .ne. 0 )
then
62 print *,
'ERROR : open file'
68 call mipiin(fid,name1,gtype,cnode,nbf,nvar,
70 print *,
'interpolation information',cret
71 if (cret .ne. 0 )
then
72 print *,
'ERROR : interpolation information'
76 if ( (gtype .ne. gtype1) .or.
77 & (cnode .ne. cnode1) .or.
78 & (nbf .ne. nbf1) .or.
79 & (nvar .ne. nvar1) .or.
80 & (maxd .ne. maxd1) .or.
81 & (nmaxc .ne. nmaxc1) )
then
82 print *,
'ERROR : interpolation information'
89 call mipcsz(fid,name1,it,
size,cret)
90 print *,
'memory size',cret
91 if (cret .ne. 0 )
then
92 print *,
'ERROR : memory size'
97 if (
size .ne. size1)
then
98 print *,
'ERROR : memory size size'
104 if (
size .ne. size2)
then
105 print *,
'ERROR : allocation size'
111 if (
size .ne. size3)
then
112 print *,
'ERROR : allocation size'
117 call mipbfr(fid,name1,it,ncoef,power,coef,cret)
118 print *,
'read function',cret
119 if (cret .ne. 0 )
then
120 print *,
'ERROR : read function'
125 if ( (ncoef .ne. ncoef1) .or.
126 & (power(1) .ne. power1(1)) .or.
127 & (power(2) .ne. power1(2)) .or.
128 & (power(3) .ne. power1(3)) .or.
129 & (power(4) .ne. power1(4)) .or.
130 & (power(5) .ne. power1(5)) .or.
131 & (power(6) .ne. power1(6)) .or.
132 & (coef(1) .ne. coef1(1)) .or.
133 & (coef(2) .ne. coef1(2)) .or.
134 & (coef(3) .ne. coef1(3)) )
then
135 print *,
'ERROR : read function'
141 if ( (ncoef .ne. ncoef2) .or.
142 & (power(1) .ne. power2(1)) .or.
143 & (power(2) .ne. power2(2)) .or.
144 & (coef(1) .ne. coef2(1)) )
then
145 print *,
'ERROR : read function'
151 if ( (ncoef .ne. ncoef3) .or.
152 & (power(1) .ne. power3(1)) .or.
153 & (power(2) .ne. power3(2)) .or.
154 & (coef(1) .ne. coef3(1)) )
then
155 print *,
'ERROR : read function'
164 print *,
'Close file',cret
165 if (cret .ne. 0 )
then
166 print *,
'ERROR : close file'
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.
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 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)