OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
c_h3d_update_oned_torsor.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_update_oned_torsor_ (my_real *TT, int *IH3D, int *ITAB, int *NUMELT, int *NUMELP, int *NUMELR, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *ITY_ELEM, int *IS_WRITTEN)
void _FCALL C_H3D_UPDATE_ONED_TORSOR (my_real *TT, int *IH3D, int *ITAB, int *NUMELT, int *NUMELP, int *NUMELR, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *ITY_ELEM, int *IS_WRITTEN)
void c_h3d_update_oned_torsor__ (my_real *TT, int *IH3D, int *ITAB, int *NUMELT, int *NUMELP, int *NUMELR, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *ITY_ELEM, int *IS_WRITTEN)
void c_h3d_update_oned_torsor (my_real *TT, int *IH3D, int *ITAB, int *NUMELT, int *NUMELP, int *NUMELR, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *ITY_ELEM, int *IS_WRITTEN)

Macro Definition Documentation

◆ _FCALL [1/2]

#define _FCALL

Definition at line 50 of file c_h3d_update_oned_torsor.cpp.

◆ _FCALL [2/2]

#define _FCALL

Definition at line 50 of file c_h3d_update_oned_torsor.cpp.

Function Documentation

◆ C_H3D_UPDATE_ONED_TORSOR()

void _FCALL C_H3D_UPDATE_ONED_TORSOR ( my_real * TT,
int * IH3D,
int * ITAB,
int * NUMELT,
int * NUMELP,
int * NUMELR,
my_real * FUNC,
int * ID_ELEM,
int * CPT_DATATYPE,
int * ITY_ELEM,
int * IS_WRITTEN )

Definition at line 200 of file c_h3d_update_oned_torsor.cpp.

202{c_h3d_update_oned_torsor_ (TT,IH3D,ITAB,NUMELT,NUMELP,NUMELR,FUNC,ID_ELEM,CPT_DATATYPE,ITY_ELEM,IS_WRITTEN);}
void c_h3d_update_oned_torsor_(my_real *TT, int *IH3D, int *ITAB, int *NUMELT, int *NUMELP, int *NUMELR, my_real *FUNC, int *ID_ELEM, int *CPT_DATATYPE, int *ITY_ELEM, int *IS_WRITTEN)
#define FUNC
Definition clamov.c:8

◆ c_h3d_update_oned_torsor()

void c_h3d_update_oned_torsor ( my_real * TT,
int * IH3D,
int * ITAB,
int * NUMELT,
int * NUMELP,
int * NUMELR,
my_real * FUNC,
int * ID_ELEM,
int * CPT_DATATYPE,
int * ITY_ELEM,
int * IS_WRITTEN )

Definition at line 208 of file c_h3d_update_oned_torsor.cpp.

210{c_h3d_update_oned_torsor_ (TT,IH3D,ITAB,NUMELT,NUMELP,NUMELR,FUNC,ID_ELEM,CPT_DATATYPE,ITY_ELEM,IS_WRITTEN);}

◆ c_h3d_update_oned_torsor_()

void c_h3d_update_oned_torsor_ ( my_real * TT,
int * IH3D,
int * ITAB,
int * NUMELT,
int * NUMELP,
int * NUMELR,
my_real * FUNC,
int * ID_ELEM,
int * CPT_DATATYPE,
int * ITY_ELEM,
int * IS_WRITTEN )

Definition at line 79 of file c_h3d_update_oned_torsor.cpp.

