30 int main (
int argc,
char **argv) {
32 const char meshname[
MED_NAME_SIZE+1] =
"2D unstructured mesh";
39 const med_float tria3values_step1[8] = {1000., 2000., 3000., 4000.,
40 5000., 6000., 7000., 8000.};
41 const med_float quad4values_step1[4] = {10000., 20000., 30000., 4000.};
42 const med_float tria3values_step2[8] = {1500., 2500., 3500., 4500.,
43 5500., 6500., 7500., 8500.};
44 const med_float quad4values_step2[4] = {15000., 25000., 35000., 45000.};
50 MESSAGE(
"ERROR : file creation ...");
55 if (
MEDlinkWr(fid,meshname,
"./UsesCase_MEDmesh_1.med") < 0) {
56 MESSAGE(
"ERROR : create mesh link ...");
65 ncomponent, componentname, componentunit,
"ms", meshname) < 0) {
66 MESSAGE(
"ERROR : create field");
79 MESSAGE(
"ERROR : write field values on MED_TRIA3");
85 MESSAGE(
"ERROR : write field values on MED_QUAD4 ");
93 MESSAGE(
"ERROR : write field values on MED_TRIA3");
100 MESSAGE(
"ERROR : write field values on MED_QUAD4 ");
107 MESSAGE(
"ERROR : write field mesh computation step error ");
116 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 MEDfieldCr(const med_idt fid, const char *const fieldname, const med_field_type fieldtype, const med_int ncomponent, const char *const componentname, const char *const componentunit, const char *const dtunit, const char *const meshname)
Cette fonction crée un champ dans un fichier.
#define MED_ALL_CONSTITUENT
MEDC_EXPORT med_err MEDfieldComputingStepMeshWr(const med_idt fid, const char *const fieldname, const med_int numdt, const med_int numit, const med_int meshnumdt, const med_int meshnumit)
Cette fonction permet de définir l'étape de calcul ( meshnumdit , meshnumit ) à utiliser pour le mail...
MEDC_EXPORT med_err MEDfileClose(med_idt fid)
Fermeture d'un fichier MED.
int main(int argc, char **argv)
MEDC_EXPORT med_err MEDlinkWr(const med_idt fid, const char *const meshname, const char *const link)
Cette routine permet d'écrire un lien dans un fichier MED.
MEDC_EXPORT med_err MEDfieldValueWr(const med_idt fid, const char *const fieldname, const med_int numdt, const med_int numit, const med_float dt, const med_entity_type entitype, const med_geometry_type geotype, const med_switch_mode switchmode, const med_int componentselect, const med_int nentity, const unsigned char *const value)
Cette fonction permet d'écrire les valeurs d'un champ définies sur des entités d'un maillage pour une...