# Unittest_MEDinterp_1.f

Aller à la documentation de ce fichier.

    00001 C*  This file is part of MED.
    00002 C*
    00003 C*  COPYRIGHT (C) 1999 - 2012  EDF R&D, CEA/DEN
    00004 C*  MED is free software: you can redistribute it and/or modify
    00005 C*  it under the terms of the GNU Lesser General Public License as published by
    00006 C*  the Free Software Foundation, either version 3 of the License, or
    00007 C*  (at your option) any later version.
    00008 C*
    00009 C*  MED is distributed in the hope that it will be useful,
    00010 C*  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011 C*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012 C*  GNU Lesser General Public License for more details.
    00013 C*
    00014 C*  You should have received a copy of the GNU Lesser General Public License
    00015 C*  along with MED.  If not, see <http://www.gnu.org/licenses/>.
    00016 C*
    00017
    00018 C******************************************************************************
    00019 C * Tests for interp module
    00020 C *
    00021 C *****************************************************************************
    00022       program MEDinterp1
    00023 C
    00024       implicit none
    00025       include 'med.hf'
    00026 C
    00027 C
    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 C
    00051 C
    00052 C     file creation
    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 C
    00060 C
    00061 C     interpolation function family creation
    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 C
    00070 C
    00071 C     functions creation
    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 c
    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 c
    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 C
    00093 C
    00094 C     close file
    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 C
    00102 C
    00103 C
    00104       end
    00105