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;
83 Array<OneD,unsigned int> bmap;
87 for(i = 0; i < 2; ++i)
89 Mat(bmap[i],bmap[i]) = Mat(bmap[i],bmap[i]) + tau;
102 Array<OneD,NekDouble> lambda(nbndry);
104 Array<OneD,NekDouble> ulam(ncoeffs);
106 Array<OneD,NekDouble> f(ncoeffs);
119 for(j = 0; j < nbndry; ++j)
130 for(k = 0; k < ncoeffs; ++k)
145 Array<OneD,NekDouble> lambda(nbndry);
148 Array<OneD,NekDouble> ulam(ncoeffs);
150 Array<OneD,NekDouble> f(ncoeffs);
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);
226 Array<OneD,unsigned int> bmap;
227 Array<OneD, NekDouble> lam(2);
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");
262 Array<OneD, const NekDouble> &inarray,
263 Array<OneD,NekDouble> &outarray)
269 const Array<OneD, const NekDouble> &Basis =
GetBasis(0)->GetBdata();
270 Array<OneD, unsigned int> vmap;
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]];
283 const Array<OneD,const NekDouble> &inarray, Array<OneD,NekDouble> &outarray)
290 Array<OneD, unsigned int> vmap;
292 ASSERTL0(&inarray[0] != &outarray[0],
"Input and output arrays use the same memory");
295 const Array<OneD, const NekDouble> &Basis =
GetBasis(0)->GetBdata();
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]];
315 Array<OneD, NekDouble> tmpcoeff(ncoeffs,0.0);
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();
363 Array<OneD,unsigned int> bmap;
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];