# Unittest_MEDlocalization_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 localization module
    00020 C *
    00021 C *****************************************************************************
    00022       program MEDloc1
    00023 C
    00024       implicit none
    00025       include 'med.hf'
    00026 C
    00027 C
    00028       integer cret
    00029       integer fid
    00030       character*64 fname,lname,giname,isname
    00031       parameter (fname = "Unittest_MEDlocalization_1.med")
    00032       parameter (lname = "Localization name")
    00033       parameter (giname=MED_NO_INTERPOLATION)
    00034       parameter (isname=MED_NO_MESH_SUPPORT)
    00035       integer gtype,sdim,nip
    00036       parameter(gtype=MED_TRIA3)
    00037       parameter(sdim=2)
    00038       parameter(nip=3)
    00039       real*8 ecoo(6), ipcoo(6), wght(3)
    00040       data ecoo   / 0.0, 0.0,  1.0, 0.0,  0.0,1.0 /
    00041       data ipcoo  / 0.166666, 0.166666,  0.66666, 0.166666,
    00042      &              0.166666, 0.666666 /
    00043       data wght / 0.166666, 0.166666, 0.166666 /
    00044 C
    00045 C
    00046 C     file creation
    00047       call mfiope(fid,fname,MED_ACC_CREAT,cret)
    00048       print *,'Open file',cret
    00049       if (cret .ne. 0 ) then
    00050          print *,'ERROR : file creation'
    00051          call efexit(-1)
    00052       endif
    00053 C
    00054 C
    00055 C     localization creation
    00056       call mlclow(fid,lname,gtype,sdim,ecoo,MED_FULL_INTERLACE,
    00057      &            nip,ipcoo, wght, giname, isname, cret)
    00058       print *,'localization creation',cret
    00059       if (cret .ne. 0 ) then
    00060          print *,'ERROR : localization creation'
    00061          call efexit(-1)
    00062       endif
    00063 C
    00064 C
    00065 C     close file
    00066       call mficlo(fid,cret)
    00067       print *,'Close file',cret
    00068       if (cret .ne. 0 ) then
    00069          print *,'ERROR :  close file'
    00070          call efexit(-1)
    00071       endif
    00072 C
    00073 C
    00074 C
    00075       end
    00076