OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
c_h3d_create_shells.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_create_shells_ (int *ITAB, int *NUMNOD, int *IXC, int *NIXC, int *NUMELC, int *IPARTC, int *IPART, int *LIPART1, int *H3D_PART)
void _FCALL C_H3D_CREATE_SHELLS (int *ITAB, int *NUMNOD, int *IXC, int *NIXC, int *NUMELC, int *IPARTC, int *IPART, int *LIPART1, int *H3D_PART)
void c_h3d_create_shells__ (int *ITAB, int *NUMNOD, int *IXC, int *NIXC, int *NUMELC, int *IPARTC, int *IPART, int *LIPART1, int *H3D_PART)
void c_h3d_create_shells (int *ITAB, int *NUMNOD, int *IXC, int *NIXC, int *NUMELC, int *IPARTC, int *IPART, int *LIPART1, int *H3D_PART)

Macro Definition Documentation

◆ _FCALL [1/2]

#define _FCALL

Definition at line 50 of file c_h3d_create_shells.cpp.

◆ _FCALL [2/2]

#define _FCALL

Definition at line 50 of file c_h3d_create_shells.cpp.

Function Documentation

◆ C_H3D_CREATE_SHELLS()

void _FCALL C_H3D_CREATE_SHELLS ( int * ITAB,
int * NUMNOD,
int * IXC,
int * NIXC,
int * NUMELC,
int * IPARTC,
int * IPART,
int * LIPART1,
int * H3D_PART )

Definition at line 155 of file c_h3d_create_shells.cpp.

156{c_h3d_create_shells_ (ITAB,NUMNOD,IXC,NIXC,NUMELC,IPARTC,IPART,LIPART1,H3D_PART);}
void c_h3d_create_shells_(int *ITAB, int *NUMNOD, int *IXC, int *NIXC, int *NUMELC, int *IPARTC, int *IPART, int *LIPART1, int *H3D_PART)

◆ c_h3d_create_shells()

void c_h3d_create_shells ( int * ITAB,
int * NUMNOD,
int * IXC,
int * NIXC,
int * NUMELC,
int * IPARTC,
int * IPART,
int * LIPART1,
int * H3D_PART )

Definition at line 161 of file c_h3d_create_shells.cpp.

162{c_h3d_create_shells_ (ITAB,NUMNOD,IXC,NIXC,NUMELC,IPARTC,IPART,LIPART1,H3D_PART);}

◆ c_h3d_create_shells_()

void c_h3d_create_shells_ ( int * ITAB,
int * NUMNOD,
int * IXC,
int * NIXC,
int * NUMELC,
int * IPARTC,
int * IPART,
int * LIPART1,
int * H3D_PART )

Definition at line 70 of file c_h3d_create_shells.cpp.

71{
72 unsigned int * nbelems = new unsigned int [*NUMELC];
73 try {
74
75
76 // create Elements
77 unsigned int conn[4] ;
78 H3D_ID elem_id ;
79 int i,j,cpt_elem,nbelemwrite;
80
81 char SH4NPOOL[] = "SHELL";
83 if( !rc ) throw rc;
84
85 char SHELLPOOL[] = "Shell";
87 if( !rc ) throw rc;
88
89 unsigned int elem_count = 1;
90
91 comp_id = 0;
92 j = 0;
93 for(i=0;i<*NUMELC;i++) nbelems[i] = 0;
94
95 for(i=0;i<*NUMELC;i++)
96 {
97 if(H3D_PART[IPARTC[i] - 1] == 1)
98 {
99 if(IPART[*LIPART1 * (IPARTC[i] - 1) + 3] != comp_id)
100 {
101 comp_id = IPART[*LIPART1 * (IPARTC[i] - 1) + 3];
102 j = i;
103 }
104 nbelems[j] = nbelems[j] + 1;
105 }
106 }
107
108 comp_id = 0;
109 cpt_elem = 0;
110 nbelemwrite = 0;
111
112 for(i=0;i<*NUMELC;i++)
113 {
114 if(H3D_PART[IPARTC[i] - 1] == 1)
115 {
116 conn[0] = IXC[*NIXC * i + 1];
117 conn[1] = IXC[*NIXC * i + 2];
118 conn[2] = IXC[*NIXC * i + 3];
119 conn[3] = IXC[*NIXC * i + 4];
120 elem_id = IXC[*NIXC * i + *NIXC - 1];
121
122 if(nbelems[i] != 0)
123 {
124 cpt_elem = 0;
125 nbelemwrite = nbelems[i];
126 comp_id = IPART[*LIPART1 * (IPARTC[i] - 1) + 3] ;
127
129 H3D_ELEM_CONFIG_QUAD4, comp_id,
131 if( !rc ) throw rc;
132 }
133 cpt_elem++;
134 rc = Hyper3DElementWrite(h3d_file, elem_id, conn);
135 if( !rc ) throw rc;
136
137 if (cpt_elem == nbelemwrite)
138 {
140 if( !rc ) throw rc;
141 }
142 }
143 }
144
145
146 } // end of try
147
148 catch(...) {
150 }
151 delete [] nbelems;
152
153}
H3D_ID shell_poolname_id
H3DFileInfo * h3d_file
H3D_ID node_poolname_id
bool rc
H3D_ID sh4n_poolname_id
H3D_ID comp_id
bool Hyper3DAddString(H3DFileInfo *h3d_file, const char *const string, H3D_ID *const str_id)
Definition h3d_dl.c:955
bool Hyper3DExportClearError(H3DFileInfo *h3d_file)
Definition h3d_dl.c:939
bool Hyper3DElementWrite(H3DFileInfo *h3d_file, H3D_ID id, H3D_ID *connectivity)
Definition h3d_dl.c:1147
bool Hyper3DElementEnd(H3DFileInfo *h3d_file)
Definition h3d_dl.c:1154
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)
Definition h3d_dl.c:1137

◆ c_h3d_create_shells__()

void c_h3d_create_shells__ ( int * ITAB,
int * NUMNOD,
int * IXC,
int * NIXC,
int * NUMELC,
int * IPARTC,
int * IPART,
int * LIPART1,
int * H3D_PART )

Definition at line 158 of file c_h3d_create_shells.cpp.

159{c_h3d_create_shells_ (ITAB,NUMNOD,IXC,NIXC,NUMELC,IPARTC,IPART,LIPART1,H3D_PART);}