MEDmeshNodeWr.c

Aller à la documentation de ce fichier.
00001 /*  This file is part of MED.
00002  *
00003  *  COPYRIGHT (C) 1999 - 2015  EDF R&D, CEA/DEN
00004  *  MED is free software: you can redistribute it and/or modify
00005  *  it under the terms of the GNU Lesser General Public License as published by
00006  *  the Free Software Foundation, either version 3 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  MED is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU Lesser General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Lesser General Public License
00015  *  along with MED.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 
00019 #include <med.h>
00020 #include <med_config.h>
00021 #include <med_outils.h>
00022 #include <string.h>
00023 #include <stdlib.h>
00024 
00045 med_err MEDmeshNodeWr(const med_idt                  fid,
00046                       const char            * const  meshname,
00047                       const med_int                  numdt,
00048                       const med_int                  numit,
00049                       const med_float                dt,
00050                       const med_switch_mode          switchmode,
00051                       const med_int                  nentity,
00052                       const med_float       * const  coordinate,
00053                       const med_bool                 withnodename,
00054                       const char            * const  nodename,
00055                       const med_bool                 withnodenumber,
00056                       const med_int         * const  nodenumber,
00057                       const med_bool                 withfamnumber,
00058                       const med_int         * const  famnumber) {
00059 
00060   med_err           _ret       = -1;
00061   med_entity_type   _entitype  = MED_NODE;
00062   med_geometry_type _geotype   = MED_NONE;
00063 
00064   if ( (_ret = MEDmeshNodeCoordinateWr(fid,
00065                                        meshname,
00066                                        numdt,
00067                                        numit,
00068                                        dt,
00069                                        switchmode,
00070                                        nentity,
00071                                        coordinate) ) < 0 ) {
00072     MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDmeshNodeCoordinateWr");
00073     goto ERROR;
00074   }
00075 
00076   if ( withnodename )
00077     if ( (_ret =  MEDmeshEntityNameWr(fid,
00078                                       meshname,
00079                                       numdt,
00080                                       numit,
00081                                       _entitype,
00082                                       _geotype,
00083                                       nentity,
00084                                       nodename) ) < 0 ) {
00085       MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDmeshEntityNameWr");
00086       goto ERROR;
00087     }
00088 
00089   if ( withnodenumber )
00090     if ( (_ret =  MEDmeshEntityNumberWr(fid,
00091                                         meshname,
00092                                         numdt,
00093                                         numit,
00094                                         _entitype,
00095                                         _geotype,
00096                                         nentity,
00097                                         nodenumber) ) < 0 ) {
00098       MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDmeshEntityNumberWr");
00099       goto ERROR;
00100     }
00101 
00102   if (withfamnumber)
00103     if ( (_ret =  MEDmeshEntityFamilyNumberWr(fid,
00104                                               meshname,
00105                                               numdt,
00106                                               numit,
00107                                               _entitype,
00108                                               _geotype,
00109                                               nentity,
00110                                               famnumber) ) < 0 ) {
00111       MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,"MEDmeshEntityFamilyNumberWr");
00112       goto ERROR;
00113     }
00114 
00115   _ret = 0;
00116  ERROR:
00117   return _ret;
00118 }

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