44#include <sys/resource.h>
56#include "h3dpublic_defs.h"
57#include "h3dpublic_export.h"
59#include "h3d_values.h"
145 FILE* errorFile = (FILE*)
h3d_file->client_data1;
148 fopen_s(&errorFile,
"export_error_messages",
"a");
150 errorFile = fopen(
"export_error_messages",
"a");
152 h3d_file->client_data1 = (
void*)errorFile;
155 fprintf(errorFile,
"%s\n", error);
228 cname_len = *size + 1;
229 cname=(
char*) malloc(
sizeof(
char)*cname_len);
230 for(i=0;i<*size;i++) cname[i] = name[i];
237 h3d_file -> quantize_error = *percentage_error / 100.f ;
238 h3d_file -> compression_level = *comp_level ;
241 char* creating_application;
242 creating_application=(
char*) malloc(
sizeof(
char)*(*LEN_RADVERS+1));
244 strncpy_s(creating_application, *LEN_RADVERS+1, RADVERS, *LEN_RADVERS);
246 strncpy(creating_application, RADVERS, *LEN_RADVERS);
248 creating_application[*LEN_RADVERS] =
'\0';
251 solver_name=(
char*) malloc(
sizeof(
char)*(*LEN_RADVERS+1));
253 strncpy_s(solver_name, *LEN_RADVERS+1 , RADVERS, *LEN_RADVERS);
255 strncpy(solver_name, RADVERS, *LEN_RADVERS);
257 solver_name[*LEN_RADVERS] =
'\0';
259 char file_creation_date[] = __DATE__;
260 char original_data_file[] =
" ";
261 char original_result_file[] =
" ";
263 char file_comment[100];
264 sprintf(file_comment,
"UNIT MASS=%g LENGTH=%g TIME=%g", *FAC_M,*FAC_L,*FAC_T);
315{
c_h3d_open_file_ (name,size,percentage_error,comp_level,RADVERS,LEN_RADVERS,FAC_M,FAC_L,FAC_T);}
319{
c_h3d_open_file_ (name,size,percentage_error,comp_level,RADVERS,LEN_RADVERS,FAC_M,FAC_L,FAC_T);}
323{
c_h3d_open_file_ (name,size,percentage_error,comp_level,RADVERS,LEN_RADVERS,FAC_M,FAC_L,FAC_T);}
394 cname_len = *size + 1;
395 cname=(
char*) malloc(
sizeof(
char)*cname_len);
396 for(i=0;i<*size;i++) cname[i] = name[i];
419 char SHELLPOOL[] =
"Shell";
423 char SOLIDPOOL[] =
"Solid";
427 char QUADPOOL[] =
"QUAD";
431 char SKINPOOL[] =
"SKIN";
435 char ONEDELEMPOOL[] =
"1D";
439 char RIGIDPOOL[] =
"Rigid";
443 char SPHCELLPOOL[] =
"SPHCELL";
447 char SPHNODEPOOL[] =
"SPHNodes";
451 char SH3NPOOL[] =
"SH3N";
455 char SH4NPOOL[] =
"SHELL";
459 char SPRINGPOOL[] =
"SPRING";
463 char TRUSSPOOL[] =
"TRUSS";
467 char BEAMPOOL[] =
"BEAM";
471 char SOLID4NPOOL[] =
"TETRA4";
475 char SOLID10NPOOL[] =
"TETRA10";
479 char SOLID5NPOOL[] =
"PENTA5";
483 char SOLID6NPOOL[] =
"PENTA6";
487 char SOLID8NPOOL[] =
"BRICK";
491 char SOLID16NPOOL[] =
"BRICK16";
495 char SOLID20NPOOL[] =
"BRICK20";
499 char SPHPOOL[] =
"Sph";
503 char RBODYPOOL[] =
"Rbody";
507 char RBE2POOL[] =
"Rbe2";
511 char RBE3POOL[] =
"Rbe3";
515 char RWALLPOOL[] =
"Rwall";
H3D_ID solid4n_poolname_id
H3D_ID onedelem_poolname_id
H3D_ID solid16n_poolname_id
H3D_ID elem1D_poolname_id
H3D_TRIBOOL model_adaptive
H3D_ID solid5n_poolname_id
H3D_ID spring_poolname_id
void _FCALL C_H3D_REOPEN_FILE(char *name, int *size, my_real *percentage_error, int *comp_level)
H3D_ID sphnode_poolname_id
H3D_ID solid6n_poolname_id
void c_h3d_open_file(char *name, int *size, my_real *percentage_error, int *comp_level, char *RADVERS, int *LEN_RADVERS, my_real *FAC_M, my_real *FAC_L, my_real *FAC_T)
void c_h3d_reopen_file_(char *name, int *size, my_real *percentage_error, int *comp_level)
H3D_ID sphcell_poolname_id
void c_h3d_open_file__(char *name, int *size, my_real *percentage_error, int *comp_level, char *RADVERS, int *LEN_RADVERS, my_real *FAC_M, my_real *FAC_L, my_real *FAC_T)
H3D_ID solid8n_poolname_id
void _FCALL C_H3D_WRITE_TOC()
void c_h3d_reopen_file__(char *name, int *size, my_real *percentage_error, int *comp_level)
H3D_ID elem2D_poolname_id
void c_h3d_reopen_file(char *name, int *size, my_real *percentage_error, int *comp_level)
H3D_ID solid20n_poolname_id
void c_h3d_open_file_(char *name, int *size, my_real *percentage_error, int *comp_level, char *RADVERS, int *LEN_RADVERS, my_real *FAC_M, my_real *FAC_L, my_real *FAC_T)
void _FCALL C_H3D_OPEN_FILE(char *name, int *size, my_real *percentage_error, int *comp_level, char *RADVERS, int *LEN_RADVERS, my_real *FAC_M, my_real *FAC_L, my_real *FAC_T)
H3D_TENSOR_TYPE tensor_type
void ReportErrorMsg(H3DFileInfo *h3d_file, const char *error)
H3D_ID solid10n_poolname_id
bool Hyper3DModelBegin(H3DFileInfo *h3d_file, unsigned int count)
bool Hyper3DFileInfoEnd(H3DFileInfo *h3d_file)
bool Hyper3DFileInfoAddComment(H3DFileInfo *h3d_file, const char *comment)
bool Hyper3DAddString(H3DFileInfo *h3d_file, const char *const string, H3D_ID *const str_id)
bool Hyper3DWriteTOC(H3DFileInfo *h3d_file)
bool Hyper3DExportClearError(H3DFileInfo *h3d_file)
bool Hyper3DFileInfoBegin(H3DFileInfo *h3d_file, const char *creating_appl, const char *creation_date, const char *solver_name)
bool Hyper3DModelEnd(H3DFileInfo *h3d_file)
bool Hyper3DModelWrite(H3DFileInfo *h3d_file, const char *label, H3D_ID id, bool tabular, H3D_TRIBOOL adaptive)
H3DFileInfo * Hyper3DExportOpen(const char *filename, H3D_FileMode mode, H3DMessageFunctionType mFunc, H3DErrorFunctionType eFunc)
bool Hyper3DSetModelToWrite(H3DFileInfo *h3d_file, H3D_ID id, bool tabular)