31 int main (
int argc,
char **argv) {
33 const char meshname[
MED_NAME_SIZE+1] =
"2D unstructured mesh";
38 const med_float initial_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};
49 const med_float tansfMatrix_step1 [7] = { 0.0, 0.0, 0.0, 0.92388, 0.0, 0.38268, 0.0 };
51 const med_float tansfMatrix_step2 [7] = { 0.0, 0.0, 0.0, 0.707, 0.0, 0.707, 0.0 };
57 MESSAGE(
"ERROR : file creation ...");
62 if (
MEDfileCommentWr(fid,
"A 2D unstructured mesh : 15 nodes, 12 cells") < 0) {
63 MESSAGE(
"ERROR : write file description ...");
70 MESSAGE(
"ERROR : mesh creation ...");
80 nnodes, initial_coordinates) < 0) {
81 MESSAGE(
"ERROR : nodes coordinates ...");
90 ntria3, triaconnectivity) < 0) {
91 MESSAGE(
"ERROR : triangular cells connectivity ...");
99 nquad4, quadconnectivity) < 0) {
100 MESSAGE(
"ERROR : quadrangular cells connectivity ...");
110 MESSAGE(
"Erreur a l'ecriture de la transformation géométrique n°1");
116 MESSAGE(
"Erreur a l'ecriture de la transformation géométrique n°2");
122 MESSAGE(
"ERROR : create family ...");
131 MESSAGE(
"ERROR : close file ...");
MEDC_EXPORT med_idt MEDfileOpen(const char *const filename, const med_access_mode accessmode)
Ouverture d'un fichier MED.
MEDC_EXPORT med_err MEDmeshNodeCoordinateTrsfWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_float dt, const med_float *const coordinatetrsf)
Cette routine définit les paramètres de translation rotation à appliquer aux noeuds de la séquence de...
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.
#define MED_ALL_CONSTITUENT
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 MEDmeshElementConnectivityWithProfileWr(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_storage_mode storagemode, const char *const profilename, const med_switch_mode switchmode, const med_int dimselect, 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 MEDfileClose(med_idt fid)
Fermeture d'un fichier MED.
MEDC_EXPORT med_err MEDmeshNodeCoordinateWithProfileWr(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_float dt, const med_storage_mode storagemode, const char *const profilename, const med_switch_mode switchmode, const med_int dimselect, const med_int nentity, const med_float *const coordinates)
Cette routine permet d'écrire dans un maillage le tableau des coordonnées des noeuds, selon une séquence de calcul donnée et un profil donnés.
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.
int main(int argc, char **argv)