# test29.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
    00019 C ******************************************************************************
    00020 C * - Nom du fichier : test29.f
    00021 C *
    00022 C * - Description : ecriture d'un joint dans un maillage MED
    00023 C *
    00024 C ******************************************************************************
    00025         program test29
    00026 C
    00027         implicit none
    00028         include 'med.hf'
    00029 C
    00030 C
    00031         integer cret,fid, domdst
    00032         character*64 maa , jnt, maadst
    00033         character*200 des
    00034         integer mdim ,ncor
    00035         integer cor(6)
    00036         character*16 nomcoo(2)
    00037         character*16 unicoo(2)
    00038         data  nomcoo /"x","y"/, unicoo /"cm","cm"/
    00039
    00040         parameter (maa ="maa1",maadst="maa2", domdst=2,
    00041      &     mdim = 2,ncor = 3 )
    00042         data cor /1,2,3,4,5,6/, jnt / "joint"/
    00043         data des / "joint avec le sous-domaine 2" /
    00044
    00045
    00046
    00047 C  ** Creation du fichier test29.med **
    00048         call mfiope(fid,'test29.med',MED_ACC_RDWR,cret)
    00049         print *,cret
    00050         if (cret .ne. 0 ) then
    00051            print *,'Erreur creation du fichier'
    00052            call efexit(-1)
    00053         endif
    00054
    00055
    00056 C  ** Creation du maillage **
    00057         call mmhcre(fid,maa,mdim,mdim,
    00058      &              MED_UNSTRUCTURED_MESH,'Un maillage pour test29',
    00059      &              "",MED_SORT_DTIT,MED_CARTESIAN,nomcoo,unicoo,cret)
    00060         print *,cret
    00061         if (cret .ne. 0 ) then
    00062            print *,'Erreur creation du maillage'
    00063            call efexit(-1)
    00064         endif
    00065
    00066 C ** Creation du joint **
    00067         call msdjcr(fid,maa,jnt,des,domdst,maadst,cret)
    00068         print *,cret
    00069         if (cret .ne. 0 ) then
    00070            print *,'Erreur creation joint'
    00071            call efexit(-1)
    00072         endif
    00073
    00074
    00075 C ** Ecriture de la correspondance Noeud, Noeud **
    00076         call msdcrw(fid,maa,jnt,MED_NO_DT,MED_NO_IT,
    00077      &              MED_NODE,MED_NONE,MED_NODE,MED_NONE,
    00078      &              ncor,cor,cret)
    00079         print *,cret
    00080         if (cret .ne. 0 ) then
    00081            print *,'Erreur ecriture correspondance (Noeud,Noeud)'
    00082            call efexit(-1)
    00083         endif
    00084
    00085
    00086 C ** Ecriture de la correspondance Noeud, TRIA3 **
    00087         call msdcrw(fid,maa,jnt,MED_NO_DT,MED_NO_IT,
    00088      &              MED_NODE,MED_NONE,MED_CELL,MED_TRIA3,
    00089      &              ncor,cor,cret)
    00090         print *,cret
    00091         if (cret .ne. 0 ) then
    00092            print *,'Erreur ecriture correspondance (Noeud,Tria3)'
    00093            call efexit(-1)
    00094         endif
    00095
    00096 C ** Fermeture du fichier                                **
    00097         call mficlo(fid,cret)
    00098         print *,cret
    00099         if (cret .ne. 0 ) then
    00100            print *,'Erreur fermeture du fichier'
    00101            call efexit(-1)
    00102         endif
    00103 C
    00104         end