boost::shared_ptr<Points<NekDouble> > BLPoints::Create(const PointsKey &key) { boost::shared_ptr<Points<NekDouble> > returnval(MemoryManager<BLPoints>::AllocateSharedPtr(key)); returnval->Initialize(); return returnval; }
const boost::shared_ptr<NekMatrix<NekDouble> > BLPoints::GetI(unsigned int numpoints, const Array<OneD, const NekDouble>& x) { Array<OneD, NekDouble> interp(GetNumPoints()*numpoints); CalculateInterpMatrix(numpoints, x, interp); NekDouble* t = interp.data(); unsigned int np = GetNumPoints(); boost::shared_ptr< NekMatrix<NekDouble> > returnval(MemoryManager<NekMatrix<NekDouble> >::AllocateSharedPtr(numpoints,np,t)); return returnval; }
Eigen::VectorXd NumericalDiff::diff(const unsigned long long &ts, const Eigen::VectorXd &sample) { if (first_pass && sample.size() != size) { setSize(sample.size()); first_pass = false; std::cout << "NumericalDiff::diff -- Size of the vector to be used automatically adjusted on the first pass.\n"; } Eigen::VectorXd returnval(size); returnval = (sample - prev_sample)/(ts - prev_time)*1E6; prev_time = ts; prev_sample = sample; return returnval; }