OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
c_h3d_eroded_skin.cpp File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <fcntl.h>
#include <sys/resource.h>
#include <sys/types.h>
#include <time.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dlfcn.h>
#include <stdbool.h>
#include "h3dpublic_defs.h"
#include "h3dpublic_export.h"
#include "h3d_values.h"

Go to the source code of this file.

Macros

#define _FCALL
#define _FCALL

Functions

void c_h3d_eroded_skin_ (my_real *TT, int *IH3D, int *ITAB, int *NUMNOD, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *NUMELQ)
void _FCALL C_H3D_ERODED_SKIN (my_real *TT, int *IH3D, int *ITAB, int *NUMNOD, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *NUMELQ)
void c_h3d_eroded_skin__ (my_real *TT, int *IH3D, int *ITAB, int *NUMNOD, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *NUMELQ)
void c_h3d_eroded_skin (my_real *TT, int *IH3D, int *ITAB, int *NUMNOD, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *NUMELQ)
void c_h3d_create_skin_eroded_ (int *cpt_data, char *name, int *size, int *info, char *name1, int *size1)
void _FCALL C_H3D_CREATE_SKIN_ERODED (int *cpt_data, char *name, int *size, int *info, char *name1, int *size1)
void c_h3d_create_skin_eroded__ (int *cpt_data, char *name, int *size, int *info, char *name1, int *size1)
void c_h3d_create_skin_eroded (int *cpt_data, char *name, int *size, int *info, char *name1, int *size1)

Macro Definition Documentation

◆ _FCALL [1/2]

#define _FCALL

Definition at line 50 of file c_h3d_eroded_skin.cpp.

◆ _FCALL [2/2]

#define _FCALL

Definition at line 50 of file c_h3d_eroded_skin.cpp.

Function Documentation

◆ C_H3D_CREATE_SKIN_ERODED()

void _FCALL C_H3D_CREATE_SKIN_ERODED ( int * cpt_data,
char * name,
int * size,
int * info,
char * name1,
int * size1 )

Definition at line 219 of file c_h3d_eroded_skin.cpp.

220{c_h3d_create_skin_eroded_ (cpt_data, name, size, info, name1, size1);}
void c_h3d_create_skin_eroded_(int *cpt_data, char *name, int *size, int *info, char *name1, int *size1)

◆ c_h3d_create_skin_eroded()

void c_h3d_create_skin_eroded ( int * cpt_data,
char * name,
int * size,
int * info,
char * name1,
int * size1 )

Definition at line 225 of file c_h3d_eroded_skin.cpp.

226{c_h3d_create_skin_eroded_ (cpt_data, name, size, info, name1, size1);}

◆ c_h3d_create_skin_eroded_()

void c_h3d_create_skin_eroded_ ( int * cpt_data,
char * name,
int * size,
int * info,
char * name1,
int * size1 )

Definition at line 150 of file c_h3d_eroded_skin.cpp.

151{
152 char *cname,*cname1;
153 int cname_len,cname_len1;
154 int i;
155 float node[3];
156 H3D_ID node_id;
157 unsigned int elem_count = 1;
158
159 cname_len = *size + 1;
160 cname=(char*) malloc(sizeof(char)*cname_len);
161 for(i=0;i<*size;i++) cname[i] = name[i];
162 cname[*size]='\0';
163
164 cname_len1 = *size1 + 1;
165 cname1=(char*) malloc(sizeof(char)*cname_len1);
166 for(i=0;i<*size1;i++) cname1[i] = name1[i];
167 cname1[*size1]='\0';
168
169 char * LAYERPOOL = new char [*size1+11];
170 sprintf(LAYERPOOL, "%s %d" ,cname1,*info);
171 H3D_ID layer_pool_id = H3D_NULL_ID;
172 rc = Hyper3DAddString(h3d_file, LAYERPOOL, &layer_pool_id);
173
174 char edata_type[30];
175//
176
177 //printf( "scalar %d info = %d %s\n", *cpt_data , *info, name);
178 //fflush(stdout);
179
180 try {
181 // create result data types
182 dt_count++;
183
185 if( !rc ) throw rc;
186
187 pool_count = 2;
188
189 dt_id++;
190 sprintf(edata_type, cname, H3D_DT_DELIMITER);
191 // snprintf(edata_type, sizeof(edata_type), cname, H3D_DT_DELIMITER);
192 rc = Hyper3DDatatypeWrite(h3d_file, edata_type, *cpt_data , H3D_DS_EROSION,
193 H3D_DS_ELEM, pool_count);
194 if( !rc ) throw rc;
195
196 rc = Hyper3DDatatypeDescriptionWrite(h3d_file,dt_id, "N/A : element not deleted");
197
200 if( !rc ) throw rc;
201
203 if( !rc ) throw rc;
204
205 } // end of try
206
207 catch(...) {
209 }
210 delete [] LAYERPOOL;
211 free(cname);
212 free(cname1);
213
214}
H3DFileInfo * h3d_file
unsigned int pool_count
unsigned int dt_count
bool has_corners
bool rc
float poisson
H3D_ID * layername_ids
H3D_ID skin_poolname_id
H3D_ID dt_id
char edata_type[50]
H3D_TENSOR_TYPE tensor_type
bool Hyper3DDatatypePools(H3DFileInfo *h3d_file, H3D_ID dt_id, H3D_ID poolname_id, unsigned int num_layers, H3D_ID *layername_ids, bool corners, H3D_TENSOR_TYPE tensor_type, float poisson)
Definition h3d_dl.c:1331
bool Hyper3DAddString(H3DFileInfo *h3d_file, const char *const string, H3D_ID *const str_id)
Definition h3d_dl.c:955
bool Hyper3DDatatypeEnd(H3DFileInfo *h3d_file)
Definition h3d_dl.c:1341
bool Hyper3DExportClearError(H3DFileInfo *h3d_file)
Definition h3d_dl.c:939
bool Hyper3DDatatypeDescriptionWrite(H3DFileInfo *h3d_file, H3D_ID dt_id, const char *description)
Definition h3d_dl.c:1324
bool Hyper3DDatatypeWrite(H3DFileInfo *h3d_file, const char *label, H3D_ID dt_id, H3D_DS_FORMAT format, H3D_DS_TYPE type, unsigned int num_pools)
Definition h3d_dl.c:1316
bool Hyper3DDatatypeBegin(H3DFileInfo *h3d_file, unsigned int count)
Definition h3d_dl.c:1310

