Aller à la documentation de ce fichier.
28 int main (
int argc,
char **argv) {
30 const char meshname[
MED_NAME_SIZE+1] =
"2D unstructured mesh";
43 med_int *triaconnectivity = NULL;
45 med_int *quadconnectivity = NULL;
55 MESSAGE(
"ERROR : open file in READ ONLY ACCESS mode ...");
65 if (
MEDmeshInfoByName(fid, meshname, &spacedim, &meshdim, &meshtype, meshdescription,
66 dtunit, &sortingtype, &nstep, &axistype, axisname, unitname) < 0) {
67 MESSAGE(
"ERROR : mesh info ...");
74 &geotransformation)) < 0) {
75 MESSAGE(
"ERROR : number of nodes ...");
87 &geotransformation)) < 0) {
88 MESSAGE(
"ERROR : number of MED_TRIA3 ...");
95 &geotransformation)) < 0) {
96 MESSAGE(
"ERROR : number of MED_QUAD4 ...");
103 MESSAGE(
"ERROR : memory allocation ...");
109 MESSAGE(
"ERROR : nodes coordinates ...");
114 if ((triaconnectivity = (
med_int *) malloc(
sizeof(
med_int)*ntria3*3)) == NULL) {
115 MESSAGE(
"ERROR : memory allocation ...");
120 MESSAGE(
"ERROR : MED_TRIA3 connectivity ...");
124 if ((quadconnectivity = (
med_int *) malloc(
sizeof(
med_int)*nquad4*4)) == NULL) {
125 MESSAGE(
"ERROR : memory allocation ...");
130 MESSAGE(
"ERROR : MED_QUAD4 connectivity ...");
144 if (triaconnectivity)
145 free(triaconnectivity);
147 if (quadconnectivity)
148 free(quadconnectivity);
MEDC_EXPORT med_int MEDmeshnEntity(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_data_type datatype, const med_connectivity_mode cmode, med_bool *const changement, med_bool *const transformation)
Cette routine permet de lire le nombre d'entités dans un maillage pour une étape de calcul donnée.
MEDC_EXPORT med_idt MEDfileOpen(const char *const filename, const med_access_mode accessmode)
Ouverture d'un fichier MED.
MEDC_EXPORT med_err MEDmeshElementConnectivityRd(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_connectivity_mode cmode, const med_switch_mode switchmode, med_int *const connectivity)
Cette routine permet de lire dans un maillage le tableau des connectivités pour un type géométrique d...
MEDC_EXPORT med_err MEDmeshNodeCoordinateRd(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_switch_mode switchmode, med_float *const coordinates)
Cette routine permet de lire dans un maillage le tableau des coordonnées des noeuds,...
MEDC_EXPORT med_err MEDfileClose(med_idt fid)
Fermeture d'un fichier MED.
MEDC_EXPORT med_err MEDmeshInfoByName(const med_idt fid, const char *const meshname, med_int *const spacedim, med_int *const meshdim, med_mesh_type *const meshtype, char *const description, char *const dtunit, med_sorting_type *const sortingtype, med_int *const nstep, med_axis_type *const axistype, char *const axisname, char *const axisunit)
Cette routine permet de lire les informations relatives à un maillage en précisant son nom.
int main(int argc, char **argv)