47 [[maybe_unused]]
int numcoeffs,
58 const int nquad0 =
m_base[0]->GetNumPoints();
59 const int nquad1 =
m_base[1]->GetNumPoints();
60 const int nquad2 =
m_base[2]->GetNumPoints();
65 Vmath::Vcopy(nquad0 * nquad1 * nquad2, &inarray[0], 1, &wsp[0], 1);
67 if (out_dx.size() > 0)
71 Blas::Dgemm(
'N',
'N', nquad0, nquad1 * nquad2, nquad0, 1.0, D0, nquad0,
72 &wsp[0], nquad0, 0.0, &out_dx[0], nquad0);
75 if (out_dy.size() > 0)
78 for (
int j = 0; j < nquad2; ++j)
81 &wsp[j * nquad0 * nquad1], nquad0, D1, nquad1, 0.0,
82 &out_dy[j * nquad0 * nquad1], nquad0);
86 if (out_dz.size() > 0)
90 Blas::Dgemm(
'N',
'T', nquad0 * nquad1, nquad2, nquad2, 1.0, &wsp[0],
91 nquad0 * nquad1, D2, nquad2, 0.0, &out_dz[0],
102 bool doCheckCollDir0,
bool doCheckCollDir1,
bool doCheckCollDir2)
105 doCheckCollDir0, doCheckCollDir1, doCheckCollDir2);
114 bool doCheckCollDir0,
bool doCheckCollDir1,
bool doCheckCollDir2)
117 doCheckCollDir0, doCheckCollDir1,
123 ASSERTL1((dir == 0) || (dir == 1) || (dir == 2),
"Invalid direction.");
125 const int nq0 =
m_base[0]->GetNumPoints();
126 const int nq1 =
m_base[1]->GetNumPoints();
127 const int nq2 =
m_base[2]->GetNumPoints();
128 const int nq = nq0 * nq1 * nq2;
129 const int nm0 =
m_base[0]->GetNumModes();
130 const int nm1 =
m_base[1]->GetNumModes();
143 for (
int i = 0; i < nq; i++)
148 m_base[2]->GetBdata(), tmp2, tmp5, wsp,
false,
true,
true);
154 (*mat)(j, i) = tmp5[j];
159 for (
int i = 0; i < nq; i++)
164 m_base[2]->GetBdata(), tmp2, tmp5, wsp,
true,
false,
true);
170 (*mat)(j, i) = tmp5[j];
175 for (
int i = 0; i < nq; i++)
180 m_base[2]->GetDbdata(), tmp2, tmp5, wsp,
true,
true,
false);
185 (*mat)(j, i) = tmp5[j];
211 const int nq0 =
m_base[0]->GetNumPoints();
212 const int nq1 =
m_base[1]->GetNumPoints();
213 const int nq2 =
m_base[2]->GetNumPoints();
219 for (
int i = 0; i < nq1 * nq2; ++i, ptr += nq0)
221 wsp1[i] = StdExpansion::BaryEvaluate<0>(eta[0], ptr);
224 for (
int i = 0; i < nq2; ++i)
226 wsp2[i] = StdExpansion::BaryEvaluate<1>(eta[1], &wsp1[i * nq1]);
229 return StdExpansion::BaryEvaluate<2>(eta[2], &wsp2[0]);
238 int Qx =
m_base[0]->GetNumPoints();
239 int Qy =
m_base[1]->GetNumPoints();
240 int Qz =
m_base[2]->GetNumPoints();
250 interpolatingNodes = &I[0]->GetPtr()[0];
252 Blas::Dgemv(
'T', Qx, Qy * Qz, 1.0, &physvals[0], Qx, &interpolatingNodes[0],
253 1, 0.0, &sumFactorization_qr[0], 1);
256 interpolatingNodes = &I[1]->GetPtr()[0];
258 Blas::Dgemv(
'T', Qy, Qz, 1.0, &sumFactorization_qr[0], Qy,
259 &interpolatingNodes[0], 1, 0.0, &sumFactorization_r[0], 1);
262 interpolatingNodes = &I[2]->GetPtr()[0];
263 value =
Blas::Ddot(Qz, interpolatingNodes, 1, &sumFactorization_r[0], 1);
271 [[maybe_unused]] std::array<NekDouble, 3> &firstOrderDerivs)
301 if (!(
m_base[0]->Collocation() &&
m_base[1]->Collocation() &&
302 m_base[2]->Collocation()))
333 int nquad0 =
m_base[0]->GetNumPoints();
334 int nquad1 =
m_base[1]->GetNumPoints();
335 int nquad2 =
m_base[2]->GetNumPoints();
336 int nmodes0 =
m_base[0]->GetNumModes();
337 int nmodes1 =
m_base[1]->GetNumModes();
338 int nmodes2 =
m_base[2]->GetNumModes();
339 int wspsize = max(nquad0 * nmodes2 * (nmodes1 + nquad1),
340 nquad0 * nquad1 * (nquad2 + nmodes0) +
341 nmodes0 * nmodes1 * nquad2);
352 if (!(
m_base[0]->Collocation() &&
m_base[1]->Collocation() &&
353 m_base[2]->Collocation()))
364 wsp2,
true,
true,
true);
409 [[maybe_unused]]
const int tid,
427 if (maparray.size() != map2.size())
432 for (
int i = 0; i < map2.size(); ++i)
434 maparray[i] = map1[map2[i]];
439 [[maybe_unused]]
const int facedir,
444 switch (faceDirBasisType)
496 const int numpoints,
const int nummodes)
498 switch (faceDirBasisType)
523 numpoints, LibUtilities::eGaussRadauMAlpha1Beta0);
551 numpoints, LibUtilities::eGaussRadauMAlpha1Beta0);
581 numpoints, LibUtilities::eGaussRadauMAlpha1Beta0);
#define WARNINGL2(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Describes the specification for a Basis.
Defines a specification for a set of points.
virtual int v_GetNedges(void) const
void BwdTrans_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
virtual void v_GetEdgeInteriorToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient=eForwards)
void IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
virtual void v_BwdTrans_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)=0
void v_HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
virtual int v_GetEdgeNcoeffs(const int i) const
NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals) override
This function evaluates the expansion at a single (arbitrary) point of the domain.
NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray) override
Integrates the specified function over the domain.
void v_GenStdMatBwdDeriv(const int dir, DNekMatSharedPtr &mat) override
void v_GetTraceToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient, int P, int Q) override
virtual void v_IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)=0
void PhysTensorDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray_d1, Array< OneD, NekDouble > &outarray_d2, Array< OneD, NekDouble > &outarray_d3)
Calculate the 3D derivative in the local tensor/collapsed coordinate at the physical points.
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
void GetElmtTraceToTraceMap(const unsigned int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient=eForwards, int P=-1, int Q=-1)
void LaplacianMatrixOp_MatFree_GenericImpl(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, 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 GetTraceCoeffMap(const unsigned int traceid, Array< OneD, unsigned int > &maparray)
virtual void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void HelmholtzMatrixOp_MatFree_GenericImpl(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
NekDouble GetConstFactor(const ConstFactorType &factor) const
bool ConstFactorExists(const ConstFactorType &factor) const
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 = alpha A x plus beta y where A[m x n].
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...
static const BasisKey NullBasisKey(eNoBasisType, 0, NullPointsKey)
Defines a null basis with no type or points.
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModified_B
Principle Modified Functions .
@ P
Monomial polynomials .
@ eOrtho_A
Principle Orthogonal Functions .
@ eModified_C
Principle Modified Functions .
@ eGLL_Lagrange
Lagrange for SEM basis .
@ eOrtho_C
Principle Orthogonal Functions .
@ eModifiedPyr_C
Principle Modified Functions.
@ eOrtho_B
Principle Orthogonal Functions .
@ eModified_A
Principle Modified Functions .
@ eOrthoPyr_C
Principle Orthogonal Functions .
static const NekDouble kNekZeroTol
LibUtilities::BasisKey EvaluateTriFaceBasisKey(const int facedir, const LibUtilities::BasisType faceDirBasisType, const int numpoints, const int nummodes)
LibUtilities::BasisKey EvaluateQuadFaceBasisKey(const int facedir, const LibUtilities::BasisType faceDirBasisType, const int numpoints, const int nummodes)
std::shared_ptr< DNekMat > DNekMatSharedPtr
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Svtvp (scalar times vector plus vector): z = alpha*x + y.
T Vsum(int n, const T *x, const int incx)
Subtract return sum(x)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)