70{
71 try {
72
73
74
75 H3D_ID elem_id ;
76 H3D_ID RigidElem ;
77 int i,j,nsn;
78
79 char RBE2POOL[] = "Rbe2";
82
83 char RIGIDPOOL[] = "Rigid";
86
87 unsigned int elem_count = 1;
88 unsigned int *conn;
89 double *coef;
90 int *dof;
91
92 if(*COMPID_RBE2S != 0 && *NRBE2 != 0)
93 {
95 H3D_ELEM_CONFIG_RIGIDLINK, *COMPID_RBE2S,
97 for(i=0;i<*NRBE2;i++)
98 {
99 elem_id = IRBE2[*NRBE2L * i + 1];
100 nsn = IRBE2[*NRBE2L * i + 4];
102
103 conn =(unsigned int *)malloc(nsn*sizeof(unsigned int));
104 coef =(double *)malloc(nsn*sizeof(double));
105 dof =(int *)malloc(nsn*sizeof(int));
106
107 for(j=0;j<nsn;j++) conn[j] = ITAB[LRBE2[IRBE2[*NRBE2L * i ] + j ] - 1 ];
108
109 RigidElem = IRBE2[*NRBE2L * i + 1] ;
110
111 unsigned int conn1[1];
112 double coef1[1] = {1.0};
113 int dof1[1] = {6};
114 conn1[0] = ITAB[IRBE2[*NRBE2L * i + 2]-1];
115
119
120 free(conn);
121 free(coef);
122 free(dof);
123 }
126 }
127 else
128 {
129 for(i=0;i<*NRBE2;i++)
130 {
131 elem_id = IRBE2[*NRBE2L * i + 1];
132 nsn = IRBE2[*NRBE2L * i + 4];
134
135 conn =(unsigned int *)malloc(nsn*sizeof(unsigned int));
136 coef =(double *)malloc(nsn*sizeof(double));
137 dof =(int *)malloc(nsn*sizeof(int));
138
139 for(j=0;j<nsn;j++) conn[j] = ITAB[LRBE2[IRBE2[*NRBE2L * i ] + j ] - 1 ];
140
141 RigidElem = IRBE2[*NRBE2L * i + 1] ;
142
143 unsigned int conn1[1];
144 double coef1[1] = {1.0};
145 int dof1[1] = {6};
146 conn1[0] = ITAB[IRBE2[*NRBE2L * i + 2]-1];
147
148
150 H3D_ELEM_CONFIG_RIGIDLINK, RigidElem,
157
158 free(conn);
159 free(coef);
160 free(dof);
161
162 }
163 }
164
165
166 }
167
168 catch(...) {
170 }
171
172}
bool Hyper3DElement2Write(H3DFileInfo *h3d_file, H3D_ID id, unsigned int *inode, int *idof, double *icoeff, unsigned int num_inodes, unsigned int *dnode, int *ddof, double *dcoeff, unsigned int num_dnodes)
bool Hyper3DAddString(H3DFileInfo *h3d_file, const char *const string, H3D_ID *const str_id)
bool Hyper3DExportClearError(H3DFileInfo *h3d_file)
bool Hyper3DElement2End(H3DFileInfo *h3d_file)
bool Hyper3DElement2Begin(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)