55 StdExpansion (Ba.GetNumModes()*Bb.GetNumModes(),2,Ba,Bb),
121 ASSERTL1(
false,
"input dir is out of range");
153 if(
m_base[0]->Collocation() &&
m_base[1]->Collocation())
156 inarray, 1, outarray, 1);
169 m_base[1]->GetNumModes());
173 inarray,outarray,wsp,
true,
true);
192 bool doCheckCollDir0,
193 bool doCheckCollDir1)
195 int nquad0 =
m_base[0]->GetNumPoints();
196 int nquad1 =
m_base[1]->GetNumPoints();
197 int nmodes0 =
m_base[0]->GetNumModes();
198 int nmodes1 =
m_base[1]->GetNumModes();
200 bool colldir0 = doCheckCollDir0?(
m_base[0]->Collocation()):
false;
201 bool colldir1 = doCheckCollDir1?(
m_base[1]->Collocation()):
false;
203 if(colldir0 && colldir1)
209 Blas::Dgemm(
'N',
'T', nquad0, nquad1,nmodes1, 1.0, &inarray[0], nquad0,
210 base1.get(), nquad1, 0.0, &outarray[0], nquad0);
214 Blas::Dgemm(
'N',
'N', nquad0,nmodes1,nmodes0,1.0, base0.get(),
215 nquad0, &inarray[0], nmodes0,0.0,&outarray[0], nquad0);
219 ASSERTL1(wsp.num_elements()>=nquad0*nmodes1,
"Workspace size is not sufficient");
223 Blas::Dgemm(
'N',
'N', nquad0,nmodes1,nmodes0,1.0, base0.get(),
224 nquad0, &inarray[0], nmodes0,0.0,&wsp[0], nquad0);
225 Blas::Dgemm(
'N',
'T', nquad0, nquad1,nmodes1, 1.0, &wsp[0], nquad0,
226 base1.get(), nquad1, 0.0, &outarray[0], nquad0);
234 if((
m_base[0]->Collocation())&&(
m_base[1]->Collocation()))
258 if((
m_base[0]->Collocation())&&(
m_base[1]->Collocation()))
265 int npoints[2] = {
m_base[0]->GetNumPoints(),
266 m_base[1]->GetNumPoints()};
267 int nmodes[2] = {
m_base[0]->GetNumModes(),
268 m_base[1]->GetNumModes()};
270 fill(outarray.get(), outarray.get()+
m_ncoeffs, 0.0 );
274 for(i = 0; i < 4; i++)
280 for(i = 0; i < npoints[0]; i++)
282 physEdge[0][i] = inarray[i];
283 physEdge[2][i] = inarray[npoints[0]*npoints[1]-1-i];
286 for(i = 0; i < npoints[1]; i++)
288 physEdge[1][i] = inarray[npoints[0]-1+i*npoints[0]];
289 physEdge[3][i] = inarray[(npoints[1]-1)*npoints[0]-i*npoints[0]];
299 for(i = 0; i < 4; i++)
301 segexp[i%2]->FwdTrans_BndConstrained(physEdge[i],coeffEdge[i]);
304 for(j=0; j < nmodes[i%2]; j++)
307 outarray[ mapArray[j] ] = sign * coeffEdge[i][j];
326 int nInteriorDofs =
m_ncoeffs - nBoundaryDofs;
334 for(i = 0; i < nInteriorDofs; i++)
336 rhs[i] = tmp1[ mapArray[i] ];
339 Blas::Dgemv(
'N',nInteriorDofs,nInteriorDofs,1.0, &(matsys->GetPtr())[0],
340 nInteriorDofs,rhs.get(),1,0.0,result.get(),1);
342 for(i = 0; i < nInteriorDofs; i++)
344 outarray[ mapArray[i] ] = result[i];
383 if(
m_base[0]->Collocation() &&
m_base[1]->Collocation())
396 bool multiplybyweights)
398 int nquad0 =
m_base[0]->GetNumPoints();
399 int nquad1 =
m_base[1]->GetNumPoints();
400 int order0 =
m_base[0]->GetNumModes();
402 if(multiplybyweights)
411 tmp,outarray,wsp,
true,
true);
418 inarray,outarray,wsp,
true,
true);
430 Blas::Dgemv(
'N',
m_ncoeffs,nq,1.0,iprodmat->GetPtr().get(),
431 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
445 ASSERTL0((dir==0)||(dir==1),
"input dir is out of range");
447 int nquad0 =
m_base[0]->GetNumPoints();
448 int nquad1 =
m_base[1]->GetNumPoints();
449 int nqtot = nquad0*nquad1;
450 int order0 =
m_base[0]->GetNumModes();
462 tmp,outarray,wsp,
true,
false);
468 tmp,outarray,wsp,
false,
true);
476 ASSERTL0((dir==0)||(dir==1),
"input dir is out of range");
493 Blas::Dgemv(
'N',
m_ncoeffs,nq,1.0,iprodmat->GetPtr().get(),
494 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
513 bool doCheckCollDir0,
514 bool doCheckCollDir1)
516 int nquad0 =
m_base[0]->GetNumPoints();
517 int nquad1 =
m_base[1]->GetNumPoints();
518 int nmodes0 =
m_base[0]->GetNumModes();
519 int nmodes1 =
m_base[1]->GetNumModes();
521 bool colldir0 = doCheckCollDir0?(
m_base[0]->Collocation()):
false;
522 bool colldir1 = doCheckCollDir1?(
m_base[1]->Collocation()):
false;
524 if(colldir0 && colldir1)
530 Blas::Dgemm(
'N',
'N',nmodes0,nmodes1, nquad1,1.0, inarray.get(),
531 nmodes0, base1.get(), nquad1, 0.0,outarray.get(),nmodes0);
535 Blas::Dgemm(
'T',
'N',nmodes0,nquad1,nquad0,1.0,base0.get(),
536 nquad0,inarray.get(),nquad0,0.0,outarray.get(),nmodes0);
540 ASSERTL1(wsp.num_elements()>=nquad1*nmodes0,
"Workspace size is not sufficient");
543 Blas::Dgemm(
'T',
'N',nmodes0,nquad1,nquad0,1.0,base0.get(),
544 nquad0,inarray.get(),nquad0,0.0,wsp.get(),nmodes0);
547 for(
int i = 0; i < nmodes0; ++i)
549 for(
int j = 0; j < nquad1; ++j)
552 base0.get()+i*nquad0,1,
553 inarray.get()+j*nquad0,1);
557 Blas::Dgemm(
'N',
'N',nmodes0,nmodes1, nquad1,1.0, wsp.get(),
558 nmodes0, base1.get(), nquad1, 0.0,outarray.get(),nmodes0);
584 int nquad0 =
m_base[0]->GetNumPoints();
585 int nquad1 =
m_base[1]->GetNumPoints();
588 int btmp0 =
m_base[0]->GetNumModes();
589 int mode0 = mode%btmp0;
590 int mode1 = mode/btmp0;
593 ASSERTL2(mode1 == (
int)floor((1.0*mode)/btmp0),
594 "Integer Truncation not Equiv to Floor");
597 "calling argument mode is larger than total expansion order");
599 for(i = 0; i < nquad1; ++i)
602 1, &outarray[0]+i*nquad0,1);
605 for(i = 0; i < nquad0; ++i)
608 &outarray[0]+i,nquad0,&outarray[0]+i,nquad0);
628 ASSERTL2((i >= 0)&&(i <= 3),
"edge id is out of range");
630 if((i == 0)||(i == 2))
642 ASSERTL2((i >= 0)&&(i <= 3),
"edge id is out of range");
644 if((i == 0)||(i == 2))
656 ASSERTL2((i >= 0)&&(i <= 3),
"edge id is out of range");
658 if((i == 0)||(i == 2))
670 ASSERTL2((edge >= 0)&&(edge <= 3),
"edge id is out of range");
672 if((edge == 0)||(edge == 2))
684 ASSERTL2((i >= 0)&&(i <= 3),
"edge id is out of range");
686 if((i == 0)||(i == 2))
708 "BasisType is not a boundary interior form");
712 "BasisType is not a boundary interior form");
722 "BasisType is not a boundary interior form");
726 "BasisType is not a boundary interior form");
732 const std::vector<unsigned int> &nummodes,
735 int nmodes = nummodes[modes_offset]*nummodes[modes_offset+1];
743 bool returnval =
false;
768 for(i = 0; i < nq1; ++i)
770 Blas::Dcopy(nq0,z0.get(), 1,&coords_0[0] + i*nq0,1);
783 int nummodes0, nummodes1;
784 int value1 = 0, value2 = 0;
790 nummodes0 =
m_base[0]->GetNumModes();
791 nummodes1 =
m_base[1]->GetNumModes();
803 value1 = 2*nummodes0;
806 ASSERTL0(0,
"Mapping array is not defined for this expansion");
810 for(i = 0; i < value1; i++)
820 value2 = value1+nummodes0-1;
826 ASSERTL0(0,
"Mapping array is not defined for this expansion");
830 for(i = 0; i < nummodes1-2; i++)
832 outarray[cnt++]=value1+i*nummodes0;
833 outarray[cnt++]=value2+i*nummodes0;
839 for(i = nummodes0*(nummodes1-1);i <
GetNcoeffs(); i++)
850 int nummodes0, nummodes1;
857 nummodes0 =
m_base[0]->GetNumModes();
858 nummodes1 =
m_base[1]->GetNumModes();
866 startvalue = nummodes0;
869 startvalue = 2*nummodes0;
872 ASSERTL0(0,
"Mapping array is not defined for this expansion");
885 ASSERTL0(0,
"Mapping array is not defined for this expansion");
889 for(i = 0; i < nummodes1-2; i++)
891 for(j = 0; j < nummodes0-2; j++)
893 outarray[cnt++]=startvalue+j;
895 startvalue+=nummodes0;
903 if(useCoeffPacking ==
true)
905 switch(localVertexId)
916 localDOF =
m_base[0]->GetNumModes()-1;
928 localDOF =
m_base[0]->GetNumModes() * (
m_base[1]->GetNumModes()-1);
932 localDOF =
m_base[0]->GetNumModes();
940 localDOF =
m_base[0]->GetNumModes()*
m_base[1]->GetNumModes()-1;
944 localDOF =
m_base[0]->GetNumModes()+1;
949 ASSERTL0(
false,
"eid must be between 0 and 3");
956 switch(localVertexId)
967 localDOF =
m_base[0]->GetNumModes()-1;
979 localDOF =
m_base[0]->GetNumModes()*
m_base[1]->GetNumModes()-1;
983 localDOF =
m_base[0]->GetNumModes()+1;
991 localDOF =
m_base[0]->GetNumModes() * (
m_base[1]->GetNumModes()-1);
995 localDOF =
m_base[0]->GetNumModes();
1000 ASSERTL0(
false,
"eid must be between 0 and 3");
1013 const int nummodes0 =
m_base[0]->GetNumModes();
1014 const int nummodes1 =
m_base[1]->GetNumModes();
1018 if(maparray.num_elements() != nEdgeIntCoeffs)
1023 if(signarray.num_elements() != nEdgeIntCoeffs)
1029 fill( signarray.get() , signarray.get()+nEdgeIntCoeffs, 1 );
1038 for(i = 0; i < nEdgeIntCoeffs; i++)
1045 for(i = 1; i < nEdgeIntCoeffs; i+=2)
1054 for(i = 0; i < nEdgeIntCoeffs; i++)
1056 maparray[i] = (i+2)*nummodes0 + 1;
1061 for(i = 1; i < nEdgeIntCoeffs; i+=2)
1070 for(i = 0; i < nEdgeIntCoeffs; i++)
1072 maparray[i] = nummodes0+i+2;
1077 for(i = 1; i < nEdgeIntCoeffs; i+=2)
1086 for(i = 0; i < nEdgeIntCoeffs; i++)
1088 maparray[i] = (i+2)*nummodes0;
1093 for(i = 1; i < nEdgeIntCoeffs; i+=2)
1101 ASSERTL0(
false,
"eid must be between 0 and 3");
1111 for(i = 0; i < nEdgeIntCoeffs; i++)
1119 for(i = 0; i < nEdgeIntCoeffs; i++)
1121 maparray[i] = (i+2)*nummodes0 - 1;
1127 for(i = 0; i < nEdgeIntCoeffs; i++)
1129 maparray[i] = nummodes0*nummodes1 - 2 - i;
1135 for(i = 0; i < nEdgeIntCoeffs; i++)
1137 maparray[i] = nummodes0*(nummodes1-2-i);
1142 ASSERTL0(
false,
"eid must be between 0 and 3");
1147 reverse( maparray.get() , maparray.get()+nEdgeIntCoeffs );
1152 ASSERTL0(
false,
"Mapping not defined for this type of basis");
1163 const int nummodes0 =
m_base[0]->GetNumModes();
1164 const int nummodes1 =
m_base[1]->GetNumModes();
1168 if(maparray.num_elements() != nEdgeCoeffs)
1173 if(signarray.num_elements() != nEdgeCoeffs)
1179 fill( signarray.get() , signarray.get()+nEdgeCoeffs, 1 );
1188 for(i = 0; i < nEdgeCoeffs; i++)
1195 swap( maparray[0] , maparray[1] );
1197 for(i = 3; i < nEdgeCoeffs; i+=2)
1206 for(i = 0; i < nEdgeCoeffs; i++)
1208 maparray[i] = i*nummodes0 + 1;
1213 swap( maparray[0] , maparray[1] );
1215 for(i = 3; i < nEdgeCoeffs; i+=2)
1224 for(i = 0; i < nEdgeCoeffs; i++)
1226 maparray[i] = nummodes0+i;
1231 swap( maparray[0] , maparray[1] );
1233 for(i = 3; i < nEdgeCoeffs; i+=2)
1242 for(i = 0; i < nEdgeCoeffs; i++)
1244 maparray[i] = i*nummodes0;
1249 swap( maparray[0] , maparray[1] );
1251 for(i = 3; i < nEdgeCoeffs; i+=2)
1259 ASSERTL0(
false,
"eid must be between 0 and 3");
1270 for(i = 0; i < nEdgeCoeffs; i++)
1278 for(i = 0; i < nEdgeCoeffs; i++)
1280 maparray[i] = (i+1)*nummodes0 - 1;
1286 for(i = 0; i < nEdgeCoeffs; i++)
1288 maparray[i] = nummodes0*nummodes1 - 1 - i;
1294 for(i = 0; i < nEdgeCoeffs; i++)
1296 maparray[i] = nummodes0*(nummodes1-1-i);
1301 ASSERTL0(
false,
"eid must be between 0 and 3");
1306 reverse( maparray.get() , maparray.get()+nEdgeCoeffs );
1311 ASSERTL0(
false,
"Mapping not defined for this type of basis");
1332 int nq0 =
m_base[0]->GetNumPoints();
1333 int nq1 =
m_base[1]->GetNumPoints();
1334 int nq = max(nq0,nq1);
1346 for(
int i = 0; i < nq; ++i)
1348 for(
int j = 0; j < nq; ++j,++cnt)
1351 coords[cnt][0] = -1.0 + 2*j/(
NekDouble)(nq-1);
1352 coords[cnt][1] = -1.0 + 2*i/(
NekDouble)(nq-1);
1356 for(
int i = 0; i < neq; ++i)
1360 I[0] =
m_base[0]->GetI(coll);
1361 I[1] =
m_base[1]->GetI(coll+1);
1364 for (
int j = 0; j < nq1; ++j)
1370 Mat->GetRawPtr()+j*nq0*neq+i,neq);
1383 for(i = 0; i < order1; ++i)
1385 (*Mat)(order0*i+1,i*order0+1) = 1.0;
1391 for(i = 0; i < order0; ++i)
1393 (*Mat)(order0+i ,order0+i) = 1.0;
1406 (*Mat) = Imass*Iprod;
1414 int dir = (edge + 1) % 2;
1415 int nCoeffs =
m_base[dir]->GetNumModes();
1423 coords[0] = (edge == 0 || edge == 3) ? -1.0 : 1.0;
1431 Vmath::Vcopy(nCoeffs, m_Ix->GetPtr(), 1, Mat->GetPtr(), 1);
1461 if(inarray.get() == outarray.get())
1467 m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
1472 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
1481 int qa =
m_base[0]->GetNumPoints();
1482 int qb =
m_base[1]->GetNumPoints();
1483 int nmodes_a =
m_base[0]->GetNumModes();
1484 int nmodes_b =
m_base[1]->GetNumModes();
1502 OrthoExp.
FwdTrans(array,orthocoeffs);
1506 int nmodes = min(nmodes_a,nmodes_b);
1509 for(j = 0; j < nmodes_a; ++j)
1511 for(k = 0; k < nmodes_b; ++k)
1515 orthocoeffs[j*nmodes_b+k] *=
1516 (SvvDiffCoeff*exp(-(j+k-nmodes)*(j+k-nmodes)/
1522 orthocoeffs[j*nmodes_b+k] *= 0.0;
1529 OrthoExp.
BwdTrans(orthocoeffs,array);
1537 int n_coeffs = inarray.num_elements();
1545 int nmodes0 =
m_base[0]->GetNumModes();
1546 int nmodes1 =
m_base[1]->GetNumModes();
1547 int numMax = nmodes0;
1563 b0, b1, coeff_tmp, bortho0, bortho1, coeff);
1568 for (
int i = 0; i < numMin+1; ++i)
1572 tmp2 = coeff_tmp+cnt,1);
1578 bortho0, bortho1, coeff_tmp, b0, b1, outarray);
1627 int nquad0 =
m_base[0]->GetNumPoints();
1628 int nquad1 =
m_base[1]->GetNumPoints();
1634 for(i = 0; i < nquad1; ++i)
1637 w0.get(),1,outarray.get()+i*nquad0,1);
1640 for(i = 0; i < nquad0; ++i)
1642 Vmath::Vmul(nquad1,outarray.get()+i,nquad0,w1.get(),1,
1643 outarray.get()+i,nquad0);
1651 int np1 =
m_base[0]->GetNumPoints();
1652 int np2 =
m_base[1]->GetNumPoints();
1653 int np = max(np1,np2);
1660 for(
int i = 0; i < np-1; ++i)
1663 for(
int j = 0; j < np-1; ++j)
1665 conn[cnt++] = row +j;
1666 conn[cnt++] = row +j+1;
1667 conn[cnt++] = rowp1 +j;
1669 conn[cnt++] = rowp1 +j+1;
1670 conn[cnt++] = rowp1 +j;
1671 conn[cnt++] = row +j+1;
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
NekDouble GetConstFactor(const ConstFactorType &factor) const
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
#define ASSERTL0(condition, msg)
const LibUtilities::BasisSharedPtr & GetBasis(int dir) const
This function gets the shared point to basis in the dir direction.
const ConstFactorMap & GetConstFactors() const
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
MatrixType GetMatrixType() const
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
static Array< OneD, NekDouble > NullNekDouble1DArray
void BwdTrans_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0=true, bool doCheckCollDir1=true)
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
int GetBasisNumModes(const int dir) const
This function returns the number of expansion modes in the dir direction.
#define sign(a, b)
return the sign(b)*a
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
Calculate the derivative of the physical points.
void IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
void GetEdgeToElementMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
void IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
this function calculates the inner product of a given function f with the different modes of the expa...
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
Principle Modified Functions .
virtual bool v_IsBoundaryInteriorExpansion()
Lagrange Polynomials using the Gauss points .
void LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Convert local cartesian coordinate xi into local collapsed coordinates eta.
std::map< ConstFactorType, NekDouble > ConstFactorMap
NekDouble Integral(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &w0, const Array< OneD, const NekDouble > &w1)
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
virtual void v_LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
LibUtilities::NekManager< StdMatrixKey, DNekBlkMat, StdMatrixKey::opLess > m_stdStaticCondMatrixManager
int GetEdgeNcoeffs(const int i) const
This function returns the number of expansion coefficients belonging to the i-th edge.
boost::shared_ptr< StdSegExp > StdSegExpSharedPtr
boost::shared_ptr< DNekMat > DNekMatSharedPtr
virtual void v_StdPhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
void PhysTensorDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray_d0, Array< OneD, NekDouble > &outarray_d1)
Calculate the 2D derivative in the local tensor/collapsed coordinate at the physical points...
1D Gauss-Gauss-Legendre quadrature points
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Transform a given function from physical quadrature space to coefficient space.
void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
BasisManagerT & BasisManager(void)
virtual int v_NumDGBndryCoeffs() const
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
int NumBndryCoeffs(void) const
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
LibUtilities::BasisType GetEdgeBasisType(const int i) const
This function returns the type of expansion basis on the i-th edge.
void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1)
The base class for all shapes.
virtual const LibUtilities::BasisKey v_DetEdgeBasisKey(const int i) const
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_DetCartesianDirOfEdge(const int edge)
void WeakDerivMatrixOp_MatFree(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void GetInteriorMap(Array< OneD, unsigned int > &outarray)
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
DNekMatSharedPtr CreateGeneralMatrix(const StdMatrixKey &mkey)
this function generates the mass matrix
Principle Orthogonal Functions .
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Defines a specification for a set of points.
virtual void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2)
virtual int v_GetEdgeNcoeffs(const int i) const
T Ddot(int n, const Array< OneD, const T > &w, const int incw, const Array< OneD, const T > &x, const int incx, const Array< OneD, const int > &y, const int incy)
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
virtual void v_BwdTrans_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1)
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_GetNedges() const
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
virtual int v_NumBndryCoeffs() const
int getNumberOfCoefficients(int Na, int Nb)
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculate the inner product of inarray with respect to the basis B=base0*base1 and put into outarray...
void MassMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Backward transformation from coefficient space to physical space...
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
LibUtilities::NekManager< StdMatrixKey, DNekMat, StdMatrixKey::opLess > m_stdMatrixManager
NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrates the specified function over the domain.
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void v_GetEdgeToElementMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &array)
Fill outarray with mode mode of expansion.
void IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0=true, bool doCheckCollDir1=true)
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
boost::shared_ptr< Basis > BasisSharedPtr
virtual int v_GetEdgeNumPoints(const int i) const
void Zero(int n, T *x, const int incx)
Zero vector.
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void InterpCoeff2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Describes the specification for a Basis.
virtual LibUtilities::ShapeType v_DetShapeType() const
virtual int v_GetNverts() const
1D Gauss-Lobatto-Legendre quadrature points
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
virtual void v_HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Forward transformation from physical space to coefficient space...