2.3.6/test23.f

Aller à la documentation de ce fichier.
00001 C*  This file is part of MED.
00002 C*
00003 C*  COPYRIGHT (C) 1999 - 2015  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       * - Nom du fichier : test23.f
00020 C       *
00021 C       * - Description : ecriture de mailles MED_POLYGONE dans un maillage MED
00022 C       *
00023 C       ******************************************************************************
00024         program test23
00025 C       
00026         implicit none
00027         include 'med.hf'
00028 C       
00029         integer cret, fid,mdim
00030         parameter  (mdim = 3)
00031         character*32 maa        
00032         integer ni, n
00033         parameter (ni=4, n=3)
00034         integer index(ni)
00035         character*16 nom(n)
00036         integer num(n),fam(n)
00037         integer con(16)
00038 C
00039         data con  / 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 /    
00040         data nom  / "poly1", "poly2", "poly3"/ 
00041         data num  / 1,2,3 /, fam /0,-1,-2/
00042         data index /1,6,12,17/
00043         data maa /"maa1"/
00044 
00045 C       ** Creation du fichier test23.med                   **
00046         call efouvr(fid,'test23.med',MED_LECTURE_ECRITURE, cret)
00047         print *,cret
00048         if (cret .ne. 0 ) then
00049            print *,'Erreur creation du fichier'
00050            call efexit(-1)
00051         endif      
00052         print *,'Creation du fichier test23.med'
00053 
00054 C       ** Creation du maillage          **
00055         call efmaac(fid,maa,mdim,MED_NON_STRUCTURE,
00056      &                 'un maillage pour test23',cret)
00057         print *,cret
00058         if (cret .ne. 0 ) then
00059            print *,'Erreur creation du maillage'
00060            call efexit(-1)
00061         endif      
00062         print *,'Creation du maillage'
00063 
00064 C       ** Ecriture de la connectivite des mailles polygones **
00065         call efpgce(fid,maa,index,ni,con,MED_MAILLE,MED_NOD,cret) 
00066         if (cret .ne. 0 ) then
00067            print *,'Erreur ecriture des connectivite polygones'
00068            call efexit(-1)
00069         endif      
00070         print *,cret
00071         print *,
00072 'Ecriture des connectivites des mailles de type     & MED_POLYGONE'
00073 
00074 C       ** Ecriture des noms des mailles polygones          **
00075         call efnome(fid,maa,nom,n,MED_MAILLE,MED_POLYGONE,
00076      &                 cret)
00077         print *,cret
00078         if (cret .ne. 0 ) then
00079            print *,'Erreur ecriture des noms polygones'
00080            call efexit(-1)
00081         endif      
00082         print *,'Ecriture des noms des polygones'
00083 
00084 C       ** Ecriture des numeros des mailles polygones **
00085         call efnume(fid,maa,num,n,MED_MAILLE,MED_POLYGONE,
00086      &                 cret)
00087         if (cret .ne. 0 ) then
00088            print *,'Erreur ecriture des numeros polygones'
00089            call efexit(-1)
00090         endif      
00091         print *,cret
00092         print *,'Ecriture des numeros des polygones'
00093 
00094 C       ** Ecriture des numeros des familles des segments  **
00095         call effame(fid,maa,fam,n,
00096      &              MED_MAILLE,MED_POLYGONE,cret)
00097         if (cret .ne. 0 ) then
00098            print *,'Erreur ecriture des numeros de famille polygones'
00099            call efexit(-1)
00100         endif      
00101         print *,cret
00102         print *,'Ecriture des numeros de familles des polygones'
00103 
00104 C       ** Fermeture du fichier                            **
00105         call efferm (fid,cret)
00106         print *,cret
00107         if (cret .ne. 0 ) then
00108            print *,'Erreur fermeture du fichier'
00109            call efexit(-1)
00110         endif      
00111         print *,'Fermeture du fichier'
00112 C     
00113         end

Généré le Thu Oct 8 14:26:17 2015 pour MED fichier par  doxygen 1.6.1