OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
c_h3d_create_quads.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_quads_ (int *ITAB, int *NUMNOD, int *IPART, int *LIPART1, int *H3D_PART, int *IXQ, int *NIXQ, int *NUMELQ, int *IPARTQ)
void _FCALL C_H3D_CREATE_QUADS (int *ITAB, int *NUMNOD, int *IPART, int *LIPART1, int *H3D_PART, int *IXQ, int *NIXQ, int *NUMELQ, int *IPARTQ)
void c_h3d_create_quads__ (int *ITAB, int *NUMNOD, int *IPART, int *LIPART1, int *H3D_PART, int *IXQ, int *NIXQ, int *NUMELQ, int *IPARTQ)
void c_h3d_create_quads (int *ITAB, int *NUMNOD, int *IPART, int *LIPART1, int *H3D_PART, int *IXQ, int *NIXQ, int *NUMELQ, int *IPARTQ)

Macro Definition Documentation

◆ _FCALL [1/2]

#define _FCALL

Definition at line 50 of file c_h3d_create_quads.cpp.

◆ _FCALL [2/2]

#define _FCALL

Definition at line 50 of file c_h3d_create_quads.cpp.

Function Documentation

◆ C_H3D_CREATE_QUADS()

void _FCALL C_H3D_CREATE_QUADS ( int * ITAB,
int * NUMNOD,
int * IPART,
int * LIPART1,
int * H3D_PART,
int * IXQ,
int * NIXQ,
int * NUMELQ,
int * IPARTQ )

Definition at line 173 of file c_h3d_create_quads.cpp.

175{c_h3d_create_quads_ (ITAB, NUMNOD, IPART, LIPART1, H3D_PART, IXQ, NIXQ, NUMELQ, IPARTQ);}
void c_h3d_create_quads_(int *ITAB, int *NUMNOD, int *IPART, int *LIPART1, int *H3D_PART, int *IXQ, int *NIXQ, int *NUMELQ, int *IPARTQ)

◆ c_h3d_create_quads()

void c_h3d_create_quads ( int * ITAB,
int * NUMNOD,
int * IPART,
int * LIPART1,
int * H3D_PART,
int * IXQ,
int * NIXQ,
int * NUMELQ,
int * IPARTQ )

Definition at line 181 of file c_h3d_create_quads.cpp.

183{c_h3d_create_quads_ (ITAB, NUMNOD, IPART, LIPART1, H3D_PART, IXQ, NIXQ, NUMELQ, IPARTQ);}

◆ c_h3d_create_quads_()

void c_h3d_create_quads_ ( int * ITAB,
int * NUMNOD,
int * IPART,
int * LIPART1,
int * H3D_PART,
int * IXQ,
int * NIXQ,
int * NUMELQ,
int * IPARTQ )

Definition at line 70 of file c_h3d_create_quads.cpp.

72{
73 unsigned int * nbelems = new unsigned int [*NUMELQ];
74 try {
75
76
77 // create Elements
78 unsigned int conn4[4] ;
79 H3D_ID elem_id ;
80 int i,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10;
81 int cpt_elem,nbelemwrite;
82 int elem_nodes = 0;
83 int elem_nodes_m1 = 0;
84 int j = 0;
85
86 char QUADPOOL[] = "QUAD";
88 if( !rc ) throw rc;
89
90
91 unsigned int elem_count = 1;
92
93// QUAD
94
95 for(i=0;i<*NUMELQ;i++) nbelems[i] = 0;
96
97 comp_id = 0;
98
99 for(i=0;i<*NUMELQ;i++)
100 {
101 if(H3D_PART[IPARTQ[i] - 1] == 1)
102 {
103 elem_nodes = 4;
104
105 if(IPART[*LIPART1 * (IPARTQ[i] - 1) + 3] != comp_id)
106 {
107 comp_id = IPART[*LIPART1 * (IPARTQ[i] - 1) + 3];
108 j = i;
109 }
110 nbelems[j] = nbelems[j] + 1;
111 }
112 }
113
114 comp_id = 0;
115 cpt_elem = 0;
116 nbelemwrite = 0;
117
118 for(i=0;i<*NUMELQ;i++)
119 {
120 if(H3D_PART[IPARTQ[i] - 1] == 1)
121 {
122 elem_id = IXQ[*NIXQ * i + *NIXQ - 1];
123 comp_id = IPART[*LIPART1 * (IPARTQ[i] - 1) + 3];
124
125 conn4[0] = IXQ[*NIXQ * i + 1];
126 conn4[1] = IXQ[*NIXQ * i + 2];
127 conn4[2] = IXQ[*NIXQ * i + 3];
128 conn4[3] = IXQ[*NIXQ * i + 4];
129
130
131
132 if(nbelems[i] != 0)
133 {
134 cpt_elem = 0;
135 nbelemwrite = nbelems[i];
136 comp_id = IPART[*LIPART1 * (IPARTQ[i] - 1) + 3];
137
139 H3D_ELEM_CONFIG_QUAD4, comp_id,
141 if( !rc ) throw rc;
142 }
143
144
145 cpt_elem++;
146 rc = Hyper3DElementWrite(h3d_file, elem_id, conn4);
147 if( !rc ) throw rc;
148
149
150
151
152 if (cpt_elem == nbelemwrite)
153 {
155 if( !rc ) throw rc;
156 }
157
158 }
159 }
160
161
162
163 } // end of try
164
165 catch(...) {
167 }
168 delete [] nbelems;
169
170//
171}
H3DFileInfo * h3d_file
H3D_ID node_poolname_id
bool rc
H3D_ID comp_id
H3D_ID quad_poolname_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_quads__()

void c_h3d_create_quads__ ( int * ITAB,
int * NUMNOD,
int * IPART,
int * LIPART1,
int * H3D_PART,
int * IXQ,
int * NIXQ,
int * NUMELQ,
int * IPARTQ )

Definition at line 177 of file c_h3d_create_quads.cpp.

179{c_h3d_create_quads_ (ITAB, NUMNOD, IPART, LIPART1, H3D_PART, IXQ, NIXQ, NUMELQ, IPARTQ);}