#define MESGERR 1
#include <string.h>
int main (
int argc,
char **argv) {
const med_float cooXaxis[5] = {1.,2.,3.,4.,5.};
const char cellsnames[8*
MED_SNAME_SIZE+1] =
"CELL_1 CELL_2 CELL_3 CELL_4 CELL_5 CELL_6 CELL_7 CELL_8 ";
const char familyname [
MED_NAME_SIZE+1] =
"CART_GRID_QUAD_FAMILY";
const med_int familynumbers[8] = { -1, -1, -1, -1, -1, -1, -1, -1 };
int ret=-1;
if (fid < 0) {
MESSAGE(
"ERROR : file creation ...");
goto ERROR;
}
MESSAGE(
"ERROR : mesh creation ...");
goto ERROR;
}
MESSAGE(
"ERROR : write grid type ...");
goto ERROR;
}
axis = 1;
size = 5;
axis, size, cooXaxis) < 0) {
MESSAGE(
"ERROR : write of axis X coordinates ...");
goto ERROR;
}
axis++;
size = 3;
axis, size, cooYaxis) < 0) {
MESSAGE(
"ERROR : write of axis Y coordinates ...");
goto ERROR;
}
MESSAGE(
"ERROR : cells names ...");
goto ERROR;
}
MESSAGE(
"ERROR : family 0 creation ...");
goto ERROR;
}
if (
MEDfamilyCr(fid, meshname,familyname, 1, -1, groupname) < 0) {
MESSAGE(
"ERROR : family creation ...");
goto ERROR;
}
MESSAGE(
"ERROR : nodes family numbers ...");
goto ERROR;
}
ret = 0;
ERROR:
ret = -1;
}
return ret;
}
MEDC_EXPORT med_err MEDmeshEntityFamilyNumberWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_entity_type entitype, const med_geometry_type geotype, const med_int nentity, const med_int *const number)
Cette routine permet l'écriture des numéros de famille d'un type d'entité d'un maillage.
MEDC_EXPORT med_err MEDmeshGridIndexCoordinateWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_float dt, const med_int axis, const med_int indexsize, const med_float *const gridindex)
Cette routine permet l'écriture des coordonnées des noeuds d'un maillage structuré selon un axe du re...
MEDC_EXPORT med_err MEDfileClose(med_idt fid)
Fermeture d'un fichier MED.
MEDC_EXPORT med_err MEDfamilyCr(const med_idt fid, const char *const meshname, const char *const familyname, const med_int familynumber, const med_int ngroup, const char *const groupname)
Cette routine permet la création d'une famille portant sur les entités d'un maillage.
MEDC_EXPORT med_err MEDmeshCr(const med_idt fid, const char *const meshname, const med_int spacedim, const med_int meshdim, const med_mesh_type meshtype, const char *const description, const char *const dtunit, const med_sorting_type sortingtype, const med_axis_type axistype, const char *const axisname, const char *const axisunit)
Cette routine permet de créer un maillage dans un fichier.
MEDC_EXPORT med_err MEDmeshEntityNameWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_entity_type entitype, const med_geometry_type geotype, const med_int nentity, const char *const name)
Cette routine permet d'écrire les noms d'un type d'entité d'un maillage.
MEDC_EXPORT med_err MEDmeshGridTypeWr(const med_idt fid, const char *const meshname, const med_grid_type gridtype)
Cette routine permet de définir le type d'un maillage structuré (MED_STRUCTURED_MESH).
MEDC_EXPORT med_idt MEDfileOpen(const char *const filename, const med_access_mode accessmode)
Ouverture d'un fichier MED.
int main(int argc, char **argv)