27 #if defined(HAVE_CONFIG_H)
30 #if defined(HAVE_GL_GL_H)
32 #elif defined(HAVE_OPENGL_GL_H)
33 #include <OpenGL/gl.h>
81 std::vector<std::vector<std::vector<GLfloat> > > &kvp_v,
82 std::vector<std::vector<std::vector<GLfloat> > > &matp_v,
83 std::vector<std::vector<std::vector<GLfloat> > > &nmlp_v
87 GLfloat prod[3], thr, thr2 = 0.001f, mat2[3][3], kvec2[3][3],
88 vf2[3][3], a[3][3], bshift, vfave[3], norm[3];
89 std::vector<std::vector<GLfloat> > kvp_0, matp_0, nmlp_0;
94 for (i = 0; i < 3; i++) {
95 kvp_0.at(i).resize(3);
96 matp_0.at(i).resize(3);
97 nmlp_0.at(i).resize(3);
102 for (i = 0; i < 3; i++)norm[i] = 0.0f;
103 for (i = 0; i < 3; i++) {
104 norm[0] += (kvec1[1][i] - kvec1[2][i])*(kvec1[1][i] - kvec1[2][i]);
105 norm[1] += (kvec1[2][i] - kvec1[0][i])*(kvec1[2][i] - kvec1[0][i]);
106 norm[2] += (kvec1[0][i] - kvec1[1][i])*(kvec1[0][i] - kvec1[1][i]);
108 for (i = 0; i < 3; i++) {
109 if (norm[i] < 1.0e-10f*
brnrm_min)
return;
116 for (ibr = 0; ibr <
nbragg; ++ibr) {
118 thr =
brnrm[ibr] * 0.001f;
120 for (i = 0; i < 3; ++i)
121 prod[i] =
bragg[ibr][0] * kvec1[i][0]
122 +
bragg[ibr][1] * kvec1[i][1]
123 +
bragg[ibr][2] * kvec1[i][2];
125 for (i = 0; i < 3; ++i) {
126 for (j = 0; j < 3; ++j) {
127 a[i][j] = (
brnrm[ibr] - prod[sw[j]]) / (prod[sw[i]] - prod[sw[j]]);
130 i = (int)(0.5f * ((prod[sw[2]] /
brnrm[ibr]) + 1.0f));
131 bshift = -2.0f *(GLfloat)i;
133 if (
brnrm[ibr] + thr > prod[sw[2]])
continue;
135 if (
brnrm[ibr] < prod[sw[0]]) {
139 for (i = 0; i < 3; ++i) {
140 for (j = 0; j < 3; ++j) {
141 kvec2[i][j] = kvec1[sw[i]][j] + bshift *
bragg[ibr][j];
142 mat2[i][j] = mat1[sw[i]][j];
143 vf2[i][j] = vf1[sw[i]][j];
146 triangle(ibr + 1, mat2, kvec2, vf2, kvp_v, matp_v, nmlp_v);
149 else if (
brnrm[ibr] < prod[sw[1]]) {
153 for (i = 0; i < 3; ++i) {
154 kvec2[0][i] = kvec1[sw[0]][i];
155 kvec2[1][i] = kvec1[sw[0]][i] * a[0][1] + kvec1[sw[1]][i] * a[1][0];
156 kvec2[2][i] = kvec1[sw[0]][i] * a[0][2] + kvec1[sw[2]][i] * a[2][0];
158 mat2[0][i] = mat1[sw[0]][i];
159 mat2[1][i] = mat1[sw[0]][i] * a[0][1] + mat1[sw[1]][i] * a[1][0];
160 mat2[2][i] = mat1[sw[0]][i] * a[0][2] + mat1[sw[2]][i] * a[2][0];
162 vf2[0][i] = vf1[sw[0]][i];
163 vf2[1][i] = vf1[sw[0]][i] * a[0][1] + vf1[sw[1]][i] * a[1][0];
164 vf2[2][i] = vf1[sw[0]][i] * a[0][2] + vf1[sw[2]][i] * a[2][0];
166 triangle(ibr + 1, mat2, kvec2, vf2, kvp_v, matp_v, nmlp_v);
168 for (i = 0; i < 3; ++i) {
169 kvec2[0][i] = kvec1[sw[0]][i] * a[0][1] + kvec1[sw[1]][i] * a[1][0];
170 kvec2[1][i] = kvec1[sw[1]][i];
171 kvec2[2][i] = kvec1[sw[0]][i] * a[0][2] + kvec1[sw[2]][i] * a[2][0];
173 mat2[0][i] = mat1[sw[0]][i] * a[0][1] + mat1[sw[1]][i] * a[1][0];
174 mat2[1][i] = mat1[sw[1]][i];
175 mat2[2][i] = mat1[sw[0]][i] * a[0][2] + mat1[sw[2]][i] * a[2][0];
177 vf2[0][i] = vf1[sw[0]][i] * a[0][1] + vf1[sw[1]][i] * a[1][0];
178 vf2[1][i] = vf1[sw[1]][i];
179 vf2[2][i] = vf1[sw[0]][i] * a[0][2] + vf1[sw[2]][i] * a[2][0];
181 for (i = 0; i < 3; ++i)
for (j = 0; j < 3; ++j)
182 kvec2[i][j] += bshift *
bragg[ibr][j];
183 triangle(ibr + 1, mat2, kvec2, vf2, kvp_v, matp_v, nmlp_v);
185 for (i = 0; i < 3; ++i) {
186 kvec2[0][i] = kvec1[sw[2]][i];
187 kvec2[1][i] = kvec1[sw[1]][i];
188 kvec2[2][i] = kvec1[sw[0]][i] * a[0][2] + kvec1[sw[2]][i] * a[2][0];
190 mat2[0][i] = mat1[sw[2]][i];
191 mat2[1][i] = mat1[sw[1]][i];
192 mat2[2][i] = mat1[sw[0]][i] * a[0][2] + mat1[sw[2]][i] * a[2][0];
194 vf2[0][i] = vf1[sw[2]][i];
195 vf2[1][i] = vf1[sw[1]][i];
196 vf2[2][i] = vf1[sw[0]][i] * a[0][2] + vf1[sw[2]][i] * a[2][0];
198 for (i = 0; i < 3; ++i)
for (j = 0; j < 3; ++j)
199 kvec2[i][j] += bshift *
bragg[ibr][j];
200 triangle(ibr + 1, mat2, kvec2, vf2, kvp_v, matp_v, nmlp_v);
203 else if (
brnrm[ibr] < prod[sw[2]]) {
207 for (i = 0; i < 3; ++i) {
208 kvec2[0][i] = kvec1[sw[0]][i] * a[0][2] + kvec1[sw[2]][i] * a[2][0];
209 kvec2[1][i] = kvec1[sw[1]][i] * a[1][2] + kvec1[sw[2]][i] * a[2][1];
210 kvec2[2][i] = kvec1[sw[2]][i];
212 mat2[0][i] = mat1[sw[0]][i] * a[0][2] + mat1[sw[2]][i] * a[2][0];
213 mat2[1][i] = mat1[sw[1]][i] * a[1][2] + mat1[sw[2]][i] * a[2][1];
214 mat2[2][i] = mat1[sw[2]][i];
216 vf2[0][i] = vf1[sw[0]][i] * a[0][2] + vf1[sw[2]][i] * a[2][0];
217 vf2[1][i] = vf1[sw[1]][i] * a[1][2] + vf1[sw[2]][i] * a[2][1];
218 vf2[2][i] = vf1[sw[2]][i];
220 for (i = 0; i < 3; ++i)
for (j = 0; j < 3; ++j)
221 kvec2[i][j] += bshift *
bragg[ibr][j];
222 triangle(ibr + 1, mat2, kvec2, vf2, kvp_v, matp_v, nmlp_v);
224 for (i = 0; i < 3; ++i) {
225 kvec2[0][i] = kvec1[sw[0]][i];
226 kvec2[1][i] = kvec1[sw[1]][i];
227 kvec2[2][i] = kvec1[sw[0]][i] * a[0][2] + kvec1[sw[2]][i] * a[2][0];
229 mat2[0][i] = mat1[sw[0]][i];
230 mat2[1][i] = mat1[sw[1]][i];
231 mat2[2][i] = mat1[sw[0]][i] * a[0][2] + mat1[sw[2]][i] * a[2][0];
233 vf2[0][i] = vf1[sw[0]][i];
234 vf2[1][i] = vf1[sw[1]][i];
235 vf2[2][i] = vf1[sw[0]][i] * a[0][2] + vf1[sw[2]][i] * a[2][0];
237 triangle(ibr + 1, mat2, kvec2, vf2, kvp_v, matp_v, nmlp_v);
239 for (i = 0; i < 3; ++i) {
240 kvec2[0][i] = kvec1[sw[1]][i] * a[1][2] + kvec1[sw[2]][i] * a[2][1];
241 kvec2[1][i] = kvec1[sw[1]][i];
242 kvec2[2][i] = kvec1[sw[0]][i] * a[0][2] + kvec1[sw[2]][i] * a[2][0];
244 mat2[0][i] = mat1[sw[1]][i] * a[1][2] + mat1[sw[2]][i] * a[2][1];
245 mat2[1][i] = mat1[sw[1]][i];
246 mat2[2][i] = mat1[sw[0]][i] * a[0][2] + mat1[sw[2]][i] * a[2][0];
248 vf2[0][i] = vf1[sw[1]][i] * a[1][2] + vf1[sw[2]][i] * a[2][1];
249 vf2[1][i] = vf1[sw[1]][i];
250 vf2[2][i] = vf1[sw[0]][i] * a[0][2] + vf1[sw[2]][i] * a[2][0];
252 triangle(ibr + 1, mat2, kvec2, vf2, kvp_v, matp_v, nmlp_v);
265 normal_vec(kvec1[0], kvec1[1], kvec1[2], norm);
266 for (i = 0; i < 3; ++i) {
268 for (j = 0; j < 3; ++j) vfave[i] += vf1[j][i];
271 for (i = 0; i < 3; ++i) prod[0] += vfave[i] * norm[i];
273 if (prod[0] < 0.0f) {
274 for (i = 0; i < 3; ++i) {
275 for (j = 0; j < 3; ++j) {
276 kvp_0.at(i).at(j) = kvec1[2 - i][j];
277 matp_0.at(i).at(j) = mat1[2 - i][j];
278 nmlp_0.at(i).at(j) = vf1[2 - i][j];
283 for (i = 0; i < 3; ++i) {
284 for (j = 0; j < 3; ++j) {
285 kvp_0.at(i).at(j) = kvec1[i][j];
286 matp_0.at(i).at(j) = mat1[i][j];
287 nmlp_0.at(i).at(j) = vf1[i][j];
291 kvp_v.push_back(kvp_0);
292 matp_v.push_back(matp_0);
293 nmlp_v.push_back(nmlp_0);
319 static void tetrahedron(
324 std::vector<std::vector<std::vector<GLfloat> > > &kvp_v,
325 std::vector<std::vector<std::vector<GLfloat> > > &matp_v,
326 std::vector<std::vector<std::vector<GLfloat> > > &nmlp_v
330 GLfloat eig2[4], mat2[4][3], kvec2[4][3], vf2[4][3], a[4][4],
331 kvec3[3][3], mat3[3][3], vf3[3][3], vol, thr = 0.000f;
333 for (it = 0; it < 6; ++it) {
337 for (i = 0; i < 4; ++i) {
338 eig2[i] = eig1[
corner[it][i]];
339 for (j = 0; j < 3; ++j) {
340 mat2[i][j] = mat1[
corner[it][i]][j];
341 vf2[i][j] = vf1[
corner[it][i]][j];
346 for (j = 0; j < 3; ++j)
347 kvec2[i][j] =
bvec[0][j] * kvec1[
corner[it][i]][0]
353 for (i = 0; i < 4; ++i) {
354 for (j = 0; j < 4; ++j) {
355 a[i][j] = (0.0f - eig2[sw[j]]) / (eig2[sw[i]] - eig2[sw[j]]);
361 if (eig2[sw[0]] <= 0.0 && 0.0 < eig2[sw[1]]) {
362 for (i = 0; i < 3; ++i) {
363 kvec3[0][i] = kvec2[sw[0]][i] * a[0][1] + kvec2[sw[1]][i] * a[1][0];
364 kvec3[1][i] = kvec2[sw[0]][i] * a[0][2] + kvec2[sw[2]][i] * a[2][0];
365 kvec3[2][i] = kvec2[sw[0]][i] * a[0][3] + kvec2[sw[3]][i] * a[3][0];
367 mat3[0][i] = mat2[sw[0]][i] * a[0][1] + mat2[sw[1]][i] * a[1][0];
368 mat3[1][i] = mat2[sw[0]][i] * a[0][2] + mat2[sw[2]][i] * a[2][0];
369 mat3[2][i] = mat2[sw[0]][i] * a[0][3] + mat2[sw[3]][i] * a[3][0];
371 vf3[0][i] = vf2[sw[0]][i] * a[0][1] + vf2[sw[1]][i] * a[1][0];
372 vf3[1][i] = vf2[sw[0]][i] * a[0][2] + vf2[sw[2]][i] * a[2][0];
373 vf3[2][i] = vf2[sw[0]][i] * a[0][3] + vf2[sw[3]][i] * a[3][0];
376 vol = a[1][0] * a[2][0] * a[3][0];
377 triangle(0, mat3, kvec3, vf3, kvp_v, matp_v, nmlp_v);
379 else if (eig2[sw[1]] <= 0.0 && 0.0 < eig2[sw[2]]) {
380 for (i = 0; i < 3; ++i) {
381 kvec3[0][i] = kvec2[sw[0]][i] * a[0][2] + kvec2[sw[2]][i] * a[2][0];
382 kvec3[1][i] = kvec2[sw[0]][i] * a[0][3] + kvec2[sw[3]][i] * a[3][0];
383 kvec3[2][i] = kvec2[sw[1]][i] * a[1][2] + kvec2[sw[2]][i] * a[2][1];
385 mat3[0][i] = mat2[sw[0]][i] * a[0][2] + mat2[sw[2]][i] * a[2][0];
386 mat3[1][i] = mat2[sw[0]][i] * a[0][3] + mat2[sw[3]][i] * a[3][0];
387 mat3[2][i] = mat2[sw[1]][i] * a[1][2] + mat2[sw[2]][i] * a[2][1];
389 vf3[0][i] = vf2[sw[0]][i] * a[0][2] + vf2[sw[2]][i] * a[2][0];
390 vf3[1][i] = vf2[sw[0]][i] * a[0][3] + vf2[sw[3]][i] * a[3][0];
391 vf3[2][i] = vf2[sw[1]][i] * a[1][2] + vf2[sw[2]][i] * a[2][1];
394 vol = a[1][2] * a[2][0] * a[3][0];
395 triangle(0, mat3, kvec3, vf3, kvp_v, matp_v, nmlp_v);
397 for (i = 0; i < 3; ++i) {
398 kvec3[0][i] = kvec2[sw[1]][i] * a[1][3] + kvec2[sw[3]][i] * a[3][1];
399 kvec3[1][i] = kvec2[sw[0]][i] * a[0][3] + kvec2[sw[3]][i] * a[3][0];
400 kvec3[2][i] = kvec2[sw[1]][i] * a[1][2] + kvec2[sw[2]][i] * a[2][1];
402 mat3[0][i] = mat2[sw[1]][i] * a[1][3] + mat2[sw[3]][i] * a[3][1];
403 mat3[1][i] = mat2[sw[0]][i] * a[0][3] + mat2[sw[3]][i] * a[3][0];
404 mat3[2][i] = mat2[sw[1]][i] * a[1][2] + mat2[sw[2]][i] * a[2][1];
406 vf3[0][i] = vf2[sw[1]][i] * a[1][3] + vf2[sw[3]][i] * a[3][1];
407 vf3[1][i] = vf2[sw[0]][i] * a[0][3] + vf2[sw[3]][i] * a[3][0];
408 vf3[2][i] = vf2[sw[1]][i] * a[1][2] + vf2[sw[2]][i] * a[2][1];
411 vol = a[1][3] * a[3][0] * a[2][1];
412 triangle(0, mat3, kvec3, vf3, kvp_v, matp_v, nmlp_v);
414 else if (eig2[sw[2]] <= 0.0 && 0.0 < eig2[sw[3]]) {
415 for (i = 0; i < 3; ++i) {
416 kvec3[0][i] = kvec2[sw[3]][i] * a[3][0] + kvec2[sw[0]][i] * a[0][3];
417 kvec3[1][i] = kvec2[sw[3]][i] * a[3][1] + kvec2[sw[1]][i] * a[1][3];
418 kvec3[2][i] = kvec2[sw[3]][i] * a[3][2] + kvec2[sw[2]][i] * a[2][3];
420 mat3[0][i] = mat2[sw[3]][i] * a[3][0] + mat2[sw[0]][i] * a[0][3];
421 mat3[1][i] = mat2[sw[3]][i] * a[3][1] + mat2[sw[1]][i] * a[1][3];
422 mat3[2][i] = mat2[sw[3]][i] * a[3][2] + mat2[sw[2]][i] * a[2][3];
424 vf3[0][i] = vf2[sw[3]][i] * a[3][0] + vf2[sw[0]][i] * a[0][3];
425 vf3[1][i] = vf2[sw[3]][i] * a[3][1] + vf2[sw[1]][i] * a[1][3];
426 vf3[2][i] = vf2[sw[3]][i] * a[3][2] + vf2[sw[2]][i] * a[2][3];
429 vol = a[0][3] * a[1][3] * a[2][3];
430 triangle(0, mat3, kvec3, vf3, kvp_v, matp_v, nmlp_v);
443 int ntri0, ib, i0, i1, j0, start[3], last[3];
445 std::vector < std::vector<std::vector<std::vector<GLfloat> > > > kvp_v, matp_v, nmlp_v;
453 *
terminal << wxT(
" ## First Brillouin zone mode #######\n");
454 for (i0 = 0; i0 < 3; ++i0) {
455 start[i0] =
ng[i0] / 2 -
ng[i0];
456 last[i0] =
ng[i0] / 2;
461 *
terminal << wxT(
" ## Premitive Brillouin zone mode #######\n");
462 for (i0 = 0; i0 < 3; ++i0) {
467 *
terminal << wxT(
" Computing patch ...\n");
468 *
terminal << wxT(
" band # of patchs\n");
470 for (ib = 0; ib <
nb; ++ib) {
472 #pragma omp parallel default(none) \
473 shared(nb,start,last,ng,ng0,eig,vf,EF,mat,shiftk,kvp_v,matp_v,nmlp_v, \
474 corner, bvec, fbz, nbragg, bragg, brnrm, brnrm_min,ib) \
475 private(j0,i0,i1,ithread)
477 int i, j, i2, j1, j2, ii0, ii1, ii2;
478 GLfloat kvec1[8][3], mat1[8][3], eig1[8], vf1[8][3];
481 kvp_v.at(ithread).resize(0);
482 matp_v.at(ithread).resize(0);
483 nmlp_v.at(ithread).resize(0);
485 #pragma omp for nowait schedule(static, 1)
486 for (j0 = start[0]; j0 < last[0]; ++j0) {
487 for (j1 = start[1]; j1 < last[1]; ++j1) {
488 for (j2 = start[2]; j2 < last[2]; ++j2) {
497 kvec1[0][0] = (GLfloat)i0 / (GLfloat)
ng[0];
498 kvec1[1][0] = (GLfloat)i0 / (GLfloat)
ng[0];
499 kvec1[2][0] = (GLfloat)i0 / (GLfloat)
ng[0];
500 kvec1[3][0] = (GLfloat)i0 / (GLfloat)
ng[0];
501 kvec1[4][0] = (GLfloat)ii0 / (GLfloat)
ng[0];
502 kvec1[5][0] = (GLfloat)ii0 / (GLfloat)
ng[0];
503 kvec1[6][0] = (GLfloat)ii0 / (GLfloat)
ng[0];
504 kvec1[7][0] = (GLfloat)ii0 / (GLfloat)
ng[0];
506 kvec1[0][1] = (GLfloat)i1 / (GLfloat)
ng[1];
507 kvec1[1][1] = (GLfloat)i1 / (GLfloat)
ng[1];
508 kvec1[2][1] = (GLfloat)ii1 / (GLfloat)
ng[1];
509 kvec1[3][1] = (GLfloat)ii1 / (GLfloat)
ng[1];
510 kvec1[4][1] = (GLfloat)i1 / (GLfloat)
ng[1];
511 kvec1[5][1] = (GLfloat)i1 / (GLfloat)
ng[1];
512 kvec1[6][1] = (GLfloat)ii1 / (GLfloat)
ng[1];
513 kvec1[7][1] = (GLfloat)ii1 / (GLfloat)
ng[1];
515 kvec1[0][2] = (GLfloat)i2 / (GLfloat)
ng[2];
516 kvec1[1][2] = (GLfloat)ii2 / (GLfloat)
ng[2];
517 kvec1[2][2] = (GLfloat)i2 / (GLfloat)
ng[2];
518 kvec1[3][2] = (GLfloat)ii2 / (GLfloat)
ng[2];
519 kvec1[4][2] = (GLfloat)i2 / (GLfloat)
ng[2];
520 kvec1[5][2] = (GLfloat)ii2 / (GLfloat)
ng[2];
521 kvec1[6][2] = (GLfloat)i2 / (GLfloat)
ng[2];
522 kvec1[7][2] = (GLfloat)ii2 / (GLfloat)
ng[2];
524 for (i = 0; i < 8; i++)
525 for (j = 0; j < 3; j++)
526 kvec1[i][j] = kvec1[i][j] + (GLfloat)
shiftk[j] / (GLfloat)(2 *
ng0[j]);
535 eig1[0] =
eig[ib][i0][i1][i2] -
EF;
536 eig1[1] =
eig[ib][i0][i1][ii2] -
EF;
537 eig1[2] =
eig[ib][i0][ii1][i2] -
EF;
538 eig1[3] =
eig[ib][i0][ii1][ii2] -
EF;
539 eig1[4] =
eig[ib][ii0][i1][i2] -
EF;
540 eig1[5] =
eig[ib][ii0][i1][ii2] -
EF;
541 eig1[6] =
eig[ib][ii0][ii1][i2] -
EF;
542 eig1[7] =
eig[ib][ii0][ii1][ii2] -
EF;
544 for (j = 0; j < 3; j++) {
545 mat1[0][j] =
mat[ib][i0][i1][i2][j];
546 mat1[1][j] =
mat[ib][i0][i1][ii2][j];
547 mat1[2][j] =
mat[ib][i0][ii1][i2][j];
548 mat1[3][j] =
mat[ib][i0][ii1][ii2][j];
549 mat1[4][j] =
mat[ib][ii0][i1][i2][j];
550 mat1[5][j] =
mat[ib][ii0][i1][ii2][j];
551 mat1[6][j] =
mat[ib][ii0][ii1][i2][j];
552 mat1[7][j] =
mat[ib][ii0][ii1][ii2][j];
554 vf1[0][j] =
vf[ib][i0][i1][i2][j];
555 vf1[1][j] =
vf[ib][i0][i1][ii2][j];
556 vf1[2][j] =
vf[ib][i0][ii1][i2][j];
557 vf1[3][j] =
vf[ib][i0][ii1][ii2][j];
558 vf1[4][j] =
vf[ib][ii0][i1][i2][j];
559 vf1[5][j] =
vf[ib][ii0][i1][ii2][j];
560 vf1[6][j] =
vf[ib][ii0][ii1][i2][j];
561 vf1[7][j] =
vf[ib][ii0][ii1][ii2][j];
564 tetrahedron(eig1, mat1, kvec1, vf1,
565 kvp_v.at(ithread), matp_v.at(ithread), nmlp_v.at(ithread));
574 for (ithread = 0; ithread <
nthreads; ithread++)
575 ntri[ib] += kvp_v.at(ithread).size();
576 *
terminal << wxString::Format(wxT(
" %d %d\n"), ib + 1,
ntri[ib]);
580 matp[ib] =
new GLfloat * *[
ntri[ib]];
581 clr[ib] =
new GLfloat[12 *
ntri[ib]];
582 kvp[ib] =
new GLfloat * *[
ntri[ib]];
583 nmlp[ib] =
new GLfloat * *[
ntri[ib]];
584 arw[ib] =
new GLfloat * **[
ntri[ib]];
588 for (i0 = 0; i0 <
ntri[ib]; ++i0) {
589 matp[ib][i0] =
new GLfloat * [3];
590 kvp[ib][i0] =
new GLfloat * [3];
591 nmlp[ib][i0] =
new GLfloat * [3];
592 arw[ib][i0] =
new GLfloat * *[3];
593 for (i1 = 0; i1 < 3; ++i1) {
594 matp[ib][i0][i1] =
new GLfloat[3];
595 kvp[ib][i0][i1] =
new GLfloat[3];
596 nmlp[ib][i0][i1] =
new GLfloat[3];
597 arw[ib][i0][i1] =
new GLfloat * [2];
598 for (j0 = 0; j0 < 2; ++j0)
599 arw[ib][i0][i1][j0] =
new GLfloat[3];
606 for (ithread = 0; ithread <
nthreads; ithread++) {
607 for (i0 = 0; i0 < kvp_v.at(ithread).size(); ++i0) {
608 for (i1 = 0; i1 < 3; ++i1) {
609 for (j0 = 0; j0 < 3; ++j0){
610 kvp[ib][ntri0][i1][j0] = kvp_v.at(ithread).at(i0).at(i1).at(j0);
611 matp[ib][ntri0][i1][j0] = matp_v.at(ithread).at(i0).at(i1).at(j0);
612 nmlp[ib][ntri0][i1][j0] = nmlp_v.at(ithread).at(i0).at(i1).at(j0);