30 int main (
int argc,
char **argv) {
32 const char meshname[
MED_NAME_SIZE+1] =
"2D unstructured mesh";
38 const med_float coordinates[30] = { 2.,1., 7.,1., 12.,1., 17.,1., 22.,1.,
39 2.,6., 7.,6., 12.,6., 17.,6., 22.,6.,
40 2.,11., 7.,11., 12.,11., 17.,11., 22.,11.};
42 const med_int triaconnectivity[24] = { 1,7,6, 2,7,1, 3,7,2, 8,7,3,
43 13,7,8, 12,7,13, 11,7,12, 6,7,11 };
45 const med_int quadconnectivity[16] = {3,4,9,8, 4,5,10,9,
46 15,14,9,10, 13,8,9,14};
53 MESSAGE(
"ERROR : file creation ...");
58 if (
MEDfileCommentWr(fid,
"A 2D unstructured mesh : 15 nodes, 12 cells") < 0) {
59 MESSAGE(
"ERROR : write file description ...");
66 MESSAGE(
"ERROR : mesh creation ...");
75 MESSAGE(
"ERROR : nodes coordinates ...");
82 MESSAGE(
"ERROR : triangular cells connectivity ...");
87 MESSAGE(
"ERROR : quadrangular cells connectivity ...");
93 MESSAGE(
"ERROR : family 0 creation ...");
102 MESSAGE(
"ERROR : close file ...");
int main(int argc, char **argv)
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 MEDfileCommentWr(const med_idt fid, const char *const comment)
Ecriture d'un descripteur dans un fichier MED.
MEDC_EXPORT med_err MEDfileClose(med_idt fid)
Fermeture d'un fichier MED.
MEDC_EXPORT med_idt MEDfileOpen(const char *const filename, const med_access_mode accessmode)
Ouverture d'un fichier MED.
MEDC_EXPORT med_err MEDmeshElementConnectivityWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_float dt, const med_entity_type entitype, const med_geometry_type geotype, const med_connectivity_mode cmode, const med_switch_mode switchmode, const med_int nentity, const med_int *const connectivity)
Cette routine permet d'écrire dans un maillage le tableau des connectivités pour un type géométrique ...
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 MEDmeshNodeCoordinateWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_float dt, const med_switch_mode switchmode, const med_int nentity, const med_float *const coordinates)
Cette routine permet d'écrire dans un maillage le tableau des coordonnées des noeuds,...