◆ c_h3d_create_skin_eroded__()

void c_h3d_create_skin_eroded__ ( int * cpt_data,
char * name,
int * size,
int * info,
char * name1,
int * size1 )

Definition at line 222 of file c_h3d_eroded_skin.cpp.

223{c_h3d_create_skin_eroded_ (cpt_data, name, size, info, name1, size1);}

◆ C_H3D_ERODED_SKIN()

void _FCALL C_H3D_ERODED_SKIN ( my_real * TT,
int * IH3D,
int * ITAB,
int * NUMNOD,
my_real * FUNC,
int * ID_ELEM,
int * CPT_DATATYPE,
int * NUMELQ )

Definition at line 137 of file c_h3d_eroded_skin.cpp.

139{c_h3d_eroded_skin_ (TT,IH3D,ITAB,NUMNOD,FUNC,ID_ELEM,CPT_DATATYPE,NUMELQ);}
void c_h3d_eroded_skin_(my_real *TT, int *IH3D, int *ITAB, int *NUMNOD, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *NUMELQ)
#define FUNC
Definition clamov.c:8

◆ c_h3d_eroded_skin()

void c_h3d_eroded_skin ( my_real * TT,
int * IH3D,
int * ITAB,
int * NUMNOD,
my_real * FUNC,
int * ID_ELEM,
int * CPT_DATATYPE,
int * NUMELQ )

Definition at line 145 of file c_h3d_eroded_skin.cpp.

147{c_h3d_eroded_skin_ (TT,IH3D,ITAB,NUMNOD,FUNC,ID_ELEM,CPT_DATATYPE,NUMELQ);}

◆ c_h3d_eroded_skin_()

void c_h3d_eroded_skin_ ( my_real * TT,
int * IH3D,
int * ITAB,
int * NUMNOD,
my_real * FUNC,
int * ID_ELEM,
int * CPT_DATATYPE,
int * NUMELQ )

Definition at line 78 of file c_h3d_eroded_skin.cpp.

80{
81 int i;
82 H3D_ID elem_id;
83 H3D_ID comp_id;
84//
85 // initialize
86 try {
87 // create Subcase (Loadcase)
88 unsigned int max_sims = 10;
89 unsigned int sub_count = 1;
90 float elem_result[] = { 0.0f, 0.0f, 0.0f };
91
92 // create Result Data sets
93 unsigned int num_corners = 0;
94 unsigned int num_modes = 0;
95 bool complex = false;
96 unsigned int cpt1 = 0;
97 float value[1] ;
98
99 sim_idx = *IH3D;
100
101 if(*NUMELQ != 0)
102 {
103 rc = Hyper3DDatasetBegin(h3d_file, *NUMELQ, sim_idx, subcase_id, H3D_DS_ELEM,
104 H3D_DS_EROSION, num_corners, num_modes, *CPT_DATATYPE,
106 if( !rc ) fflush(stdout);
107 if( !rc ) throw rc;
108
109
110 for( i = 0; i < *NUMELQ; i++ )
111 {
112 elem_id = ID_ELEM[i];
113 elem_result[0] = 0.0f;
114 if( FUNC[i] == 0.0f )
115 {
116 elem_result[0] = 1.0f;
117 rc = Hyper3DDatasetWrite(h3d_file, elem_id, &elem_result[0]);
118
119 if( !rc ) fflush(stdout);
120 if( !rc ) throw rc;
121 }
122 }
123
125 if( !rc ) throw rc;
126 }
127
128
129 } // end of try
130
131 catch(...) {
133 }
134
135}
H3D_ID comp_id
H3D_SIM_IDX sim_idx
H3D_ID subcase_id
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)
Definition h3d_dl.c:1352
bool Hyper3DDatasetEnd(H3DFileInfo *h3d_file)
Definition h3d_dl.c:1400
bool Hyper3DDatasetWrite(H3DFileInfo *h3d_file, H3D_ID id, const float *data)
Definition h3d_dl.c:1372

◆ c_h3d_eroded_skin__()

void c_h3d_eroded_skin__ ( my_real * TT,
int * IH3D,
int * ITAB,
int * NUMNOD,
my_real * FUNC,
int * ID_ELEM,
int * CPT_DATATYPE,
int * NUMELQ )

Definition at line 141 of file c_h3d_eroded_skin.cpp.

143{c_h3d_eroded_skin_ (TT,IH3D,ITAB,NUMNOD,FUNC,ID_ELEM,CPT_DATATYPE,NUMELQ);}