#include <med.h>
#define MESGERR 1
#include <med_utils.h>
#include <string.h>
int main (
int argc,
char **argv) {
const med_float tempvalue[3*1*4] = { 1.1, 2.2, 3.3, 4.4,
5.5, 6.6, 7.7, 8.8,
9.9, 10.1,11.11, 12.12};
const char localization[
MED_NAME_SIZE+1] =
"BEAM_INTEGRATION_POINTS";
const char localization2[
MED_NAME_SIZE+1] =
"BEAM_INTEGRATION_TRANSF";
const med_float elementcoordinate[3*3] = { 0.0,0.0,0.0,
0.0,0.0,0.0,
0.0,0.0,0.0,};
const med_float ipointcoordinate[3*3] = { 0.0,0.0,2.5,
0.0,0.0,3.5,
0.0,0.0,4.5};
const med_float weight[4] = {1.0/4, 1.0/4, 1.0/4, 1.0/4};
const med_int const power1_1[] = {0,0,1,0,0,1};
const med_float const coefficient1_1[] = {1,-1,-1};
const med_int const power1_2[] = {1,0};
const med_float const coefficient1_2[] = {1};
const med_int const power1_3[] = {0,1};
const med_float const coefficient1_3[] = {1};
int ret=-1;
if (fid < 0) {
MESSAGE(
"ERROR : file creation ...");
goto ERROR;
}
MESSAGE(
"ERROR : file mounting ...");
goto ERROR;
}
MESSAGE(
"ERROR : file mounting ...");
goto ERROR;
}
if (
MEDlinkWr(fid,meshname,
"./UsesCase_MEDstructElement_1.med") < 0) {
MESSAGE(
"ERROR : create mesh link ...");
goto ERROR;
}
MESSAGE(
"ERROR : interpolation family creation ...");
goto ERROR;
}
MESSAGE(
"ERROR : first base function creation ...");
goto ERROR;
}
MESSAGE(
"ERROR : second base function creation ...");
goto ERROR;
}
MESSAGE(
"ERROR : third base function creation ...");
goto ERROR;
}
nipoint, ipointcoordinate, weight,
MESSAGE(
"ERROR : create famlily of integration points ...");
goto ERROR;
}
nipoint, ipointcoordinate, weight,
interpname, beamsectionname) < 0) {
MESSAGE(
"ERROR : create famlily of integration points ...");
goto ERROR;
}
ncomponent, componentname, componentunit,
"ms", meshname) < 0) {
goto ERROR;
}
nbeam, (unsigned char*) tempvalue) < 0) {
MESSAGE(
"ERROR : write field values on MED_BEAM ");
goto ERROR;
}
nbeam, (unsigned char*) tempvalue) < 0) {
MESSAGE(
"ERROR : write field values on MED_BEAM ");
goto ERROR;
}
MESSAGE(
"ERROR : file unmounting ...");
goto ERROR;
}
MESSAGE(
"ERROR : file unmounting ...");
goto ERROR;
}
ret=0;
ERROR:
ret=-1;
}
return ret;
}
int main(int argc, char **argv)
#define MED_NO_INTERPOLATION
#define MED_ALL_CONSTITUENT
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.
MEDC_EXPORT med_err MEDfieldValueWithProfileWr(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_storage_mode storagemode, const char *const profilename, const char *const localizationname, 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...
MEDC_EXPORT med_err MEDfileClose(med_idt fid)
Fermeture d'un fichier MED.
MEDC_EXPORT med_idt MEDfileObjectsMount(const med_idt fid, const char *const filename, const med_class medclass)
Cette routine permet de monter dans le fichier courant un type de données (exemples les maillages,...
MEDC_EXPORT med_err MEDfileObjectsUnmount(const med_idt fid, const med_idt mid, const med_class medclass)
Une fois le démontage effectué, les données précédemment montées ne sont plus accessibles.
MEDC_EXPORT med_idt MEDfileOpen(const char *const filename, const med_access_mode accessmode)
Ouverture d'un fichier MED.
MEDC_EXPORT med_err MEDinterpBaseFunctionWr(const med_idt fid, const char *const interpname, const med_int basisfuncit, const med_int ncoef, const med_int *const power, const med_float *const coefficient)
Cette routine permet l'écriture d'une fonction de base/forme de l'interpolation interpname.
MEDC_EXPORT med_err MEDinterpCr(const med_idt fid, const char *const interpname, const med_geometry_type geotype, const med_bool cellnodes, const med_int nvariable, const med_int maxdegree, const med_int nmaxcoef)
Cette routine permet de créer une nouvelle fonction d'interpolation polynômiale nommée interpname.
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 MEDlocalizationWr(const med_idt fid, const char *const localizationname, const med_geometry_type geotype, const med_int spacedimension, const med_float *const elementcoordinate, const med_switch_mode switchmode, const med_int nipoint, const med_float *const ipointcoordinate, const med_float *const weight, const char *const geointerpname, const char *const ipointstructmeshname)
Cette routine permet l'écriture d'une localisation localizationname de points d'intégration dans/auto...
MEDC_EXPORT med_geometry_type MEDstructElementGeotype(const med_idt fid, const char *const modelname)
Cette routine renvoie le type géométrique mgeotype associé au modèle d'éléments de structure de nom m...