59 std::string(
"StdExpansionStdMatrix")),
60 m_stdStaticCondMatrixManager(
61 boost::bind(&
StdExpansion::CreateStdStaticCondMatrix, this, _1),
62 std::string(
"StdExpansionStdStaticCondMatrix")),
65 std::string(
"StdExpansionIndexMap"))
67 switch(
m_base.num_elements())
71 "NULL Basis attempting to be used.");
76 "NULL Basis attempting to be used.");
81 "NULL Basis attempting to be used.");
94 m_elmt_id(T.m_elmt_id),
95 m_ncoeffs(T.m_ncoeffs),
96 m_stdMatrixManager(T.m_stdMatrixManager),
97 m_stdStaticCondMatrixManager(T.m_stdStaticCondMatrixManager),
98 m_IndexMapManager(T.m_IndexMapManager)
107 const Array<OneD, const NekDouble>& sol)
111 Array<OneD, NekDouble> wsp(ntot);
129 const Array<OneD, const NekDouble>& sol)
133 Array<OneD, NekDouble> wsp(ntot);
135 if (sol.num_elements() == 0)
159 const Array<OneD, const NekDouble>& sol)
165 Array<OneD, NekDouble> wsp(3*ntot);
166 Array<OneD, NekDouble> wsp_deriv = wsp + ntot;
167 Array<OneD, NekDouble> sum = wsp_deriv + ntot;
181 for(i = 0; i < coordim; ++i)
207 Array<OneD,unsigned int> bmap(nbdry);
208 Array<OneD,unsigned int> imap(nint);
212 for(i = 0; i < nbdry; ++i)
214 for(j = 0; j < nbdry; ++j)
216 (*A)(i,j) = (*mat)(bmap[i],bmap[j]);
219 for(j = 0; j < nint; ++j)
221 (*B)(i,j) = (*mat)(bmap[i],imap[j]);
225 for(i = 0; i < nint; ++i)
227 for(j = 0; j < nbdry; ++j)
229 (*C)(i,j) = (*mat)(imap[i],bmap[j]);
232 for(j = 0; j < nint; ++j)
234 (*D)(i,j) = (*mat)(imap[i],imap[j]);
243 (*A) = (*A) - (*B)*(*C);
247 Array<OneD, unsigned int> exp_size(2);
252 returnval->SetBlock(0,0,A);
253 returnval->SetBlock(0,1,B);
254 returnval->SetBlock(1,0,C);
255 returnval->SetBlock(1,1,D);
270 Array<OneD,unsigned int> map;
271 Array<OneD,int>
sign;
297 ASSERTL0(
false,
"Boundary Index Map not implemented yet.");
302 ASSERTL0(
false,
"Vertex Index Map not implemented yet.");
307 ASSERTL0(
false,
"The Index Map you are requiring is not between the possible options.");
313 for(
int i = 0; i < map.num_elements(); i++)
315 (*returnval)[i].index = map[i];
316 (*returnval)[i].sign = sign[i];
350 Array<OneD, NekDouble> tmpout(nq);
362 returnval->GetRawPtr()+i*nq,1);
369 Array<OneD, NekDouble> tmpin(nq);
370 Array<OneD, NekDouble> tmpout(
m_ncoeffs);
374 for(i=0; i < nq; ++i)
389 Array<OneD, NekDouble> tmpin(nq);
390 Array<OneD, NekDouble> tmpout(
m_ncoeffs);
394 for(i=0; i < nq; ++i)
409 Array<OneD, NekDouble> tmpin(nq);
410 Array<OneD, NekDouble> tmpout(
m_ncoeffs);
414 for(i=0; i < nq; ++i)
429 Array<OneD, NekDouble> tmpin(nq);
430 Array<OneD, NekDouble> tmpout(
m_ncoeffs);
434 for(i=0; i < nq; ++i)
475 &(Mat.GetPtr())[0]+i*m_ncoeffs,1);
490 Array<OneD,NekDouble> &outarray,
559 Array<OneD,NekDouble> &outarray,
628 Array<OneD,NekDouble> &outarray,
632 Array<OneD, NekDouble> tmp(nq);
645 const Array<OneD, const NekDouble> &inarray,
646 Array<OneD,NekDouble> &outarray,
653 Array<OneD, NekDouble> tmp(nq);
654 Array<OneD, NekDouble> dtmp(nq);
700 Array<OneD,NekDouble> &outarray,
708 Array<OneD,NekDouble> store2(
m_ncoeffs,0.0);
713 for(i = 0; i < dim; ++i)
727 for(i = 0; i < dim; i++)
729 for(j = 0; j < dim; j++)
742 const Array<OneD, const NekDouble> &inarray,
743 Array<OneD,NekDouble> &outarray,
762 Array<OneD,NekDouble> &outarray,
767 Array<OneD, NekDouble> tmp(nq);
786 Array<OneD,NekDouble> &outarray,
837 Array<OneD,NekDouble> &outarray,
839 bool addDiffusionTerm)
844 ASSERTL0(ndir,
"Must define at least one advection velocity");
848 Array<OneD, NekDouble> tmp(3*totpts);
849 Array<OneD, NekDouble> tmp_deriv = tmp + totpts;
850 Array<OneD, NekDouble> tmp_adv = tmp_deriv + totpts;
853 ASSERTL1(ndir <=
GetCoordim(),
"Number of constants is larger than coordinate dimensions");
861 for(i = 0; i < ndir; ++i)
893 Array<OneD,NekDouble> &outarray,
904 Blas::Daxpy(
m_ncoeffs, lambda, tmp, 1, outarray, 1);
908 Array<OneD, NekDouble> &outarray)
914 Blas::Dgemv(
'N',nq,
m_ncoeffs,1.0,bwdtransmat->GetPtr().get(),
915 nq, inarray.get(), 1, 0.0, outarray.get(), 1);
925 const Array<OneD, const NekDouble> &physvals)
959 const std::vector<unsigned int > &nummodes,
960 const int nmode_offset,
974 const Array<OneD, const NekDouble> &Fx,
975 const Array<OneD, const NekDouble> &Fy,
976 const Array<OneD, const NekDouble> &Fz,
977 Array< OneD, NekDouble> &outarray)
1021 Array<OneD, const NekDouble> &inarray,
1022 Array<OneD, NekDouble> &outarray)
1028 Array<OneD, NekDouble> &coeffs,
1036 const Array<OneD, const NekDouble> &physvals)
1050 ASSERTL0(
false,
"This function is needs defining for this shape");
1056 ASSERTL0(
false,
"This function is needs defining for this shape");
1062 ASSERTL0(
false,
"This function is needs defining for this shape");
1068 ASSERTL0(
false,
"This function is needs defining for this shape");
1074 ASSERTL0(
false,
"This function is not valid or not defined");
1080 ASSERTL0(
false,
"This function is not valid or not defined");
1086 ASSERTL0(
false,
"This function is not valid or not defined");
1092 ASSERTL0(
false,
"This function is not valid or not defined");
1098 ASSERTL0(
false,
"This function is not valid or not defined");
1104 ASSERTL0(
false,
"This function is not valid or not defined");
1110 ASSERTL0(
false,
"This function is not valid or not defined");
1116 ASSERTL0(
false,
"This function is not valid or not defined");
1122 ASSERTL0(
false,
"This function is not valid or not defined");
1128 ASSERTL0(
false,
"This function is not valid or not defined");
1134 ASSERTL0(
false,
"This function is not valid or not defined");
1140 ASSERTL0(
false,
"This function is not valid or not defined");
1147 ASSERTL0(
false,
"This expansion does not have a shape type defined");
1153 ASSERTL0(
false,
"This function is not valid or not defined");
1159 ASSERTL0(
false,
"This function has not been defined for this expansion");
1164 const Array<OneD, const NekDouble>& inarray,
1165 Array<OneD, NekDouble> &outarray)
1174 Array<OneD, NekDouble> &outarray)
1187 "local expansions");
1195 "specific element types");
1201 "specific element types");
1209 Array<OneD, NekDouble> &out_d1,
1210 Array<OneD, NekDouble> &out_d2,
1211 Array<OneD, NekDouble> &out_d3)
1214 "local expansions");
1218 Array<OneD, NekDouble> &out_ds)
1221 "local expansions");
1224 Array<OneD, NekDouble>& out_dn)
1227 "local expansions");
1236 const Array<OneD, const NekDouble>& inarray,
1237 Array<OneD, NekDouble> &out_d0)
1241 "specific element types");
1249 const Array<OneD, const NekDouble>& direction,
1250 Array<OneD, NekDouble> &outarray)
1253 "specific element types");
1257 Array<OneD, NekDouble> &out_d1,
1258 Array<OneD, NekDouble> &out_d2,
1259 Array<OneD, NekDouble> &out_d3)
1265 const Array<OneD, const NekDouble>& inarray,
1266 Array<OneD, NekDouble> &outarray)
1289 "been defined for this shape");
1295 "been defined for this element");
1303 "been defined for this element");
1309 Array<OneD, NekDouble> &coords_1,
1310 Array<OneD, NekDouble> &coords_2)
1316 Array<OneD, NekDouble> &coord)
1338 bool useCoeffPacking)
1345 Array<OneD, unsigned int> &maparray,
1346 Array<OneD, int> &signarray)
1352 Array<OneD, unsigned int> &maparray,
1353 Array<OneD, int> &signarray)
1359 Array<OneD, unsigned int> &maparray,
1360 Array<OneD, int> &signarray)
1366 Array<OneD, unsigned int> &maparray,
1367 Array<OneD, int> &signarray,
1368 int nummodesA,
int nummodesB)
1378 void StdExpansion::v_GetEdgePhysVals(
const int edge,
const boost::shared_ptr<StdExpansion> &EdgeExp,
const Array<OneD, const NekDouble> &inarray, Array<OneD,NekDouble> &outarray)
1400 Array<OneD, NekDouble> &outarray)
1403 "Method does not exist for this shape or library");
1408 const boost::shared_ptr<StdExpansion> &FaceExp,
1409 const Array<OneD, const NekDouble> &inarray,
1410 Array<OneD, NekDouble> &outarray,
1417 const Array<OneD, const NekDouble> &inarray,
1418 Array<OneD, NekDouble> &outarray)
1424 const Array<OneD, const NekDouble> &inarray,
1425 Array<OneD, NekDouble> &outarray)
1438 Array<OneD, NekDouble> &outarray)
1444 Array<OneD, NekDouble> &outarray)
1450 const Array<OneD, const NekDouble>& inarray,
1451 Array<OneD, NekDouble> &outarray)
1457 Array<OneD,NekDouble> &outarray,
1466 Array<OneD,NekDouble> &outarray,
1478 ASSERTL0(
false,
"This function is not defined in StdExpansion.");
1482 const Array<OneD, const NekDouble> &inarray,
1483 Array<OneD, NekDouble> &outarray)
1485 ASSERTL0(
false,
"This function is not defined in StdExpansion.");
1489 const Array<OneD, const NekDouble> &inarray,
1490 Array<OneD,NekDouble> &outarray,
1499 const Array<OneD, const NekDouble> &inarray,
1500 Array<OneD,NekDouble> &outarray,
1510 Array<OneD,NekDouble> &outarray,
1520 Array<OneD,NekDouble> &outarray,
1530 Array<OneD,NekDouble> &outarray,
1540 Array<OneD,NekDouble> &outarray,
1549 Array<OneD,NekDouble> &outarray,
1558 const Array<OneD, const NekDouble> &inarray,
1559 Array<OneD, NekDouble> &outarray,
1560 Array<OneD, NekDouble> &wsp)
1562 ASSERTL0(
false,
"Not implemented.");
1566 Array<OneD,NekDouble> &outarray,
1576 ASSERTL0(
false,
"Cannot get edge normals for this expansion.");
1583 ASSERTL0(
false,
"Cannot compute edge normal for this expansion.");
1588 ASSERTL0(
false,
"Not implemented.");
1593 ASSERTL0(
false,
"Not implemented.");
1599 ASSERTL0(
false,
"Cannot compute face normal for this expansion.");
1604 ASSERTL0(
false,
"Not implemented.");
1609 ASSERTL0(
false,
"Cannot compute vertex normal for this expansion.");
1614 ASSERTL0(
false,
"Cannot get face normals for this expansion.");
1621 ASSERTL0(
false,
"Cannot get vertex normals for this expansion.");
1628 ASSERTL0(
false,
"Cannot get face normals for this expansion.");
1633 Array<OneD, unsigned int>
1636 ASSERTL0(
false,
"Not implemented.");
1637 Array<OneD, unsigned int> noinversemap(1);
1638 return noinversemap;
1641 Array<OneD, unsigned int>
1645 ASSERTL0(
false,
"Not implemented.");
1646 Array<OneD, unsigned int> noinversemap(1);
1647 return noinversemap;
1659 const Array<OneD, const NekDouble> &inarray,
1660 Array<OneD, NekDouble> &outarray)
1669 for(
int i = 0; i <
m_base.num_elements(); ++i)
1671 nqbase =
m_base[i]->GetNumPoints();
1673 np = max(np,nqbase);
1678 out = (*intmat) * in;
1682 Array<OneD, int> &conn,
1685 ASSERTL0(
false,
"Not implemented.");