00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022       program MEDinterp1
00023 
00024       implicit none
00025       include 'med.hf'
00026 
00027 
00028       integer cret
00029       integer fid
00030       character*64 fname
00031       parameter (fname = "Unittest_MEDinterp_1.med")
00032       character *64 name1
00033       parameter (name1="Interpolation family name")
00034       integer gtype1
00035       parameter (gtype1=MED_TRIA3)
00036       integer cnode1
00037       parameter (cnode1=MED_FALSE)
00038       integer nvar1,maxd1,nmaxc1
00039       parameter (nvar1=2,maxd1=1,nmaxc1=3)
00040       integer ncoef1,ncoef2,ncoef3
00041       parameter (ncoef1=3,ncoef2=1,ncoef3=1)
00042       integer power1(6),power2(2),power3(2)
00043       data power1 / 0,0, 1,0, 0,1 /
00044       data power2 / 1,0 /
00045       data power3 / 0,1 /
00046       real*8 coef1(3), coef2(1), coef3(1)
00047       data coef1 / 1., -1., -1. /
00048       data coef2 / 1. /
00049       data coef3 / 1. /
00050 
00051 
00052 
00053       call mfiope(fid,fname,MED_ACC_CREAT,cret)
00054       print *,'Open file',cret
00055       if (cret .ne. 0 ) then
00056          print *,'ERROR : file creation'
00057          call efexit(-1)
00058       endif 
00059 
00060 
00061 
00062       call mipcre(fid,name1,gtype1,cnode1,nvar1,
00063      &            maxd1,nmaxc1,cret)
00064       print *,'interpolation creation',cret
00065       if (cret .ne. 0 ) then
00066          print *,'ERROR : interpolation creation'
00067          call efexit(-1)
00068       endif 
00069 
00070 
00071 
00072       call mipbfw(fid,name1,1,ncoef1,power1,coef1,cret)
00073       print *,'function creation',cret
00074       if (cret .ne. 0 ) then
00075          print *,'ERROR : function creation'
00076          call efexit(-1)
00077       endif 
00078 
00079       call mipbfw(fid,name1,2,ncoef2,power2,coef2,cret)
00080       print *,'function creation',cret
00081       if (cret .ne. 0 ) then
00082          print *,'ERROR : function creation'
00083          call efexit(-1)
00084       endif 
00085 
00086       call mipbfw(fid,name1,3,ncoef3,power3,coef3,cret)
00087       print *,'function creation',cret
00088       if (cret .ne. 0 ) then
00089          print *,'ERROR : function creation'
00090          call efexit(-1)
00091       endif 
00092 
00093 
00094 
00095       call mficlo(fid,cret)
00096       print *,'Close file',cret
00097       if (cret .ne. 0 ) then
00098          print *,'ERROR :  close file'
00099          call efexit(-1)
00100       endif  
00101 
00102 
00103 
00104       end
00105