49 namespace LibUtilities
126 ASSERTL0(
false,
"Unknown Gauss quadrature point distribution requested");
142 Array<OneD, NekDouble> dmtempSharedArray = Array<OneD, NekDouble>(totpoints*totpoints);
143 NekDouble *dmtemp = dmtempSharedArray.data();
212 ASSERTL0(
false,
"Unknown Gauss quadrature point distribution requested");
215 std::copy(dmtemp,dmtemp+totpoints*totpoints,
m_derivmatrix[0]->begin());
275 for(
unsigned int i=0;i<
npts;++i)
286 ASSERTL0(
false,
"Unknown Gauss quadrature point distribution requested");
294 returnval->Initialize();
302 Array<OneD, const NekDouble> xpoints;
307 return GetI(numpoints, xpoints);
313 ASSERTL0(pkey.
GetPointsDim()==1,
"Gauss Points can only interp to other 1d point distributions");
318 const boost::shared_ptr<NekMatrix<NekDouble> >
GaussPoints::GetI(
const Array<OneD, const NekDouble>& x)
323 return GetI(numpoints, x);
326 const boost::shared_ptr<NekMatrix<NekDouble> >
GaussPoints::GetI(
unsigned int numpoints,
const Array<OneD, const NekDouble>& x)
328 Array<OneD, NekDouble> interp(
GetNumPoints()*numpoints);
334 boost::shared_ptr< NekMatrix<NekDouble> > returnval(
MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr(numpoints,np,t));
340 const Array<OneD, const NekDouble>& funcvals)
344 for(
int i=0;i<
npts;++i)
356 for(
int i=0;i<pt; ++i)
358 h = h * (x - xpts[i])/(xpts[pt]-xpts[i]);
361 for(
int i=pt+1;i<
npts;++i)
363 h = h * (x - xpts[i])/(xpts[pt]-xpts[i]);
374 for(
int j=0;j<
npts;++j)
379 for(
int i=0;i<
npts;++i)
387 h = h/(xpts[pt]-xpts[i]);
414 Array<OneD, const NekDouble> weightsfrom;
418 boost::shared_ptr< NekMatrix<NekDouble> > Interp =
GetI(pkey);
420 Array<OneD, NekDouble> GalProj(numpointsfrom*numpointsto);
424 for(
int i = 0; i < numpointsto; ++i)
426 Vmath::Vmul(numpointsfrom,Interp->GetPtr().get() +i*numpointsfrom,1,
427 &weightsfrom[0],1,&GalProj[0] +i,numpointsto);
429 &GalProj[0]+i,numpointsto);
434 boost::shared_ptr< NekMatrix<NekDouble> > returnval(
MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr(numpointsto,numpointsfrom,t));