Fixed SPH smoothing. Fixlet for dinterpolate

This commit is contained in:
Guilhem Lavaux 2009-09-29 16:26:56 -05:00
parent afd706c1dc
commit b18f06b606
3 changed files with 23 additions and 12 deletions

View file

@ -25,7 +25,7 @@ namespace CosmoTool
typedef void (*runParticleValue)(ValType& t);
public:
SPHSmooth(SPHTree *tree, uint32_t Nsph, uint32_t deltaN);
SPHSmooth(SPHTree *tree, uint32_t Nsph);
virtual ~SPHSmooth();
void fetchNeighbours(const typename SPHTree::coords& c);
@ -62,6 +62,18 @@ namespace CosmoTool
virtual ComputePrecision getKernel(ComputePrecision d) const;
SPHTree *getTree() { return tree; }
void changeNgb(uint32_t newMax) {
delete[] ngb;
delete[] distances;
ngb = new SPHCell *[newMax];
distances = new CoordType[newMax];
maxNgb = newMax;
}
uint32_t getCurrent() const { return currentNgb; }
uint32_t getNgb() const { return maxNgb; }
protected:
SPHCell **ngb;