44#include <sys/resource.h>
56#include "h3dpublic_defs.h"
57#include "h3dpublic_export.h"
61#include "h3d_values.h"
81 int *ITY_ELEM,
int *NUMELQ ,
int *NUMELT ,
int *NUMELP ,
int *NUMELR,
int *IS_WRITTEN,
82 my_real *FUNC_CORNER,
int *IS_CORNER_DATA,
int *ISOLNOD,
int *MAXNOD)
84 int i,j,element_nb_nodes;
86 unsigned int NNOD = *MAXNOD;
94 unsigned int max_sims = 10;
95 unsigned int sub_count = 1;
96 float elem_result[6] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f };
97 float* elem_result1 =
nullptr;
98 elem_result1 =
new float[6 * NNOD];
100 for( i = 0; i < 6*NNOD; i++ )
102 elem_result1[i] = 0.0f;
106 unsigned int num_corners = 0;
107 unsigned int num_modes = 0;
113 if(*IS_CORNER_DATA == 1)
118 H3D_DS_TENSOR3D, NNOD , num_modes, *CPT_DATATYPE,
122 for( i = 0; i < *NUMELS; i++ )
124 if( ITY_ELEM[i] == 1 && IS_WRITTEN[i] == 1)
126 elem_id = ID_ELEM[i];
127 element_nb_nodes = ISOLNOD[i];
131 for( j = 0; j < 4; j++ )
133 elem_result1[j*6] = FUNC_CORNER[6*(NNOD*(i)+j)];
134 elem_result1[j*6+1] = FUNC_CORNER[6*(NNOD*(i)+j)+1];
135 elem_result1[j*6+2] = FUNC_CORNER[6*(NNOD*(i)+j)+2];
136 elem_result1[j*6+3] = FUNC_CORNER[6*(NNOD*(i)+j)+3];
137 elem_result1[j*6+4] = FUNC_CORNER[6*(NNOD*(i)+j)+4];
138 elem_result1[j*6+5] = FUNC_CORNER[6*(NNOD*(i)+j)+5];
144 for( j = 0; j < 6; j++ )
146 elem_result1[j*6] = FUNC_CORNER[6*(NNOD*(i)+j)];
147 elem_result1[j*6+1] = FUNC_CORNER[6*(NNOD*(i)+j)+1];
148 elem_result1[j*6+2] = FUNC_CORNER[6*(NNOD*(i)+j)+2];
149 elem_result1[j*6+3] = FUNC_CORNER[6*(NNOD*(i)+j)+3];
150 elem_result1[j*6+4] = FUNC_CORNER[6*(NNOD*(i)+j)+4];
151 elem_result1[j*6+5] = FUNC_CORNER[6*(NNOD*(i)+j)+5];
157 for( j = 0; j < 8; j++ )
159 elem_result1[j*6] = FUNC_CORNER[6*(NNOD*(i)+j)];
160 elem_result1[j*6+1] = FUNC_CORNER[6*(NNOD*(i)+j)+1];
161 elem_result1[j*6+2] = FUNC_CORNER[6*(NNOD*(i)+j)+2];
162 elem_result1[j*6+3] = FUNC_CORNER[6*(NNOD*(i)+j)+3];
163 elem_result1[j*6+4] = FUNC_CORNER[6*(NNOD*(i)+j)+4];
164 elem_result1[j*6+5] = FUNC_CORNER[6*(NNOD*(i)+j)+5];
169 if( ISOLNOD[i] == 10)
171 for( j = 0; j < 10; j++ )
173 elem_result1[j*6] = FUNC_CORNER[6*(NNOD*(i)+j)];
174 elem_result1[j*6+1] = FUNC_CORNER[6*(NNOD*(i)+j)+1];
175 elem_result1[j*6+2] = FUNC_CORNER[6*(NNOD*(i)+j)+2];
176 elem_result1[j*6+3] = FUNC_CORNER[6*(NNOD*(i)+j)+3];
177 elem_result1[j*6+4] = FUNC_CORNER[6*(NNOD*(i)+j)+4];
178 elem_result1[j*6+5] = FUNC_CORNER[6*(NNOD*(i)+j)+5];
224 H3D_DS_TENSOR3D, num_corners, num_modes, *CPT_DATATYPE,
228 for( i = 0; i < *NUMELS; i++ )
230 if( ITY_ELEM[i] == 1 && IS_WRITTEN[i] == 1)
232 elem_id = ID_ELEM[i];
233 elem_result[0] =
FUNC[6*i];
234 elem_result[1] =
FUNC[6*i+1];
235 elem_result[2] =
FUNC[6*i+2];
236 elem_result[3] =
FUNC[6*i+3];
237 elem_result[4] =
FUNC[6*i+4];
238 elem_result[5] =
FUNC[6*i+5];
248 delete[] elem_result1;
249 elem_result1 =
nullptr;
261 int *ITY_ELEM,
int *NUMELQ ,
int *NUMELT ,
int *NUMELP ,
int *NUMELR,
int *IS_WRITTEN,
262 my_real *FUNC_CORNER,
int *IS_CORNER_DATA,
int *ISOLNOD,
int *MAXNOD)
263{
c_h3d_update_solid_tensor_ (TT,IH3D,ITAB,NUMNOD,IXS,NIXS,NUMELS,IPARTS,
FUNC,ID_ELEM,CPT_DATATYPE,ITY_ELEM,
264 NUMELQ,NUMELT,NUMELP,NUMELR,IS_WRITTEN,FUNC_CORNER,IS_CORNER_DATA,ISOLNOD, MAXNOD);}
268 int *ITY_ELEM,
int *NUMELQ ,
int *NUMELT ,
int *NUMELP ,
int *NUMELR,
int *IS_WRITTEN,
269 my_real *FUNC_CORNER,
int *IS_CORNER_DATA,
int *ISOLNOD,
int *MAXNOD)
270{
c_h3d_update_solid_tensor_ (TT,IH3D,ITAB,NUMNOD,IXS,NIXS,NUMELS,IPARTS,
FUNC,ID_ELEM,CPT_DATATYPE,ITY_ELEM,
271 NUMELQ,NUMELT,NUMELP,NUMELR,IS_WRITTEN,FUNC_CORNER,IS_CORNER_DATA,ISOLNOD,MAXNOD);}
275 int *ITY_ELEM,
int *NUMELQ ,
int *NUMELT ,
int *NUMELP ,
int *NUMELR,
int *IS_WRITTEN,
276 my_real *FUNC_CORNER,
int *IS_CORNER_DATA,
int *ISOLNOD,
int *MAXNOD)
277{
c_h3d_update_solid_tensor_ (TT,IH3D,ITAB,NUMNOD,IXS,NIXS,NUMELS,IPARTS,
FUNC,ID_ELEM,CPT_DATATYPE,ITY_ELEM,
278 NUMELQ,NUMELT,NUMELP,NUMELR,IS_WRITTEN,FUNC_CORNER,IS_CORNER_DATA,ISOLNOD,MAXNOD);}
void _FCALL C_H3D_UPDATE_SOLID_TENSOR(my_real *TT, int *IH3D, int *ITAB, int *NUMNOD, int *IXS, int *NIXS, int *NUMELS, int *IPARTS, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *ITY_ELEM, int *NUMELQ, int *NUMELT, int *NUMELP, int *NUMELR, int *IS_WRITTEN, my_real *FUNC_CORNER, int *IS_CORNER_DATA, int *ISOLNOD, int *MAXNOD)
void c_h3d_update_solid_tensor(my_real *TT, int *IH3D, int *ITAB, int *NUMNOD, int *IXS, int *NIXS, int *NUMELS, int *IPARTS, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *ITY_ELEM, int *NUMELQ, int *NUMELT, int *NUMELP, int *NUMELR, int *IS_WRITTEN, my_real *FUNC_CORNER, int *IS_CORNER_DATA, int *ISOLNOD, int *MAXNOD)
void c_h3d_update_solid_tensor__(my_real *TT, int *IH3D, int *ITAB, int *NUMNOD, int *IXS, int *NIXS, int *NUMELS, int *IPARTS, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *ITY_ELEM, int *NUMELQ, int *NUMELT, int *NUMELP, int *NUMELR, int *IS_WRITTEN, my_real *FUNC_CORNER, int *IS_CORNER_DATA, int *ISOLNOD, int *MAXNOD)
void c_h3d_update_solid_tensor_(my_real *TT, int *IH3D, int *ITAB, int *NUMNOD, int *IXS, int *NIXS, int *NUMELS, int *IPARTS, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *ITY_ELEM, int *NUMELQ, int *NUMELT, int *NUMELP, int *NUMELR, int *IS_WRITTEN, my_real *FUNC_CORNER, int *IS_CORNER_DATA, int *ISOLNOD, int *MAXNOD)
bool Hyper3DDatasetBegin(H3DFileInfo *h3d_file, unsigned int count, H3D_SIM_IDX idx, H3D_ID subcase_id, H3D_DS_TYPE type, H3D_DS_FORMAT format, unsigned int num_corners, unsigned int num_modes, H3D_ID dt_id, int layer_idx, H3D_ID data_poolname_id, bool complex)
bool Hyper3DExportClearError(H3DFileInfo *h3d_file)
bool Hyper3DDatasetEnd(H3DFileInfo *h3d_file)
bool Hyper3DDatasetWrite(H3DFileInfo *h3d_file, H3D_ID id, const float *data)