52 "HybridDGHelmholtz matrix not set up "
53 "for non boundary-interior expansions");
66 DNekMat LocMat(ncoeffs, ncoeffs);
74 for (i = 0; i < coordim; ++i)
78 Mat = Mat + Dmat * invMass *
Transpose(Dmat);
83 Mat = Mat + lambdaval * Mass;
89 for (i = 0; i < 2; ++i)
91 Mat(bmap[i], bmap[i]) = Mat(bmap[i], bmap[i]) + tau;
125 for (j = 0; j < nbndry; ++j)
137 for (k = 0; k < ncoeffs; ++k)
139 Umat(k, j) = Ulam[k];
196 ASSERTL0(
false,
"Direction not known");
203 for (j = 0; j < nbndry; ++j)
209 for (k = 0; k < ncoeffs; ++k)
211 Ulam[k] = lamToU(k, j);
226 &(Qmat.GetPtr())[0] + j * ncoeffs, 1);
260 for (j = 0; j < nbndry; ++j)
264 (LamToU(bmap[0], j) - lam[j]);
269 for (j = 0; j < nbndry; ++j)
273 (LamToU(bmap[1], j) - lam[j]);
279 "This matrix type cannot be generated from this class");
300 for (k = 0; k < nbndry; ++k)
302 outarray[vmap[k]] += (
Basis[(vmap[k] + 1) * nquad - 1] *
303 Basis[(vmap[k] + 1) * nquad - 1] -
304 Basis[vmap[k] * nquad] *
Basis[vmap[k] * nquad]) *
320 ASSERTL0(&inarray[0] != &outarray[0],
321 "Input and output arrays use the same memory");
329 for (i = 0; i < nbndry; ++i)
331 outarray[vmap[i]] += tau *
Basis[(vmap[i] + 1) * nquad - 1] *
332 Basis[(vmap[i] + 1) * nquad - 1] *
334 outarray[vmap[i]] += tau *
Basis[vmap[i] * nquad] *
335 Basis[vmap[i] * nquad] * inarray[vmap[i]];
349 for (n = 0; n < coordim; ++n)
352 for (i = 0; i < ncoeffs; ++i)
355 tmpcoeff[i] -= invMass(i, vmap[0]) *
Basis[vmap[0] * nquad] *
356 Basis[vmap[0] * nquad] * inarray[vmap[0]];
359 tmpcoeff[i] += invMass(i, vmap[1]) *
360 Basis[(vmap[1] + 1) * nquad - 1] *
361 Basis[(vmap[1] + 1) * nquad - 1] * inarray[vmap[1]];
365 Coeffs = Coeffs + Dmat * Tmpcoeff;
374 "Robin boundary conditions are only implemented for "
375 "boundary-interior expanisons");
376 ASSERTL1(inoutmat->GetRows() == inoutmat->GetColumns(),
377 "Assuming that input matrix was square");
390 int rows = inoutmat->GetRows();
402 for (i = 0; i < 2; ++i)
410 ASSERTL1(i != 2,
"Did not find number in map");
414 (*inoutmat)(map, map) += primCoeffs[0];
430 "Not set up for non boundary-interior expansions");
433 coeffs[map] += primCoeffs[0] * incoeffs[map];
443 int nq =
m_base[0]->GetNumPoints();
445 Vmath::Vmul(nq, &vec[0][0], 1, &normals[0][0], 1, &Fn[0], 1);
446 Vmath::Vvtvp(nq, &vec[1][0], 1, &normals[1][0], 1, &Fn[0], 1, &Fn[0], 1);
480 factors[0][0] = gmat[0][nquad - 1] * normal_0[0][0];
481 factors[1][0] = gmat[0][0] * normal_1[0][0];
483 for (
int n = 1; n < normal_0.size(); ++n)
485 factors[0][0] += gmat[n][0] * normal_0[n][0];
486 factors[1][0] += gmat[n][nquad - 1] * normal_1[n][0];
491 factors[0][0] = gmat[0][0] * normal_0[0][0];
492 factors[1][0] = gmat[0][0] * normal_1[0][0];
494 for (
int n = 1; n < normal_0.size(); ++n)
496 factors[0][0] += gmat[n][0] * normal_0[n][0];
497 factors[1][0] += gmat[n][0] * normal_1[n][0];
505 [[maybe_unused]]
const int nq1)
507 if (idmap.size() != 1)
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Represents a basis of a given type.
void v_AddRobinTraceContribution(const int vert, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs) override
void v_ReOrientTracePhysMap(const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1) override
void AddHDGHelmholtzTraceTerms(const NekDouble tau, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void v_AddRobinMassMatrix(const int vert, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat) override
void AddNormTraceInt(const int dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
NekDouble v_VectorFlux(const Array< OneD, Array< OneD, NekDouble > > &vec) override
void v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p) override
void v_NormalTraceDerivFactors(Array< OneD, Array< OneD, NekDouble > > &factors, Array< OneD, Array< OneD, NekDouble > > &d0factors, Array< OneD, Array< OneD, NekDouble > > &d1factors) override
: This method gets all of the factors which are required as part of the Gradient Jump Penalty stabili...
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
SpatialDomains::GeometrySharedPtr GetGeom() const
ExpansionSharedPtr GetLeftAdjacentElementExp() const
int GetLeftAdjacentElementTrace() const
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
const NormalVector & GetTraceNormal(const int id)
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)
const LibUtilities::BasisSharedPtr & GetBasis(int dir) const
This function gets the shared point to basis in the dir direction.
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
int NumBndryCoeffs(void) const
const LibUtilities::PointsKeyVector GetPointsKeys() const
int NumDGBndryCoeffs(void) const
int GetVertexMap(const int localVertexId, bool useCoeffPacking=false)
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
Array< OneD, LibUtilities::BasisSharedPtr > m_base
bool IsBoundaryInteriorExpansion() const
NekDouble Integral(const Array< OneD, const NekDouble > &inarray)
This function integrates the specified function over the domain.
MatrixType GetMatrixType() const
NekDouble GetConstFactor(const ConstFactorType &factor) const
@ eDeformed
Geometry is curved or has non-constant factors.
std::map< ConstFactorType, NekDouble > ConstFactorMap
StdRegions::ConstFactorMap factors
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
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 Neg(int n, T *x, const int incx)
Negate x = -x.
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
void Zero(int n, T *x, const int incx)
Zero vector.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)