73 std::string(
"StdExpansionStdMatrix")),
74 m_stdStaticCondMatrixManager(
75 boost::bind(&
StdExpansion::CreateStdStaticCondMatrix, this, _1),
76 std::string(
"StdExpansionStdStaticCondMatrix")),
79 std::string(
"StdExpansionIndexMap"))
81 switch(
m_base.num_elements())
85 "NULL Basis attempting to be used.");
90 "NULL Basis attempting to be used.");
95 "NULL Basis attempting to be used.");
108 m_elmt_id(T.m_elmt_id),
109 m_ncoeffs(T.m_ncoeffs),
110 m_stdMatrixManager(T.m_stdMatrixManager),
111 m_stdStaticCondMatrixManager(T.m_stdStaticCondMatrixManager),
112 m_IndexMapManager(T.m_IndexMapManager)
121 const Array<OneD, const NekDouble>& sol)
125 Array<OneD, NekDouble> wsp(ntot);
143 const Array<OneD, const NekDouble>& sol)
147 Array<OneD, NekDouble> wsp(ntot);
149 if (sol.num_elements() == 0)
173 const Array<OneD, const NekDouble>& sol)
179 Array<OneD, NekDouble> wsp(3*ntot);
180 Array<OneD, NekDouble> wsp_deriv = wsp + ntot;
181 Array<OneD, NekDouble> sum = wsp_deriv + ntot;
195 for(i = 0; i < coordim; ++i)
221 Array<OneD,unsigned int> bmap(nbdry);
222 Array<OneD,unsigned int> imap(nint);
226 for(i = 0; i < nbdry; ++i)
228 for(j = 0; j < nbdry; ++j)
230 (*A)(i,j) = (*mat)(bmap[i],bmap[j]);
233 for(j = 0; j < nint; ++j)
235 (*B)(i,j) = (*mat)(bmap[i],imap[j]);
239 for(i = 0; i < nint; ++i)
241 for(j = 0; j < nbdry; ++j)
243 (*C)(i,j) = (*mat)(imap[i],bmap[j]);
246 for(j = 0; j < nint; ++j)
248 (*D)(i,j) = (*mat)(imap[i],imap[j]);
257 (*A) = (*A) - (*B)*(*C);
261 Array<OneD, unsigned int> exp_size(2);
266 returnval->SetBlock(0,0,A);
267 returnval->SetBlock(0,1,B);
268 returnval->SetBlock(1,0,C);
269 returnval->SetBlock(1,1,D);
284 Array<OneD,unsigned int> map;
285 Array<OneD,int>
sign;
311 ASSERTL0(
false,
"Boundary Index Map not implemented yet.");
316 ASSERTL0(
false,
"Vertex Index Map not implemented yet.");
321 ASSERTL0(
false,
"The Index Map you are requiring is not between the possible options.");
327 for(
int i = 0; i < map.num_elements(); i++)
329 (*returnval)[i].index = map[i];
330 (*returnval)[i].sign = sign[i];
364 Array<OneD, NekDouble> tmpout(nq);
376 returnval->GetRawPtr()+i*nq,1);
383 Array<OneD, NekDouble> tmpin(nq);
384 Array<OneD, NekDouble> tmpout(
m_ncoeffs);
388 for(i=0; i < nq; ++i)
403 Array<OneD, NekDouble> tmpin(nq);
404 Array<OneD, NekDouble> tmpout(
m_ncoeffs);
408 for(i=0; i < nq; ++i)
423 Array<OneD, NekDouble> tmpin(nq);
424 Array<OneD, NekDouble> tmpout(
m_ncoeffs);
428 for(i=0; i < nq; ++i)
443 Array<OneD, NekDouble> tmpin(nq);
444 Array<OneD, NekDouble> tmpout(
m_ncoeffs);
448 for(i=0; i < nq; ++i)
489 &(Mat.GetPtr())[0]+i*m_ncoeffs,1);
504 Array<OneD,NekDouble> &outarray,
573 Array<OneD,NekDouble> &outarray,
642 Array<OneD,NekDouble> &outarray,
646 Array<OneD, NekDouble> tmp(nq);
659 const Array<OneD, const NekDouble> &inarray,
660 Array<OneD,NekDouble> &outarray,
667 Array<OneD, NekDouble> tmp(nq);
668 Array<OneD, NekDouble> dtmp(nq);
714 Array<OneD,NekDouble> &outarray,
722 Array<OneD,NekDouble> store2(
m_ncoeffs,0.0);
727 for(i = 0; i < dim; ++i)
741 for(i = 0; i < dim; i++)
743 for(j = 0; j < dim; j++)
756 const Array<OneD, const NekDouble> &inarray,
757 Array<OneD,NekDouble> &outarray,
776 Array<OneD,NekDouble> &outarray,
781 Array<OneD, NekDouble> tmp(nq);
800 Array<OneD,NekDouble> &outarray,
851 Array<OneD,NekDouble> &outarray,
853 bool addDiffusionTerm)
858 ASSERTL0(ndir,
"Must define at least one advection velocity");
862 Array<OneD, NekDouble> tmp(3*totpts);
863 Array<OneD, NekDouble> tmp_deriv = tmp + totpts;
864 Array<OneD, NekDouble> tmp_adv = tmp_deriv + totpts;
867 ASSERTL1(ndir <=
GetCoordim(),
"Number of constants is larger than coordinate dimensions");
875 for(i = 0; i < ndir; ++i)
907 Array<OneD,NekDouble> &outarray,
918 Blas::Daxpy(
m_ncoeffs, lambda, tmp, 1, outarray, 1);
922 Array<OneD, NekDouble> &outarray)
928 Blas::Dgemv(
'N',nq,
m_ncoeffs,1.0,bwdtransmat->GetPtr().get(),
929 nq, inarray.get(), 1, 0.0, outarray.get(), 1);
939 const Array<OneD, const NekDouble> &physvals)
945 boost::shared_ptr<StdExpansion> &EdgeExp,
946 const Array<OneD, const NekDouble> &Fx,
947 const Array<OneD, const NekDouble> &Fy,
948 Array<OneD, NekDouble> &outarray)
954 boost::shared_ptr<StdExpansion> &EdgeExp,
955 const Array<OneD, const NekDouble> &Fn,
956 Array<OneD, NekDouble> &outarray)
962 boost::shared_ptr<StdExpansion> &FaceExp,
963 const Array<OneD, const NekDouble> &Fn,
964 Array<OneD, NekDouble> &outarray)
998 const std::vector<unsigned int > &nummodes,
999 const int nmode_offset,
1013 const Array<OneD, const NekDouble> &Fx,
1014 const Array<OneD, const NekDouble> &Fy,
1015 const Array<OneD, const NekDouble> &Fz,
1016 Array< OneD, NekDouble> &outarray)
1060 Array<OneD, const NekDouble> &inarray,
1061 Array<OneD, NekDouble> &outarray)
1067 Array<OneD, NekDouble> &coeffs,
1075 const Array<OneD, const NekDouble> &physvals)
1088 boost::shared_ptr<StdExpansion> &EdgeExp,
1089 const Array<OneD, const NekDouble> &Fx,
1090 const Array<OneD, const NekDouble> &Fy,
1091 Array<OneD, NekDouble> &outarray)
1097 boost::shared_ptr<StdExpansion> &EdgeExp,
1098 const Array<OneD, const NekDouble> &Fn,
1099 Array<OneD, NekDouble> &outarray)
1105 boost::shared_ptr<StdExpansion> &FaceExp,
1106 const Array<OneD, const NekDouble> &Fn,
1107 Array<OneD, NekDouble> &outarray)
1114 ASSERTL0(
false,
"This function is needs defining for this shape");
1120 ASSERTL0(
false,
"This function is needs defining for this shape");
1127 ASSERTL0(
false,
"This function is needs defining for this shape");
1133 ASSERTL0(
false,
"This function is needs defining for this shape");
1139 ASSERTL0(
false,
"This function is not valid or not defined");
1145 ASSERTL0(
false,
"This function is not valid or not defined");
1151 ASSERTL0(
false,
"This function is not valid or not defined");
1157 ASSERTL0(
false,
"This function is not valid or not defined");
1163 ASSERTL0(
false,
"This function is not valid or not defined");
1169 ASSERTL0(
false,
"This function is not valid or not defined");
1175 ASSERTL0(
false,
"This function is not valid or not defined");
1181 ASSERTL0(
false,
"This function is not valid or not defined");
1187 ASSERTL0(
false,
"This function is not valid or not defined");
1193 ASSERTL0(
false,
"This function is not valid or not defined");
1199 ASSERTL0(
false,
"This function is not valid or not defined");
1205 ASSERTL0(
false,
"This function is not valid or not defined");
1212 ASSERTL0(
false,
"This expansion does not have a shape type defined");
1218 ASSERTL0(
false,
"This function is not valid or not defined");
1224 ASSERTL0(
false,
"This function has not been defined for this expansion");
1229 const Array<OneD, const NekDouble>& inarray,
1230 Array<OneD, NekDouble> &outarray)
1239 Array<OneD, NekDouble> &outarray)
1252 "local expansions");
1260 "specific element types");
1266 "specific element types");
1270 const Array<OneD, const NekDouble>& inarray,
1271 Array<
OneD, boost::shared_ptr< StdExpansion > > &EdgeExp,
1272 Array<
OneD, Array<OneD, NekDouble> > &coeffs,
1273 Array<OneD, NekDouble> &outarray)
1276 "specific element types");
1284 Array<OneD, NekDouble> &out_d1,
1285 Array<OneD, NekDouble> &out_d2,
1286 Array<OneD, NekDouble> &out_d3)
1289 "local expansions");
1293 Array<OneD, NekDouble> &out_ds)
1296 "local expansions");
1299 Array<OneD, NekDouble>& out_dn)
1302 "local expansions");
1311 const Array<OneD, const NekDouble>& inarray,
1312 Array<OneD, NekDouble> &out_d0)
1316 "specific element types");
1324 const Array<OneD, const NekDouble>& direction,
1325 Array<OneD, NekDouble> &outarray)
1328 "specific element types");
1332 Array<OneD, NekDouble> &out_d1,
1333 Array<OneD, NekDouble> &out_d2,
1334 Array<OneD, NekDouble> &out_d3)
1340 const Array<OneD, const NekDouble>& inarray,
1341 Array<OneD, NekDouble> &outarray)
1364 "been defined for this shape");
1370 "been defined for this element");
1378 "been defined for this element");
1384 Array<OneD, NekDouble> &coords_1,
1385 Array<OneD, NekDouble> &coords_2)
1391 Array<OneD, NekDouble> &coord)
1413 bool useCoeffPacking)
1420 Array<OneD, unsigned int> &maparray,
1421 Array<OneD, int> &signarray)
1427 Array<OneD, unsigned int> &maparray,
1428 Array<OneD, int> &signarray)
1434 Array<OneD, unsigned int> &maparray,
1435 Array<OneD, int> &signarray)
1441 Array<OneD, unsigned int> &maparray,
1442 Array<OneD, int> &signarray,
1443 int nummodesA,
int nummodesB)
1453 void StdExpansion::v_GetEdgePhysVals(
const int edge,
const boost::shared_ptr<StdExpansion> &EdgeExp,
const Array<OneD, const NekDouble> &inarray, Array<OneD,NekDouble> &outarray)
1475 Array<OneD, NekDouble> &outarray)
1478 "Method does not exist for this shape or library");
1483 const boost::shared_ptr<StdExpansion> &FaceExp,
1484 const Array<OneD, const NekDouble> &inarray,
1485 Array<OneD, NekDouble> &outarray,
1492 const Array<OneD, const NekDouble> &inarray,
1493 Array<OneD, NekDouble> &outarray)
1499 const Array<OneD, const NekDouble> &inarray,
1500 Array<OneD, NekDouble> &outarray)
1513 Array<OneD, NekDouble> &outarray)
1519 Array<OneD, NekDouble> &outarray)
1525 const Array<OneD, const NekDouble>& inarray,
1526 Array<OneD, NekDouble> &outarray)
1532 Array<OneD,NekDouble> &outarray,
1541 Array<OneD,NekDouble> &outarray,
1553 ASSERTL0(
false,
"This function is not defined in StdExpansion.");
1557 const Array<OneD, const NekDouble> &inarray,
1558 Array<OneD, NekDouble> &outarray)
1560 ASSERTL0(
false,
"This function is not defined in StdExpansion.");
1564 const Array<OneD, const NekDouble> &inarray,
1565 Array<OneD,NekDouble> &outarray,
1574 const Array<OneD, const NekDouble> &inarray,
1575 Array<OneD,NekDouble> &outarray,
1585 Array<OneD,NekDouble> &outarray,
1595 Array<OneD,NekDouble> &outarray,
1605 Array<OneD,NekDouble> &outarray,
1615 Array<OneD,NekDouble> &outarray,
1624 Array<OneD,NekDouble> &outarray,
1633 const Array<OneD, const NekDouble> &inarray,
1634 Array<OneD, NekDouble> &outarray,
1635 Array<OneD, NekDouble> &wsp)
1637 ASSERTL0(
false,
"Not implemented.");
1641 Array<OneD,NekDouble> &outarray,
1651 ASSERTL0(
false,
"Cannot get edge normals for this expansion.");
1658 ASSERTL0(
false,
"Cannot compute edge normal for this expansion.");
1663 ASSERTL0(
false,
"Not implemented.");
1668 ASSERTL0(
false,
"Not implemented.");
1674 ASSERTL0(
false,
"Cannot compute face normal for this expansion.");
1679 ASSERTL0(
false,
"Not implemented.");
1684 ASSERTL0(
false,
"Cannot compute vertex normal for this expansion.");
1689 ASSERTL0(
false,
"Cannot get face normals for this expansion.");
1696 ASSERTL0(
false,
"Cannot get vertex normals for this expansion.");
1703 ASSERTL0(
false,
"Cannot get face normals for this expansion.");
1708 Array<OneD, unsigned int>
1711 ASSERTL0(
false,
"Not implemented.");
1712 Array<OneD, unsigned int> noinversemap(1);
1713 return noinversemap;
1716 Array<OneD, unsigned int>
1720 ASSERTL0(
false,
"Not implemented.");
1721 Array<OneD, unsigned int> noinversemap(1);
1722 return noinversemap;