43 namespace LocalRegions
63 StdExpansion (LibUtilities::StdTetData::
getNumberOfCoefficients(Ba.GetNumModes(),Bb.GetNumModes(),Bc.GetNumModes()),3,Ba,Bb,Bc),
64 StdExpansion3D(LibUtilities::StdTetData::
getNumberOfCoefficients(Ba.GetNumModes(),Bb.GetNumModes(),Bc.GetNumModes()),Ba,Bb,Bc),
65 StdRegions::StdTetExp(Ba,Bb,Bc),
69 boost::bind(&
TetExp::CreateMatrix, this, _1),
70 std::string(
"TetExpMatrix")),
71 m_staticCondMatrixManager(
72 boost::bind(&
TetExp::CreateStaticCondMatrix, this, _1),
73 std::string(
"TetExpStaticCondMatrix"))
84 StdRegions::StdTetExp(T),
87 m_matrixManager(T.m_matrixManager),
88 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
115 const Array<OneD, const NekDouble> &inarray)
117 int nquad0 =
m_base[0]->GetNumPoints();
118 int nquad1 =
m_base[1]->GetNumPoints();
119 int nquad2 =
m_base[2]->GetNumPoints();
122 Array<OneD,NekDouble> tmp(nquad0*nquad1*nquad2);
156 const Array<OneD, const NekDouble> &inarray,
157 Array<OneD, NekDouble> &out_d0,
158 Array<OneD, NekDouble> &out_d1,
159 Array<OneD, NekDouble> &out_d2)
161 int TotPts =
m_base[0]->GetNumPoints()*
m_base[1]->GetNumPoints()*
162 m_base[2]->GetNumPoints();
164 Array<TwoD, const NekDouble> df =
166 Array<OneD,NekDouble> Diff0 = Array<OneD,NekDouble>(3*TotPts);
167 Array<OneD,NekDouble> Diff1 = Diff0 + TotPts;
168 Array<OneD,NekDouble> Diff2 = Diff1 + TotPts;
174 if(out_d0.num_elements())
176 Vmath::Vmul (TotPts,&df[0][0],1,&Diff0[0],1, &out_d0[0], 1);
177 Vmath::Vvtvp (TotPts,&df[1][0],1,&Diff1[0],1, &out_d0[0], 1,&out_d0[0],1);
178 Vmath::Vvtvp (TotPts,&df[2][0],1,&Diff2[0],1, &out_d0[0], 1,&out_d0[0],1);
181 if(out_d1.num_elements())
183 Vmath::Vmul (TotPts,&df[3][0],1,&Diff0[0],1, &out_d1[0], 1);
184 Vmath::Vvtvp (TotPts,&df[4][0],1,&Diff1[0],1, &out_d1[0], 1,&out_d1[0],1);
185 Vmath::Vvtvp (TotPts,&df[5][0],1,&Diff2[0],1, &out_d1[0], 1,&out_d1[0],1);
188 if(out_d2.num_elements())
190 Vmath::Vmul (TotPts,&df[6][0],1,&Diff0[0],1, &out_d2[0], 1);
191 Vmath::Vvtvp (TotPts,&df[7][0],1,&Diff1[0],1, &out_d2[0], 1, &out_d2[0],1);
192 Vmath::Vvtvp (TotPts,&df[8][0],1,&Diff2[0],1, &out_d2[0], 1, &out_d2[0],1);
197 if(out_d0.num_elements())
199 Vmath::Smul (TotPts,df[0][0],&Diff0[0],1, &out_d0[0], 1);
200 Blas::Daxpy (TotPts,df[1][0],&Diff1[0],1, &out_d0[0], 1);
201 Blas::Daxpy (TotPts,df[2][0],&Diff2[0],1, &out_d0[0], 1);
204 if(out_d1.num_elements())
206 Vmath::Smul (TotPts,df[3][0],&Diff0[0],1, &out_d1[0], 1);
207 Blas::Daxpy (TotPts,df[4][0],&Diff1[0],1, &out_d1[0], 1);
208 Blas::Daxpy (TotPts,df[5][0],&Diff2[0],1, &out_d1[0], 1);
211 if(out_d2.num_elements())
213 Vmath::Smul (TotPts,df[6][0],&Diff0[0],1, &out_d2[0], 1);
214 Blas::Daxpy (TotPts,df[7][0],&Diff1[0],1, &out_d2[0], 1);
215 Blas::Daxpy (TotPts,df[8][0],&Diff2[0],1, &out_d2[0], 1);
234 const Array<OneD, const NekDouble> & inarray,
235 Array<OneD,NekDouble> &outarray)
237 if((
m_base[0]->Collocation())&&(
m_base[1]->Collocation())&&(
m_base[2]->Collocation()))
288 const Array<OneD, const NekDouble> &inarray,
289 Array<OneD, NekDouble> &outarray)
295 const Array<OneD, const NekDouble> &inarray,
296 Array<OneD, NekDouble> &outarray)
298 const int nquad0 =
m_base[0]->GetNumPoints();
299 const int nquad1 =
m_base[1]->GetNumPoints();
300 const int nquad2 =
m_base[2]->GetNumPoints();
301 const int order0 =
m_base[0]->GetNumModes();
302 const int order1 =
m_base[1]->GetNumModes();
303 Array<OneD, NekDouble> wsp(nquad1*nquad2*order0 +
304 nquad2*order0*(order1+1)/2);
305 Array<OneD, NekDouble> tmp(nquad0*nquad1*nquad2);
347 const Array<OneD, const NekDouble> &inarray,
348 Array<OneD, NekDouble> &outarray)
350 const int nquad0 =
m_base[0]->GetNumPoints();
351 const int nquad1 =
m_base[1]->GetNumPoints();
352 const int nquad2 =
m_base[2]->GetNumPoints();
353 const int order0 =
m_base[0]->GetNumModes ();
354 const int order1 =
m_base[1]->GetNumModes ();
355 const int nqtot = nquad0*nquad1*nquad2;
358 const Array<OneD, const NekDouble> &z0 =
m_base[0]->GetZ();
359 const Array<OneD, const NekDouble> &z1 =
m_base[1]->GetZ();
360 const Array<OneD, const NekDouble> &z2 =
m_base[2]->GetZ();
362 Array<OneD, NekDouble> h0 (nqtot);
363 Array<OneD, NekDouble> h1 (nqtot);
364 Array<OneD, NekDouble> h2 (nqtot);
365 Array<OneD, NekDouble> h3 (nqtot);
366 Array<OneD, NekDouble> tmp1 (nqtot);
367 Array<OneD, NekDouble> tmp2 (nqtot);
368 Array<OneD, NekDouble> tmp3 (nqtot);
369 Array<OneD, NekDouble> tmp4 (nqtot);
370 Array<OneD, NekDouble> tmp5 (nqtot);
372 Array<OneD, NekDouble> wsp (nquad1*nquad2*order0 +
373 nquad2*order0*(order1+1)/2);
375 const Array<TwoD, const NekDouble>& df =
382 Vmath::Vmul(nqtot,&df[3*dir][0], 1,tmp1.get(),1,tmp2.get(),1);
383 Vmath::Vmul(nqtot,&df[3*dir+1][0],1,tmp1.get(),1,tmp3.get(),1);
384 Vmath::Vmul(nqtot,&df[3*dir+2][0],1,tmp1.get(),1,tmp4.get(),1);
388 Vmath::Smul(nqtot, df[3*dir ][0],tmp1.get(),1,tmp2.get(), 1);
389 Vmath::Smul(nqtot, df[3*dir+1][0],tmp1.get(),1,tmp3.get(), 1);
390 Vmath::Smul(nqtot, df[3*dir+2][0],tmp1.get(),1,tmp4.get(), 1);
393 const int nq01 = nquad0*nquad1;
394 const int nq12 = nquad1*nquad2;
396 for(j = 0; j < nquad2; ++j)
398 for(i = 0; i < nquad1; ++i)
401 &h0[0]+i*nquad0 + j*nq01,1);
403 &h1[0]+i*nquad0 + j*nq01,1);
405 &h2[0]+i*nquad0 + j*nq01,1);
407 &h3[0]+i*nquad0 + j*nq01,1);
411 for(i = 0; i < nquad0; i++)
413 Blas::Dscal(nq12, 1+z0[i], &h1[0]+i, nquad0);
418 &tmp3[0], 1, &h1[0], 1,
421 &tmp5[0], 1, &tmp5[0], 1);
431 &tmp4[0], 1, &h3[0], 1,
463 const Array<OneD, const NekDouble> &Lcoord,
464 const Array<OneD, const NekDouble> &physvals)
475 const Array<OneD, const NekDouble> &coord,
476 const Array<OneD, const NekDouble> & physvals)
480 Array<OneD,NekDouble> Lcoord = Array<OneD,NekDouble>(3);
483 m_geom->GetLocCoords(coord,Lcoord);
493 const Array<OneD, const NekDouble> &Lcoords,
494 Array<OneD,NekDouble> &coords)
498 ASSERTL1(Lcoords[0] <= -1.0 && Lcoords[0] >= 1.0 &&
499 Lcoords[1] <= -1.0 && Lcoords[1] >= 1.0 &&
500 Lcoords[2] <= -1.0 && Lcoords[2] >= 1.0,
501 "Local coordinates are not in region [-1,1]");
505 for(i = 0; i <
m_geom->GetCoordim(); ++i)
507 coords[i] =
m_geom->GetCoord(i,Lcoords);
512 Array<OneD, NekDouble> &coords_0,
513 Array<OneD, NekDouble> &coords_1,
514 Array<OneD, NekDouble> &coords_2)
534 return m_geom->GetCoordim();
541 const std::vector<unsigned int > &nummodes,
542 const int mode_offset,
545 int data_order0 = nummodes[mode_offset];
546 int fillorder0 = min(
m_base[0]->GetNumModes(),data_order0);
547 int data_order1 = nummodes[mode_offset+1];
548 int order1 =
m_base[1]->GetNumModes();
549 int fillorder1 = min(order1,data_order1);
550 int data_order2 = nummodes[mode_offset+2];
551 int order2 =
m_base[2]->GetNumModes();
552 int fillorder2 = min(order2,data_order2);
564 "Extraction routine not set up for this basis");
567 "Extraction routine not set up for this basis");
570 for(j = 0; j < fillorder0; ++j)
572 for(i = 0; i < fillorder1-j; ++i)
576 cnt += data_order2-j-i;
581 for(i = fillorder1-j; i < data_order1-j; ++i)
583 cnt += data_order2-j-i;
586 for(i = fillorder1-j; i < order1-j; ++i)
595 ASSERTL0(
false,
"basis is either not set up or not "
607 const Array<OneD, const NekDouble> &inarray,
608 Array<OneD, NekDouble> &outarray,
620 const Array<OneD, const NekDouble> &inarray,
621 Array<OneD, NekDouble> &outarray,
624 int nquad0 =
m_base[0]->GetNumPoints();
625 int nquad1 =
m_base[1]->GetNumPoints();
626 int nquad2 =
m_base[2]->GetNumPoints();
629 Array<OneD,NekDouble> o_tmp2(FaceExp->GetTotPoints());
630 Array<OneD,NekDouble> o_tmp3;
642 Vmath::Vcopy(nquad0*nquad1,inarray.get(),1,o_tmp.get(),1);
645 m_base[1]->GetPointsKey(),
647 FaceExp->GetBasis(0)->GetPointsKey(),
648 FaceExp->GetBasis(1)->GetPointsKey(),
655 for (
int k=0; k<nquad2; k++)
657 Vmath::Vcopy(nquad0,inarray.get()+(nquad0*nquad1*k),1,o_tmp.get()+(k*nquad0),1);
661 m_base[2]->GetPointsKey(),
663 FaceExp->GetBasis(0)->GetPointsKey(),
664 FaceExp->GetBasis(1)->GetPointsKey(),
671 Vmath::Vcopy(nquad1*nquad2,inarray.get()+(nquad0-1),nquad0,o_tmp.get(),1);
674 FaceExp->GetBasis(0)->GetPointsKey(),FaceExp->GetBasis(1)->GetPointsKey(),o_tmp2.get());
680 Vmath::Vcopy(nquad1*nquad2,inarray.get(),nquad0,o_tmp.get(),1);
683 FaceExp->GetBasis(0)->GetPointsKey(),FaceExp->GetBasis(1)->GetPointsKey(),o_tmp2.get());
687 ASSERTL0(
false,
"face value (> 3) is out of range");
691 int nq1 = FaceExp->GetNumPoints(0);
692 int nq2 = FaceExp->GetNumPoints(1);
694 if ((
int)orient == 7)
696 for (
int j = 0; j < nq2; ++j)
698 Vmath::Vcopy(nq1, o_tmp2.get()+((j+1)*nq1-1), -1, outarray.get()+j*nq1, 1);
703 Vmath::Vcopy(nq1*nq2, o_tmp2.get(), 1, outarray.get(), 1);
718 const Array<TwoD, const NekDouble> &df = geomFactors->GetDerivFactors(ptsKeys);
719 const Array<OneD, const NekDouble> &jac = geomFactors->GetJac(ptsKeys);
730 m_faceNormals[face] = Array<OneD, Array<OneD, NekDouble> >(vCoordDim);
731 Array<OneD, Array<OneD, NekDouble> > &normal =
m_faceNormals[face];
732 for (i = 0; i < vCoordDim; ++i)
734 normal[i] = Array<OneD, NekDouble>(nq_face);
748 for (i = 0; i < vCoordDim; ++i)
750 normal[i][0] = -df[3*i+2][0];
757 for (i = 0; i < vCoordDim; ++i)
759 normal[i][0] = -df[3*i+1][0];
766 for (i = 0; i < vCoordDim; ++i)
768 normal[i][0] = df[3*i][0]+df[3*i+1][0]+
776 for(i = 0; i < vCoordDim; ++i)
778 normal[i][0] = -df[3*i][0];
783 ASSERTL0(
false,
"face is out of range (edge < 3)");
788 for (i = 0; i < vCoordDim; ++i)
790 fac += normal[i][0]*normal[i][0];
794 for (i = 0; i < vCoordDim; ++i)
804 int nq0 = ptsKeys[0].GetNumPoints();
805 int nq1 = ptsKeys[1].GetNumPoints();
806 int nq2 = ptsKeys[2].GetNumPoints();
827 Array<OneD,NekDouble> normals(vCoordDim*nqtot, 0.0);
836 for(j = 0; j < nq01; ++j)
838 normals[j] = -df[2][j]*jac[j];
839 normals[nqtot+j] = -df[5][j]*jac[j];
840 normals[2*nqtot+j] = -df[8][j]*jac[j];
843 points0 = ptsKeys[0];
844 points1 = ptsKeys[1];
850 for (j = 0; j < nq0; ++j)
852 for(k = 0; k < nq2; ++k)
856 -df[1][tmp]*jac[tmp];
857 normals[nqtot+j+k*nq0] =
858 -df[4][tmp]*jac[tmp];
859 normals[2*nqtot+j+k*nq0] =
860 -df[7][tmp]*jac[tmp];
864 points0 = ptsKeys[0];
865 points1 = ptsKeys[2];
871 for (j = 0; j < nq1; ++j)
873 for(k = 0; k < nq2; ++k)
875 int tmp = nq0-1+nq0*j+nq01*k;
877 (df[0][tmp]+df[1][tmp]+df[2][tmp])*
879 normals[nqtot+j+k*nq1] =
880 (df[3][tmp]+df[4][tmp]+df[5][tmp])*
882 normals[2*nqtot+j+k*nq1] =
883 (df[6][tmp]+df[7][tmp]+df[8][tmp])*
888 points0 = ptsKeys[1];
889 points1 = ptsKeys[2];
895 for (j = 0; j < nq1; ++j)
897 for(k = 0; k < nq2; ++k)
899 int tmp = j*nq0+nq01*k;
901 -df[0][tmp]*jac[tmp];
902 normals[nqtot+j+k*nq1] =
903 -df[3][tmp]*jac[tmp];
904 normals[2*nqtot+j+k*nq1] =
905 -df[6][tmp]*jac[tmp];
909 points0 = ptsKeys[1];
910 points1 = ptsKeys[2];
915 ASSERTL0(
false,
"face is out of range (face < 3)");
918 Array<OneD,NekDouble> work (nq_face, 0.0);
924 Vmath::Sdiv(nq_face, 1.0, &work[0], 1, &work[0], 1);
927 for(i = 0; i < vCoordDim; ++i)
934 Vmath::Vmul(nq_face,work,1,normal[i],1,normal[i],1);
941 Vmath::Vvtvp(nq_face,normal[i],1,normal[i],1,work,1,work,1);
949 Vmath::Vmul(nq_face,normal[i],1,work,1,normal[i],1);
958 const Array<OneD, const NekDouble> &inarray,
959 Array<OneD,NekDouble> &outarray,
967 const Array<OneD, const NekDouble> &inarray,
968 Array<OneD,NekDouble> &outarray,
977 const Array<OneD, const NekDouble> &inarray,
978 Array<OneD,NekDouble> &outarray,
1074 Array<TwoD, const NekDouble> df
1104 int rows = deriv0.GetRows();
1105 int cols = deriv1.GetColumns();
1109 (*WeakDeriv) = df[3*dir][0]*deriv0
1110 + df[3*dir+1][0]*deriv1
1111 + df[3*dir+2][0]*deriv2;
1152 Array<TwoD, const NekDouble> gmat
1155 int rows = lap00.GetRows();
1156 int cols = lap00.GetColumns();
1161 (*lap) = gmat[0][0]*lap00
1166 + gmat[7][0]*(lap12 +
Transpose(lap12));
1181 int rows = LapMat.GetRows();
1182 int cols = LapMat.GetColumns();
1187 (*helm) = LapMat + factor*MassMat;
1331 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1332 unsigned int exp_size[] = {nbdry, nint};
1333 unsigned int nblks = 2;
1345 goto UseLocRegionsMatrix;
1352 goto UseLocRegionsMatrix;
1357 factor = mat->Scale();
1358 goto UseStdRegionsMatrix;
1361 UseStdRegionsMatrix:
1376 UseLocRegionsMatrix:
1387 Array<OneD,unsigned int> bmap(nbdry);
1388 Array<OneD,unsigned int> imap(nint);
1392 for(i = 0; i < nbdry; ++i)
1394 for(j = 0; j < nbdry; ++j)
1396 (*A)(i,j) = mat(bmap[i],bmap[j]);
1399 for(j = 0; j < nint; ++j)
1401 (*B)(i,j) = mat(bmap[i],imap[j]);
1405 for(i = 0; i < nint; ++i)
1407 for(j = 0; j < nbdry; ++j)
1409 (*C)(i,j) = mat(imap[i],bmap[j]);
1412 for(j = 0; j < nint; ++j)
1414 (*D)(i,j) = mat(imap[i],imap[j]);
1423 (*A) = (*A) - (*B)*(*C);
1448 return tmp->GetStdMatrix(mkey);
1467 const Array<OneD, const NekDouble> &inarray,
1468 Array<OneD,NekDouble> &outarray,
1473 if(inarray.get() == outarray.get())
1478 Blas::Dgemv(
'N',
m_ncoeffs,
m_ncoeffs,mat->Scale(),(mat->GetOwnedMatrix())->GetPtr().get(),
1479 m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
1483 Blas::Dgemv(
'N',
m_ncoeffs,
m_ncoeffs,mat->Scale(),(mat->GetOwnedMatrix())->GetPtr().get(),
1484 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
1490 const Array<OneD, const NekDouble> &inarray,
1491 Array<OneD, NekDouble> &outarray,
1492 Array<OneD, NekDouble> &wsp)
1501 int nquad0 =
m_base[0]->GetNumPoints();
1502 int nquad1 =
m_base[1]->GetNumPoints();
1503 int nquad2 =
m_base[2]->GetNumPoints();
1504 int nqtot = nquad0*nquad1*nquad2;
1506 ASSERTL1(wsp.num_elements() >= 6*nqtot,
1507 "Insufficient workspace size.");
1509 "Workspace not set up for ncoeffs > nqtot");
1511 const Array<OneD, const NekDouble>& base0 =
m_base[0]->GetBdata();
1512 const Array<OneD, const NekDouble>& base1 =
m_base[1]->GetBdata();
1513 const Array<OneD, const NekDouble>& base2 =
m_base[2]->GetBdata();
1514 const Array<OneD, const NekDouble>& dbase0 =
m_base[0]->GetDbdata();
1515 const Array<OneD, const NekDouble>& dbase1 =
m_base[1]->GetDbdata();
1516 const Array<OneD, const NekDouble>& dbase2 =
m_base[2]->GetDbdata();
1525 Array<OneD,NekDouble> wsp0 (2*nqtot, wsp);
1526 Array<OneD,NekDouble> wsp1 ( nqtot, wsp+1*nqtot);
1527 Array<OneD,NekDouble> wsp2 ( nqtot, wsp+2*nqtot);
1528 Array<OneD,NekDouble> wsp3 ( nqtot, wsp+3*nqtot);
1529 Array<OneD,NekDouble> wsp4 ( nqtot, wsp+4*nqtot);
1530 Array<OneD,NekDouble> wsp5 ( nqtot, wsp+5*nqtot);
1542 Vmath::Vvtvvtp(nqtot,&metric00[0],1,&wsp0[0],1,&metric01[0],1,&wsp1[0],1,&wsp3[0],1);
1543 Vmath::Vvtvp (nqtot,&metric02[0],1,&wsp2[0],1,&wsp3[0],1,&wsp3[0],1);
1544 Vmath::Vvtvvtp(nqtot,&metric01[0],1,&wsp0[0],1,&metric11[0],1,&wsp1[0],1,&wsp4[0],1);
1545 Vmath::Vvtvp (nqtot,&metric12[0],1,&wsp2[0],1,&wsp4[0],1,&wsp4[0],1);
1546 Vmath::Vvtvvtp(nqtot,&metric02[0],1,&wsp0[0],1,&metric12[0],1,&wsp1[0],1,&wsp5[0],1);
1547 Vmath::Vvtvp (nqtot,&metric22[0],1,&wsp2[0],1,&wsp5[0],1,&wsp5[0],1);
1568 const unsigned int dim = 3;
1574 for (
unsigned int i = 0; i < dim; ++i)
1576 for (
unsigned int j = i; j < dim; ++j)
1578 m_metrics[m[i][j]] = Array<OneD, NekDouble>(nqtot);
1583 Array<OneD,NekDouble> g0 (
m_metrics[m[0][0]]);
1584 Array<OneD,NekDouble> g1 (
m_metrics[m[1][1]]);
1585 Array<OneD,NekDouble> g2 (
m_metrics[m[2][2]]);
1586 Array<OneD,NekDouble> g3 (
m_metrics[m[0][1]]);
1587 Array<OneD,NekDouble> g4 (
m_metrics[m[0][2]]);
1588 Array<OneD,NekDouble> g5 (
m_metrics[m[1][2]]);
1591 Array<OneD,NekDouble> alloc(7*nqtot,0.0);
1592 Array<OneD,NekDouble> h0 (alloc);
1593 Array<OneD,NekDouble> h1 (alloc+ 1*nqtot);
1594 Array<OneD,NekDouble> h2 (alloc+ 2*nqtot);
1595 Array<OneD,NekDouble> h3 (alloc+ 3*nqtot);
1596 Array<OneD,NekDouble> wsp4 (alloc+ 4*nqtot);
1597 Array<OneD,NekDouble> wsp5 (alloc+ 5*nqtot);
1598 Array<OneD,NekDouble> wsp6 (alloc+ 6*nqtot);
1600 Array<OneD,NekDouble> wsp7 (alloc);
1601 Array<OneD,NekDouble> wsp8 (alloc+ 1*nqtot);
1602 Array<OneD,NekDouble> wsp9 (alloc+ 2*nqtot);
1604 const Array<TwoD, const NekDouble>& df =
1606 const Array<OneD, const NekDouble>& z0 =
m_base[0]->GetZ();
1607 const Array<OneD, const NekDouble>& z1 =
m_base[1]->GetZ();
1608 const Array<OneD, const NekDouble>& z2 =
m_base[2]->GetZ();
1609 const unsigned int nquad0 =
m_base[0]->GetNumPoints();
1610 const unsigned int nquad1 =
m_base[1]->GetNumPoints();
1611 const unsigned int nquad2 =
m_base[2]->GetNumPoints();
1613 for(j = 0; j < nquad2; ++j)
1615 for(i = 0; i < nquad1; ++i)
1617 Vmath::Fill(nquad0, 4.0/(1.0-z1[i])/(1.0-z2[j]), &h0[0]+i*nquad0 + j*nquad0*nquad1,1);
1618 Vmath::Fill(nquad0, 2.0/(1.0-z1[i])/(1.0-z2[j]), &h1[0]+i*nquad0 + j*nquad0*nquad1,1);
1619 Vmath::Fill(nquad0, 2.0/(1.0-z2[j]), &h2[0]+i*nquad0 + j*nquad0*nquad1,1);
1620 Vmath::Fill(nquad0, (1.0+z1[i])/(1.0-z2[j]), &h3[0]+i*nquad0 + j*nquad0*nquad1,1);
1623 for(i = 0; i < nquad0; i++)
1625 Blas::Dscal(nquad1*nquad2, 1+z0[i], &h1[0]+i, nquad0);
1634 Vmath::Vadd(nqtot, &df[1][0], 1, &df[2][0], 1, &wsp4[0], 1);
1635 Vmath::Vvtvvtp(nqtot, &df[0][0], 1, &h0[0], 1, &wsp4[0], 1, &h1[0], 1, &wsp4[0], 1);
1637 Vmath::Vadd(nqtot, &df[4][0], 1, &df[5][0], 1, &wsp5[0], 1);
1638 Vmath::Vvtvvtp(nqtot, &df[3][0], 1, &h0[0], 1, &wsp5[0], 1, &h1[0], 1, &wsp5[0], 1);
1640 Vmath::Vadd(nqtot, &df[7][0], 1, &df[8][0], 1, &wsp6[0], 1);
1641 Vmath::Vvtvvtp(nqtot, &df[6][0], 1, &h0[0], 1, &wsp6[0], 1, &h1[0], 1, &wsp6[0], 1);
1644 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1645 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1648 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp4[0], 1, &df[5][0], 1, &wsp5[0], 1, &g4[0], 1);
1649 Vmath::Vvtvp (nqtot, &df[8][0], 1, &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1653 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &h2[0], 1, &df[2][0], 1, &h3[0], 1, &wsp7[0], 1);
1655 Vmath::Vvtvvtp(nqtot, &df[4][0], 1, &h2[0], 1, &df[5][0], 1, &h3[0], 1, &wsp8[0], 1);
1657 Vmath::Vvtvvtp(nqtot, &df[7][0], 1, &h2[0], 1, &df[8][0], 1, &h3[0], 1, &wsp9[0], 1);
1660 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp7[0], 1, &wsp5[0], 1, &wsp8[0], 1, &g3[0], 1);
1661 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp9[0], 1, &g3[0], 1, &g3[0], 1);
1665 Vmath::Vvtvvtp(nqtot, &wsp7[0], 1, &wsp7[0], 1, &wsp8[0], 1, &wsp8[0], 1, &g1[0], 1);
1666 Vmath::Vvtvp (nqtot, &wsp9[0], 1, &wsp9[0], 1, &g1[0], 1, &g1[0], 1);
1669 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp7[0], 1, &df[5][0], 1, &wsp8[0], 1, &g5[0], 1);
1670 Vmath::Vvtvp (nqtot, &df[8][0], 1, &wsp9[0], 1, &g5[0], 1, &g5[0], 1);
1673 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &df[2][0], 1, &df[5][0], 1, &df[5][0], 1, &g2[0], 1);
1674 Vmath::Vvtvp (nqtot, &df[8][0], 1, &df[8][0], 1, &g2[0], 1, &g2[0], 1);
1679 Vmath::Svtsvtp(nqtot, df[0][0], &h0[0], 1, df[1][0] + df[2][0], &h1[0], 1, &wsp4[0], 1);
1681 Vmath::Svtsvtp(nqtot, df[3][0], &h0[0], 1, df[4][0] + df[5][0], &h1[0], 1, &wsp5[0], 1);
1683 Vmath::Svtsvtp(nqtot, df[6][0], &h0[0], 1, df[7][0] + df[8][0], &h1[0], 1, &wsp6[0], 1);
1686 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1687 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1690 Vmath::Svtsvtp(nqtot, df[2][0], &wsp4[0], 1, df[5][0], &wsp5[0], 1, &g4[0], 1);
1691 Vmath::Svtvp (nqtot, df[8][0], &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1695 Vmath::Svtsvtp(nqtot, df[1][0], &h2[0], 1, df[2][0], &h3[0], 1, &wsp7[0], 1);
1697 Vmath::Svtsvtp(nqtot, df[4][0], &h2[0], 1, df[5][0], &h3[0], 1, &wsp8[0], 1);
1699 Vmath::Svtsvtp(nqtot, df[7][0], &h2[0], 1, df[8][0], &h3[0], 1, &wsp9[0], 1);
1702 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp7[0], 1, &wsp5[0], 1, &wsp8[0], 1, &g3[0], 1);
1703 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp9[0], 1, &g3[0], 1, &g3[0], 1);
1707 Vmath::Vvtvvtp(nqtot, &wsp7[0], 1, &wsp7[0], 1, &wsp8[0], 1, &wsp8[0], 1, &g1[0], 1);
1708 Vmath::Vvtvp (nqtot, &wsp9[0], 1, &wsp9[0], 1, &g1[0], 1, &g1[0], 1);
1711 Vmath::Svtsvtp(nqtot, df[2][0], &wsp7[0], 1, df[5][0], &wsp8[0], 1, &g5[0], 1);
1712 Vmath::Svtvp (nqtot, df[8][0], &wsp9[0], 1, &g5[0], 1, &g5[0], 1);
1715 Vmath::Fill(nqtot, df[2][0]*df[2][0] + df[5][0]*df[5][0] + df[8][0]*df[8][0], &g2[0], 1);
1718 for (
unsigned int i = 0; i < dim; ++i)
1720 for (
unsigned int j = i; j < dim; ++j)