81{
82 int i;
83 int offset;
84 H3D_ID elem_id;
85 H3D_ID comp_id;
86//
87 // initialize
88
89 try {
90 // create Subcase (Loadcase)
91 unsigned int max_sims = 10;
92 unsigned int sub_count = 1;
93 float elem_result[1] = { 0.0f};
94
95 // create Result Data sets
96 unsigned int num_corners = 0;
97 unsigned int num_modes = 0;
98 bool complex = false;
99 float value[1] ;
100
101 sim_idx = *IH3D;
102
103 char TRUSSPOOL[] = "TRUSS";
105 if( !rc ) throw rc;
106
107 char BEAMPOOL[] = "BEAM";
109 if( !rc ) throw rc;
110
111 char SPRINGPOOL[] = "SPRING";
113 if( !rc ) throw rc;
114
115
116 if( *NUMELT != 0 )
117 {
118
119 offset = 0;
120
121 rc = Hyper3DDatasetBegin(h3d_file, *NUMELT, sim_idx, subcase_id, H3D_DS_ELEM,
122 H3D_DS_SCALAR, num_corners, num_modes, *CPT_DATATYPE,
124 if( !rc ) throw rc;
125
126 for( i = 0; i < *NUMELT + *NUMELP + *NUMELR; i++ )
127 {
128 if( ITY_ELEM[i] == 4 && IS_WRITTEN[i] == 1)
129 {
130 elem_id = ID_ELEM[i];
131 elem_result[0] = FUNC[9*i];
132 rc = Hyper3DDatasetWrite(h3d_file, elem_id, &elem_result[0]);
133 if( !rc ) throw rc;
134 IS_WRITTEN[i] = 0;
135 }
136 }
138 if( !rc ) throw rc;
139 }
140
141
142 if( *NUMELP != 0 )
143 {
144
145 offset = 0;
146
147 rc = Hyper3DDatasetBegin(h3d_file, *NUMELP, sim_idx, subcase_id, H3D_DS_ELEM,
148 H3D_DS_SCALAR, num_corners, num_modes, *CPT_DATATYPE,
150 if( !rc ) throw rc;
151
152 for( i = 0; i < *NUMELT + *NUMELP + *NUMELR; i++ )
153 {
154 if( ITY_ELEM[i] == 5 && IS_WRITTEN[i] == 1)
155 {
156 elem_id = ID_ELEM[i];
157 elem_result[0] = FUNC[9*i];
158 rc = Hyper3DDatasetWrite(h3d_file, elem_id, &elem_result[0]);
159 if( !rc ) throw rc;
160 IS_WRITTEN[i] = 0;
161 }
162 }
164 if( !rc ) throw rc;
165 }
166
167
168 if( *NUMELR != 0 )
169 {
170
171 offset = 0;
172
173 rc = Hyper3DDatasetBegin(h3d_file, *NUMELR, sim_idx, subcase_id, H3D_DS_ELEM,
174 H3D_DS_SCALAR, num_corners, num_modes, *CPT_DATATYPE,
176 if( !rc ) throw rc;
177
178 for( i = 0; i < *NUMELT + *NUMELP + *NUMELR; i++ )
179 {
180 if( ITY_ELEM[i] == 6 && IS_WRITTEN[i] == 1)
181 {
182 elem_id = ID_ELEM[i];
183 elem_result[0] = FUNC[9*i];
184 rc = Hyper3DDatasetWrite(h3d_file, elem_id, &elem_result[0]);
185 if( !rc ) throw rc;
186 IS_WRITTEN[i] = 0;
187 }
188 }
190 if( !rc ) throw rc;
191 }
192
193 } // end of try
194
195 catch(...) {
197 }
198}
H3DFileInfo * h3d_file
bool rc
H3D_ID spring_poolname_id
H3D_ID beam_poolname_id
H3D_ID comp_id
H3D_SIM_IDX sim_idx
H3D_ID subcase_id
H3D_ID truss_poolname_id
bool Hyper3DAddString(H3DFileInfo *h3d_file, const char *const string, H3D_ID *const str_id)
Definition h3d_dl.c:955
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 Hyper3DExportClearError(H3DFileInfo *h3d_file)
Definition h3d_dl.c:939
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
integer, dimension(:), allocatable offset
Definition rad2r.F:53

◆ c_h3d_update_oned_torsor__()

void c_h3d_update_oned_torsor__ ( my_real * TT,
int * IH3D,
int * ITAB,
int * NUMELT,
int * NUMELP,
int * NUMELR,
my_real * FUNC,
int * ID_ELEM,
int * CPT_DATATYPE,
int * ITY_ELEM,
int * IS_WRITTEN )

Definition at line 204 of file c_h3d_update_oned_torsor.cpp.

206{c_h3d_update_oned_torsor_ (TT,IH3D,ITAB,NUMELT,NUMELP,NUMELR,FUNC,ID_ELEM,CPT_DATATYPE,ITY_ELEM,IS_WRITTEN);}