OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
c_h3d_update_oned_vector.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_vector_ (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_VECTOR (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_vector__ (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_vector (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_vector.cpp.

◆ _FCALL [2/2]

#define _FCALL

Definition at line 50 of file c_h3d_update_oned_vector.cpp.

Function Documentation

◆ C_H3D_UPDATE_ONED_VECTOR()

void _FCALL C_H3D_UPDATE_ONED_VECTOR ( 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 198 of file c_h3d_update_oned_vector.cpp.

200{c_h3d_update_oned_vector_ (TT,IH3D,ITAB,NUMELT,NUMELP,NUMELR,FUNC,ID_ELEM,CPT_DATATYPE,ITY_ELEM,IS_WRITTEN);}
void c_h3d_update_oned_vector_(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_vector()

void c_h3d_update_oned_vector ( 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 206 of file c_h3d_update_oned_vector.cpp.

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

◆ c_h3d_update_oned_vector_()

void c_h3d_update_oned_vector_ ( 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 81 of file c_h3d_update_oned_vector.cpp.

83{
84 int i;
85 int offset;
86 H3D_ID elem_id;
87 H3D_ID comp_id;
88//
89 // initialize
90
91 try {
92 // create Subcase (Loadcase)
93 unsigned int max_sims = 10;
94 unsigned int sub_count = 1;
95 float elem_result[] = { 0.0f, 0.0f, 0.0f };
96
97 // create Result Data sets
98 unsigned int num_corners = 0;
99 unsigned int num_modes = 0;
100 bool complex = false;
101 float value[1] ;
102
103 sim_idx = *IH3D;
104
105 char TRUSSPOOL[] = "TRUSS";
107 if( !rc ) throw rc;
108
109 char BEAMPOOL[] = "BEAM";
111 if( !rc ) throw rc;
112
113 char SPRINGPOOL[] = "SPRING";
115 if( !rc ) throw rc;
116
117
118
119 if( *NUMELT != 0)
120 {
121
122 rc = Hyper3DDatasetBegin(h3d_file, *NUMELT, sim_idx, subcase_id, H3D_DS_ELEM,
123 H3D_DS_VECTOR, num_corners, num_modes, *CPT_DATATYPE,
125 if( !rc ) throw rc;
126
127 offset = 0;
128
129 for( i = 0; i < *NUMELT + *NUMELP + *NUMELR; i++ )
130 {
131 if( ITY_ELEM[i] == 4 && IS_WRITTEN[i] == 1)
132 {
133 elem_id = ID_ELEM[i];
134 elem_result[0] = FUNC[3*i];
135 elem_result[1] = FUNC[3*i+1];
136 elem_result[2] = FUNC[3*i+2];
137 rc = Hyper3DDatasetWrite(h3d_file, elem_id, &elem_result[0]);
138 }
139 }
140
142 if( !rc ) throw rc;
143 }
144
145 if( *NUMELP != 0)
146 {
147
148 rc = Hyper3DDatasetBegin(h3d_file, *NUMELP, sim_idx, subcase_id, H3D_DS_ELEM,
149 H3D_DS_VECTOR, num_corners, num_modes, *CPT_DATATYPE,
151 if( !rc ) throw rc;
152
153 for( i = 0; i < *NUMELT + *NUMELP + *NUMELR; i++ )
154 {
155 if( ITY_ELEM[i] == 5 && IS_WRITTEN[i] == 1)
156 {
157 elem_id = ID_ELEM[i];
158 elem_result[0] = FUNC[3*i];
159 elem_result[1] = FUNC[3*i+1];
160 elem_result[2] = FUNC[3*i+2];
161 rc = Hyper3DDatasetWrite(h3d_file, elem_id, &elem_result[0]);
162 }
163 }
165 if( !rc ) throw rc;
166 }
167
168 if( *NUMELR != 0)
169 {
170
171 rc = Hyper3DDatasetBegin(h3d_file, *NUMELR, sim_idx, subcase_id, H3D_DS_ELEM,
172 H3D_DS_VECTOR, num_corners, num_modes, *CPT_DATATYPE,
174 if( !rc ) throw rc;
175
176 for( i = 0; i < *NUMELT + *NUMELP + *NUMELR; i++ )
177 {
178 if( ITY_ELEM[i] == 6 && IS_WRITTEN[i] == 1)
179 {
180 elem_id = ID_ELEM[i];
181 elem_result[0] = FUNC[3*i];
182 elem_result[1] = FUNC[3*i+1];
183 elem_result[2] = FUNC[3*i+2];
184 rc = Hyper3DDatasetWrite(h3d_file, elem_id, &elem_result[0]);
185 }
186 }
188 if( !rc ) throw rc;
189 }
190
191 } // end of try
192
193 catch(...) {
195 }
196}
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_vector__()

void c_h3d_update_oned_vector__ ( 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 202 of file c_h3d_update_oned_vector.cpp.

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