44#include <sys/resource.h>
56#include "h3dpublic_defs.h"
57#include "h3dpublic_export.h"
61#include "h3d_values.h"
78void c_h3d_create_sph_(
int *ITAB,
int *NUMNOD,
int *KXSP,
int *NISP,
int *NUMSPH,
int *IPARTSP,
int *IPART,
int *LIPART1,
81 unsigned int * nbelems =
new unsigned int [*NUMSPH];
86 unsigned int conn[1] ;
88 int i,n1,n2,n3,n4,n5,n6,n7,n8;
89 int cpt_elem,nbelemwrite;
91 int elem_nodes_m1 = 0;
94 char NODEPOOL[] =
"Nodes";
98 char SPHCELLPOOL[] =
"SPHCELL";
102 char SPHPOOL[] =
"Sph";
106 unsigned int elem_count = 1;
125 for(i=0;i<*NUMSPH;i++) nbelems[i] = 0;
127 for(i=0;i<*NUMSPH;i++)
129 if(H3D_PART[IPARTSP[i] - 1] == 1)
131 if(IPART[*LIPART1 * (IPARTSP[i] - 1) + 3] !=
comp_id)
133 comp_id = IPART[*LIPART1 * (IPARTSP[i] - 1) + 3];
136 nbelems[j] = nbelems[j] + 1;
144 for(i=0;i<*NUMSPH;i++)
146 if(H3D_PART[IPARTSP[i] - 1] == 1)
149 conn[0] = KXSP[*NISP * i + 2] ;
150 elem_id = KXSP[*NISP * i + *NISP - 1] ;
155 nbelemwrite = nbelems[i];
156 comp_id = IPART[*LIPART1 * (IPARTSP[i] - 1) + 3] ;
169 if (cpt_elem == nbelemwrite)
193void _FCALL C_H3D_CREATE_SPH(
int *ITAB,
int *NUMNOD,
int *KXSP,
int *NISP,
int *NUMSPH,
int *IPARTSP,
int *IPART,
int *LIPART1,
195{
c_h3d_create_sph_ (ITAB,NUMNOD,KXSP,NISP,NUMSPH,IPARTSP,IPART,LIPART1,X,H3D_PART);}
197void c_h3d_create_sph__ (
int *ITAB,
int *NUMNOD,
int *KXSP,
int *NISP,
int *NUMSPH,
int *IPARTSP,
int *IPART,
int *LIPART1,
199{
c_h3d_create_sph_ (ITAB,NUMNOD,KXSP,NISP,NUMSPH,IPARTSP,IPART,LIPART1,X,H3D_PART);}
201void c_h3d_create_sph (
int *ITAB,
int *NUMNOD,
int *KXSP,
int *NISP,
int *NUMSPH,
int *IPARTSP,
int *IPART,
int *LIPART1,
203{
c_h3d_create_sph_ (ITAB,NUMNOD,KXSP,NISP,NUMSPH,IPARTSP,IPART,LIPART1,X,H3D_PART);}
void c_h3d_create_sph_(int *ITAB, int *NUMNOD, int *KXSP, int *NISP, int *NUMSPH, int *IPARTSP, int *IPART, int *LIPART1, my_real *X, int *H3D_PART)
void c_h3d_create_sph(int *ITAB, int *NUMNOD, int *KXSP, int *NISP, int *NUMSPH, int *IPARTSP, int *IPART, int *LIPART1, my_real *X, int *H3D_PART)
void _FCALL C_H3D_CREATE_SPH(int *ITAB, int *NUMNOD, int *KXSP, int *NISP, int *NUMSPH, int *IPARTSP, int *IPART, int *LIPART1, my_real *X, int *H3D_PART)
void c_h3d_create_sph__(int *ITAB, int *NUMNOD, int *KXSP, int *NISP, int *NUMSPH, int *IPARTSP, int *IPART, int *LIPART1, my_real *X, int *H3D_PART)
H3D_ID sphcell_poolname_id
bool Hyper3DAddString(H3DFileInfo *h3d_file, const char *const string, H3D_ID *const str_id)
bool Hyper3DExportClearError(H3DFileInfo *h3d_file)
bool Hyper3DElementWrite(H3DFileInfo *h3d_file, H3D_ID id, H3D_ID *connectivity)
bool Hyper3DElementEnd(H3DFileInfo *h3d_file)
bool Hyper3DElementBegin(H3DFileInfo *h3d_file, unsigned int count, H3D_ID poolname_id, H3D_ElementConfig config, H3D_ID parent_id, H3D_ID parent_poolname_id, H3D_ID node_poolname_id)