40 namespace LocalRegions
52 "HybridDGHelmholtz matrix not set up "
53 "for non boundary-interior expansions");
65 DNekMat LocMat(ncoeffs,ncoeffs);
72 for(i=0; i < coordim; ++i)
81 Mat = Mat + lambdaval*Mass;
87 for(i = 0; i < 2; ++i)
89 Mat(bmap[i],bmap[i]) = Mat(bmap[i],bmap[i]) + tau;
119 for(j = 0; j < nbndry; ++j)
130 for(k = 0; k < ncoeffs; ++k)
183 ASSERTL0(
false,
"Direction not known");
190 for(j = 0; j < nbndry; ++j)
196 for(k = 0; k < ncoeffs; ++k)
198 Ulam[k] = lamToU(k,j);
213 Vmath::Vcopy(ncoeffs,&ulam[0],1,&(Qmat.GetPtr())[0]+j*ncoeffs,1);
240 lam[0] = 1.0; lam[1] = 0.0;
241 for(j = 0; j < nbndry; ++j)
246 lam[0] = 0.0; lam[1] = 1.0;
247 for(j = 0; j < nbndry; ++j)
254 ASSERTL0(
false,
"This matrix type cannot be generated from this class");
276 for(k = 0; k < nbndry; ++k)
278 outarray[vmap[k]] += (Basis[(vmap[k]+1)*nquad-1]*Basis[(vmap[k]+1)*nquad-1] - Basis[vmap[k]*nquad]*Basis[vmap[k]*nquad])*inarray[vmap[k]];
292 ASSERTL0(&inarray[0] != &outarray[0],
"Input and output arrays use the same memory");
301 for(i = 0; i < nbndry; ++i)
303 outarray[vmap[i]] += tau*Basis[(vmap[i]+1)*nquad-1]*Basis[(vmap[i]+1)*nquad-1]*inarray[vmap[i]];
304 outarray[vmap[i]] += tau*Basis[vmap[i]*nquad]*Basis[vmap[i]*nquad]*inarray[vmap[i]];
319 for(n = 0; n < coordim; ++n)
322 for(i = 0; i < ncoeffs; ++i)
325 tmpcoeff[i] -= invMass(i,vmap[0])*Basis[vmap[0]*nquad]*Basis[vmap[0]*nquad]*inarray[vmap[0]];
328 tmpcoeff[i] += invMass(i,vmap[1])*Basis[(vmap[1]+1)*nquad-1]*Basis[(vmap[1]+1)*nquad-1]*inarray[vmap[1]];
333 Coeffs = Coeffs + Dmat*Tmpcoeff;
340 ASSERTL1(inoutmat->GetRows() == inoutmat->GetColumns(),
341 "Assuming that input matrix was square");
354 int rows = inoutmat->GetRows();
366 for(i = 0; i < 2; ++i)
374 ASSERTL1(i != 2,
"Did not find number in map");
378 (*inoutmat)(map,map) += primCoeffs[0];
393 "Not set up for non boundary-interior expansions");
397 coeffs[map] = primCoeffs[0];
NekDouble GetConstFactor(const ConstFactorType &factor) const
#define ASSERTL0(condition, msg)
const LibUtilities::BasisSharedPtr & GetBasis(int dir) const
This function gets the shared point to basis in the dir direction.
MatrixType GetMatrixType() const
virtual void v_AddRobinMassMatrix(const int vert, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat)
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
std::map< ConstFactorType, NekDouble > ConstFactorMap
boost::shared_ptr< DNekMat > DNekMatSharedPtr
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
int NumBndryCoeffs(void) const
bool IsBoundaryInteriorExpansion()
int GetVertexMap(const int localVertexId, bool useCoeffPacking=false)
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
void Neg(int n, T *x, const int incx)
Negate x = -x.
void AddNormTraceInt(const int dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
int NumDGBndryCoeffs(void) const
virtual void v_AddRobinEdgeContribution(const int vert, const Array< OneD, const NekDouble > &primCoeffs, Array< OneD, NekDouble > &coeffs)
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
void Zero(int n, T *x, const int incx)
Zero vector.
void AddHDGHelmholtzTraceTerms(const NekDouble tau, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)