35 #include <boost/core/ignore_unused.hpp>
49 StdQuadExp::StdQuadExp()
58 :
StdExpansion(Ba.GetNumModes() * Bb.GetNumModes(), 2, Ba, Bb),
100 boost::ignore_unused(out_d2);
122 ASSERTL1(
false,
"input dir is out of range");
133 boost::ignore_unused(out_d2);
153 if (
m_base[0]->Collocation() &&
m_base[1]->Collocation())
156 inarray, 1, outarray, 1);
168 m_base[1]->GetNumModes());
171 outarray, wsp,
true,
true);
189 bool doCheckCollDir0,
bool doCheckCollDir1)
191 int nquad0 =
m_base[0]->GetNumPoints();
192 int nquad1 =
m_base[1]->GetNumPoints();
193 int nmodes0 =
m_base[0]->GetNumModes();
194 int nmodes1 =
m_base[1]->GetNumModes();
196 bool colldir0 = doCheckCollDir0 ? (
m_base[0]->Collocation()) :
false;
197 bool colldir1 = doCheckCollDir1 ? (
m_base[1]->Collocation()) :
false;
199 if (colldir0 && colldir1)
205 Blas::Dgemm(
'N',
'T', nquad0, nquad1, nmodes1, 1.0, &inarray[0], nquad0,
206 base1.get(), nquad1, 0.0, &outarray[0], nquad0);
210 Blas::Dgemm(
'N',
'N', nquad0, nmodes1, nmodes0, 1.0, base0.get(),
211 nquad0, &inarray[0], nmodes0, 0.0, &outarray[0], nquad0);
215 ASSERTL1(wsp.size() >= nquad0 * nmodes1,
216 "Workspace size is not sufficient");
220 Blas::Dgemm(
'N',
'N', nquad0, nmodes1, nmodes0, 1.0, base0.get(),
221 nquad0, &inarray[0], nmodes0, 0.0, &wsp[0], nquad0);
222 Blas::Dgemm(
'N',
'T', nquad0, nquad1, nmodes1, 1.0, &wsp[0], nquad0,
223 base1.get(), nquad1, 0.0, &outarray[0], nquad0);
230 if ((
m_base[0]->Collocation()) && (
m_base[1]->Collocation()))
246 out = (*matsys) * in;
254 if ((
m_base[0]->Collocation()) && (
m_base[1]->Collocation()))
261 int npoints[2] = {
m_base[0]->GetNumPoints(),
m_base[1]->GetNumPoints()};
262 int nmodes[2] = {
m_base[0]->GetNumModes(),
m_base[1]->GetNumModes()};
264 fill(outarray.get(), outarray.get() +
m_ncoeffs, 0.0);
268 for (i = 0; i < 4; i++)
274 for (i = 0; i < npoints[0]; i++)
276 physEdge[0][i] = inarray[i];
277 physEdge[2][i] = inarray[npoints[0] * npoints[1] - 1 - i];
280 for (i = 0; i < npoints[1]; i++)
282 physEdge[1][i] = inarray[npoints[0] - 1 + i * npoints[0]];
284 inarray[(npoints[1] - 1) * npoints[0] - i * npoints[0]];
289 m_base[0]->GetBasisKey()),
291 m_base[1]->GetBasisKey())};
297 for (i = 0; i < 4; i++)
299 segexp[i % 2]->FwdTransBndConstrained(physEdge[i], coeffEdge[i]);
302 for (j = 0; j < nmodes[i % 2]; j++)
305 outarray[mapArray[j]] =
sign * coeffEdge[i][j];
325 int nInteriorDofs =
m_ncoeffs - nBoundaryDofs;
332 for (i = 0; i < nInteriorDofs; i++)
334 rhs[i] = tmp1[mapArray[i]];
337 Blas::Dgemv(
'N', nInteriorDofs, nInteriorDofs, 1.0,
338 &(matsys->GetPtr())[0], nInteriorDofs, rhs.get(), 1, 0.0,
341 for (i = 0; i < nInteriorDofs; i++)
343 outarray[mapArray[i]] = result[i];
380 if (
m_base[0]->Collocation() &&
m_base[1]->Collocation())
394 int nquad0 =
m_base[0]->GetNumPoints();
395 int nquad1 =
m_base[1]->GetNumPoints();
396 int order0 =
m_base[0]->GetNumModes();
398 if (multiplybyweights)
406 m_base[1]->GetBdata(), tmp, outarray, wsp,
413 m_base[1]->GetBdata(), inarray, outarray,
427 inarray.get(), 1, 0.0, outarray.get(), 1);
441 ASSERTL0((dir == 0) || (dir == 1),
"input dir is out of range");
443 int nquad0 =
m_base[0]->GetNumPoints();
444 int nquad1 =
m_base[1]->GetNumPoints();
445 int nqtot = nquad0 * nquad1;
446 int order0 =
m_base[0]->GetNumModes();
457 m_base[1]->GetDbdata(), tmp, outarray, wsp,
463 m_base[1]->GetBdata(), tmp, outarray, wsp,
472 ASSERTL0((dir == 0) || (dir == 1),
"input dir is out of range");
490 inarray.get(), 1, 0.0, outarray.get(), 1);
508 bool doCheckCollDir0,
bool doCheckCollDir1)
510 int nquad0 =
m_base[0]->GetNumPoints();
511 int nquad1 =
m_base[1]->GetNumPoints();
512 int nmodes0 =
m_base[0]->GetNumModes();
513 int nmodes1 =
m_base[1]->GetNumModes();
515 bool colldir0 = doCheckCollDir0 ? (
m_base[0]->Collocation()) :
false;
516 bool colldir1 = doCheckCollDir1 ? (
m_base[1]->Collocation()) :
false;
518 if (colldir0 && colldir1)
524 Blas::Dgemm(
'N',
'N', nmodes0, nmodes1, nquad1, 1.0, inarray.get(),
525 nmodes0, base1.get(), nquad1, 0.0, outarray.get(), nmodes0);
529 Blas::Dgemm(
'T',
'N', nmodes0, nquad1, nquad0, 1.0, base0.get(), nquad0,
530 inarray.get(), nquad0, 0.0, outarray.get(), nmodes0);
534 ASSERTL1(wsp.size() >= nquad1 * nmodes0,
535 "Workspace size is not sufficient");
538 Blas::Dgemm(
'T',
'N', nmodes0, nquad1, nquad0, 1.0, base0.get(), nquad0,
539 inarray.get(), nquad0, 0.0, wsp.get(), nmodes0);
542 for (
int i = 0; i < nmodes0; ++i)
544 for (
int j = 0; j < nquad1; ++j)
546 wsp[j * nmodes0 + i] =
547 Blas::Ddot(nquad0, base0.get() + i * nquad0, 1,
548 inarray.get() + j * nquad0, 1);
552 Blas::Dgemm(
'N',
'N', nmodes0, nmodes1, nquad1, 1.0, wsp.get(), nmodes0,
553 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;
592 ASSERTL2(mode1 == (
int)floor((1.0 * mode) / btmp0),
593 "Integer Truncation not Equiv to Floor");
596 "calling argument mode is larger than total expansion order");
598 for (i = 0; i < nquad1; ++i)
601 &outarray[0] + i * nquad0, 1);
604 for (i = 0; i < nquad0; ++i)
607 &outarray[0] + i, nquad0, &outarray[0] + i, nquad0);
627 ASSERTL2((i >= 0) && (i <= 3),
"edge id is out of range");
629 if ((i == 0) || (i == 2))
641 ASSERTL2((i >= 0) && (i <= 3),
"edge id is out of range");
643 if ((i == 0) || (i == 2))
656 boost::ignore_unused(j);
657 ASSERTL2((i >= 0) && (i <= 3),
"edge id is out of range");
659 if ((i == 0) || (i == 2))
679 "BasisType is not a boundary interior form");
683 "BasisType is not a boundary interior form");
693 "BasisType is not a boundary interior form");
697 "BasisType is not a boundary interior form");
703 const std::vector<unsigned int> &nummodes,
int &modes_offset)
705 int nmodes = nummodes[modes_offset] * nummodes[modes_offset + 1];
713 bool returnval =
false;
732 boost::ignore_unused(coords_2);
739 for (i = 0; i < nq1; ++i)
741 Blas::Dcopy(nq0, z0.get(), 1, &coords_0[0] + i * nq0, 1);
742 Vmath::Fill(nq0, z1[i], &coords_1[0] + i * nq0, 1);
766 const int nm0 =
m_base[0]->GetNumModes();
767 const int nm1 =
m_base[1]->GetNumModes();
769 return StdExpansion::BaryEvaluateBasis<0>(coords[0], mode % nm1) *
770 StdExpansion::BaryEvaluateBasis<1>(coords[1], mode / nm0);
781 int nummodes0, nummodes1;
782 int value1 = 0, value2 = 0;
788 nummodes0 =
m_base[0]->GetNumModes();
789 nummodes1 =
m_base[1]->GetNumModes();
801 value1 = 2 * nummodes0;
804 ASSERTL0(0,
"Mapping array is not defined for this expansion");
808 for (i = 0; i < value1; i++)
818 value2 = value1 + nummodes0 - 1;
824 ASSERTL0(0,
"Mapping array is not defined for this expansion");
828 for (i = 0; i < nummodes1 - 2; i++)
830 outarray[cnt++] = value1 + i * nummodes0;
831 outarray[cnt++] = value2 + i * nummodes0;
837 for (i = nummodes0 * (nummodes1 - 1); i <
GetNcoeffs(); i++)
848 int nummodes0, nummodes1;
855 nummodes0 =
m_base[0]->GetNumModes();
856 nummodes1 =
m_base[1]->GetNumModes();
864 startvalue = nummodes0;
867 startvalue = 2 * nummodes0;
870 ASSERTL0(0,
"Mapping array is not defined for this expansion");
883 ASSERTL0(0,
"Mapping array is not defined for this expansion");
887 for (i = 0; i < nummodes1 - 2; i++)
889 for (j = 0; j < nummodes0 - 2; j++)
891 outarray[cnt++] = startvalue + j;
893 startvalue += nummodes0;
901 if (useCoeffPacking ==
true)
903 switch (localVertexId)
914 localDOF =
m_base[0]->GetNumModes() - 1;
926 localDOF =
m_base[0]->GetNumModes() *
927 (
m_base[1]->GetNumModes() - 1);
931 localDOF =
m_base[0]->GetNumModes();
940 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");
955 switch (localVertexId)
966 localDOF =
m_base[0]->GetNumModes() - 1;
979 m_base[0]->GetNumModes() *
m_base[1]->GetNumModes() - 1;
983 localDOF =
m_base[0]->GetNumModes() + 1;
991 localDOF =
m_base[0]->GetNumModes() *
992 (
m_base[1]->GetNumModes() - 1);
996 localDOF =
m_base[0]->GetNumModes();
1001 ASSERTL0(
false,
"eid must be between 0 and 3");
1015 ASSERTL1(traceid < 4,
"traceid must be between 0 and 3");
1018 unsigned int order0 =
m_base[0]->GetNumModes();
1019 unsigned int order1 =
m_base[1]->GetNumModes();
1020 unsigned int numModes = (traceid % 2) ? order1 : order0;
1022 if (maparray.size() != numModes)
1035 for (i = 0; i < numModes; i++)
1043 for (i = 0; i < numModes; i++)
1045 maparray[i] = i * order0 + 1;
1051 for (i = 0; i < numModes; i++)
1053 maparray[i] = order0 + i;
1059 for (i = 0; i < numModes; i++)
1061 maparray[i] = i * order0;
1076 for (i = 0; i < numModes; i++)
1084 for (i = 0; i < numModes; i++)
1086 maparray[i] = (i + 1) * order0 - 1;
1092 for (i = 0; i < numModes; i++)
1094 maparray[i] = order0 * (order1 - 1) + i;
1100 for (i = 0; i < numModes; i++)
1102 maparray[i] = order0 * i;
1112 ASSERTL0(
false,
"Mapping not defined for this type of basis");
1121 const int nummodes0 =
m_base[0]->GetNumModes();
1122 const int nummodes1 =
m_base[1]->GetNumModes();
1126 if (maparray.size() != nEdgeIntCoeffs)
1131 if (signarray.size() != nEdgeIntCoeffs)
1137 fill(signarray.get(), signarray.get() + nEdgeIntCoeffs, 1);
1146 for (i = 0; i < nEdgeIntCoeffs; i++)
1148 maparray[i] = i + 2;
1154 for (i = 0; i < nEdgeIntCoeffs; i++)
1156 maparray[i] = (i + 2) * nummodes0 + 1;
1162 for (i = 0; i < nEdgeIntCoeffs; i++)
1164 maparray[i] = nummodes0 + i + 2;
1170 for (i = 0; i < nEdgeIntCoeffs; i++)
1172 maparray[i] = (i + 2) * nummodes0;
1177 ASSERTL0(
false,
"eid must be between 0 and 3");
1183 for (i = 1; i < nEdgeIntCoeffs; i += 2)
1195 for (i = 0; i < nEdgeIntCoeffs; i++)
1197 maparray[i] = i + 1;
1203 for (i = 0; i < nEdgeIntCoeffs; i++)
1205 maparray[i] = (i + 2) * nummodes0 - 1;
1211 for (i = 0; i < nEdgeIntCoeffs; i++)
1213 maparray[i] = nummodes0 * (nummodes1 - 1) + i + 1;
1219 for (i = 0; i < nEdgeIntCoeffs; i++)
1221 maparray[i] = nummodes0 * (i + 1);
1226 ASSERTL0(
false,
"eid must be between 0 and 3");
1231 reverse(maparray.get(), maparray.get() + nEdgeIntCoeffs);
1236 ASSERTL0(
false,
"Mapping not defined for this type of basis");
1257 int nq0 =
m_base[0]->GetNumPoints();
1258 int nq1 =
m_base[1]->GetNumPoints();
1281 for (
int i = 0; i < nq; ++i)
1283 for (
int j = 0; j < nq; ++j, ++cnt)
1286 coords[cnt][0] = -1.0 + 2 * j / (
NekDouble)(nq - 1);
1287 coords[cnt][1] = -1.0 + 2 * i / (
NekDouble)(nq - 1);
1291 for (
int i = 0; i < neq; ++i)
1295 I[0] =
m_base[0]->GetI(coll);
1296 I[1] =
m_base[1]->GetI(coll + 1);
1299 for (
int j = 0; j < nq1; ++j)
1305 Mat->GetRawPtr() + j * nq0 * neq + i, neq);
1317 for (i = 0; i < order1; ++i)
1319 (*Mat)(order0 * i + 1, i * order0 + 1) = 1.0;
1325 for (i = 0; i < order0; ++i)
1327 (*Mat)(order0 + i, order0 + i) = 1.0;
1341 (*Mat) = Imass * Iprod;
1349 int dir = (edge + 1) % 2;
1350 int nCoeffs =
m_base[dir]->GetNumModes();
1358 coords[0] = (edge == 0 || edge == 3) ? -1.0 : 1.0;
1365 Vmath::Vcopy(nCoeffs, m_Ix->GetPtr(), 1, Mat->GetPtr(), 1);
1394 if (inarray.get() == outarray.get())
1400 m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
1405 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
1413 int qa =
m_base[0]->GetNumPoints();
1414 int qb =
m_base[1]->GetNumPoints();
1415 int nmodes_a =
m_base[0]->GetNumModes();
1416 int nmodes_b =
m_base[1]->GetNumModes();
1417 int nmodes = min(nmodes_a, nmodes_b);
1430 OrthoExp.
FwdTrans(array, orthocoeffs);
1440 for (
int j = 0; j < nmodes_a; ++j)
1442 for (
int k = 0; k < nmodes_b; ++k)
1446 pow((1.0 * j) / (nmodes_a - 1), cutoff * nmodes_a),
1447 pow((1.0 * k) / (nmodes_b - 1), cutoff * nmodes_b));
1449 orthocoeffs[j * nmodes_b + k] *= SvvDiffCoeff * fac;
1460 max_ab = max(max_ab, 0);
1463 for (
int j = 0; j < nmodes_a; ++j)
1465 for (
int k = 0; k < nmodes_b; ++k)
1467 int maxjk = max(j, k);
1470 orthocoeffs[j * nmodes_b + k] *=
1480 min(nmodes_a, nmodes_b));
1486 for (
int j = 0; j < nmodes_a; ++j)
1488 for (
int k = 0; k < nmodes_b; ++k)
1490 if (j + k >= cutoff)
1492 orthocoeffs[j * nmodes_b + k] *=
1494 exp(-(j + k - nmodes) * (j + k - nmodes) /
1496 (j + k - cutoff + 1)))));
1500 orthocoeffs[j * nmodes_b + k] *= 0.0;
1508 OrthoExp.
BwdTrans(orthocoeffs, array);
1517 int qa =
m_base[0]->GetNumPoints();
1518 int qb =
m_base[1]->GetNumPoints();
1519 int nmodesA =
m_base[0]->GetNumModes();
1520 int nmodesB =
m_base[1]->GetNumModes();
1521 int P = nmodesA - 1;
1522 int Q = nmodesB - 1;
1533 int Pcut = cutoff *
P;
1534 int Qcut = cutoff * Q;
1538 OrthoExp.
FwdTrans(array, orthocoeffs);
1542 for (
int i = 0; i < nmodesA; ++i)
1544 for (
int j = 0; j < nmodesB; ++j)
1547 if (i > Pcut || j > Qcut)
1551 fac = max(fac1, fac2);
1552 fac = pow(fac, exponent);
1553 orthocoeffs[i * nmodesB + j] *= exp(-alpha * fac);
1559 OrthoExp.
BwdTrans(orthocoeffs, array);
1566 int n_coeffs = inarray.size();
1573 int nmodes0 =
m_base[0]->GetNumModes();
1574 int nmodes1 =
m_base[1]->GetNumModes();
1575 int numMax = nmodes0;
1595 for (
int i = 0; i < numMin + 1; ++i)
1597 Vmath::Vcopy(numMin, tmp = coeff + cnt, 1, tmp2 = coeff_tmp + cnt, 1);
1646 int nquad0 =
m_base[0]->GetNumPoints();
1647 int nquad1 =
m_base[1]->GetNumPoints();
1653 for (i = 0; i < nquad1; ++i)
1655 Vmath::Vmul(nquad0, inarray.get() + i * nquad0, 1, w0.get(), 1,
1656 outarray.get() + i * nquad0, 1);
1659 for (i = 0; i < nquad0; ++i)
1661 Vmath::Vmul(nquad1, outarray.get() + i, nquad0, w1.get(), 1,
1662 outarray.get() + i, nquad0);
1669 boost::ignore_unused(standard);
1671 int np1 =
m_base[0]->GetNumPoints();
1672 int np2 =
m_base[1]->GetNumPoints();
1673 int np = max(np1, np2);
1680 for (
int i = 0; i < np - 1; ++i)
1683 for (
int j = 0; j < np - 1; ++j)
1685 conn[cnt++] = row + j;
1686 conn[cnt++] = row + j + 1;
1687 conn[cnt++] = rowp1 + j;
1689 conn[cnt++] = rowp1 + j + 1;
1690 conn[cnt++] = rowp1 + j;
1691 conn[cnt++] = row + j + 1;
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
#define sign(a, b)
return the sign(b)*a
Describes the specification for a Basis.
Defines a specification for a set of points.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
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.
NekDouble Integral(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &w0, const Array< OneD, const NekDouble > &w1)
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)
virtual void v_HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
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)
The base class for all shapes.
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
const LibUtilities::BasisSharedPtr & GetBasis(int dir) const
This function gets the shared point to basis in the dir direction.
void WeakDerivMatrixOp_MatFree(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
int NumBndryCoeffs(void) const
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
void LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Convert local cartesian coordinate xi into local collapsed coordinates eta.
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
DNekMatSharedPtr CreateGeneralMatrix(const StdMatrixKey &mkey)
this function generates the mass matrix
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 LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void GetTraceToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient=eForwards, int P=-1, int Q=-1)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
void GetInteriorMap(Array< OneD, unsigned int > &outarray)
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Backward transformation from coefficient space to physical space.
int GetTraceNcoeffs(const int i) const
This function returns the number of expansion coefficients belonging to the i-th trace.
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
void FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Forward transformation from physical space to coefficient space.
LibUtilities::NekManager< StdMatrixKey, DNekBlkMat, StdMatrixKey::opLess > m_stdStaticCondMatrixManager
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
LibUtilities::NekManager< StdMatrixKey, DNekMat, StdMatrixKey::opLess > m_stdMatrixManager
int GetBasisNumModes(const int dir) const
This function returns the number of expansion modes in the dir direction.
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void MassMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
const ConstFactorMap & GetConstFactors() const
MatrixType GetMatrixType() const
NekDouble GetConstFactor(const ConstFactorType &factor) const
bool ConstFactorExists(const ConstFactorType &factor) const
virtual int v_NumBndryCoeffs() const
virtual void v_IProductWRTDerivBase(const int dir, 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.
virtual const LibUtilities::BasisKey v_GetTraceBasisKey(const int i, const int j) const
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
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)
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.
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual int v_NumDGBndryCoeffs() const
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrates the specified function over the domain.
virtual void v_ExponentialFilter(Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff)
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
virtual void v_GetTraceCoeffMap(const unsigned int traceid, Array< OneD, unsigned int > &maparray)
Get the map of the coefficient location to teh local trace coefficients.
virtual LibUtilities::ShapeType v_DetShapeType() const
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
virtual void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
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.
virtual void v_FwdTransBndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual bool v_IsBoundaryInteriorExpansion()
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
virtual int v_GetNverts() const
virtual int v_GetNtraces() const
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &array)
Fill outarray with mode mode of expansion.
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
virtual NekDouble v_PhysEvaluateBasis(const Array< OneD, const NekDouble > &coords, int mode)
This function evaluates the basis function mode mode at a point coords of the domain.
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)
virtual void v_LocCollapsedToLocCoord(const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi)
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2)
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_GetTraceNcoeffs(const int i) const
virtual int v_GetTraceNumPoints(const int i) const
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
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)
virtual void v_GetTraceInteriorToElementMap(const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation edgeOrient=eForwards)
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
static void Dgemv(const char &trans, const int &m, const int &n, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
BLAS level 2: Matrix vector multiply y = A x where A[m x n].
static void Dcopy(const int &n, const double *x, const int &incx, double *y, const int &incy)
BLAS level 1: Copy x to y.
static double Ddot(const int &n, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: output = .
static void Dgemm(const char &transa, const char &transb, const int &m, const int &n, const int &k, const double &alpha, const double *a, const int &lda, const double *b, const int &ldb, const double &beta, double *c, const int &ldc)
BLAS level 3: Matrix-matrix multiply C = A x B where op(A)[m x k], op(B)[k x n], C[m x n] DGEMM perfo...
int getNumberOfCoefficients(int Na, int Nb)
BasisManagerT & BasisManager(void)
std::shared_ptr< Basis > BasisSharedPtr
void InterpCoeff2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
@ eGauss_Lagrange
Lagrange Polynomials using the Gauss points.
@ eOrtho_A
Principle Orthogonal Functions .
@ eGLL_Lagrange
Lagrange for SEM basis .
@ eModified_A
Principle Modified Functions .
@ eFourier
Fourier Expansion .
static const NekDouble kNekZeroTol
@ eFactorSVVDGKerDiffCoeff
@ eFactorSVVPowerKerDiffCoeff
const int kSVVDGFiltermodesmin
const int kSVVDGFiltermodesmax
const NekDouble kSVVDGFilter[9][11]
@ ePhysInterpToEquiSpaced
std::map< ConstFactorType, NekDouble > ConstFactorMap
std::shared_ptr< StdSegExp > StdSegExpSharedPtr
The above copyright notice and this permission notice shall be included.
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
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.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Zero(int n, T *x, const int incx)
Zero vector.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
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.