Templatized SPHSmooth. Reduced memory consumption of simple3DFilter

This commit is contained in:
Guilhem Lavaux 2014-06-14 17:18:28 +02:00
parent 81f4b642e4
commit d23f79cbaf
3 changed files with 84 additions and 64 deletions

View file

@ -82,10 +82,14 @@ namespace CosmoTool
return internal.currentCenter;
}
template<typename FuncT>
ComputePrecision computeSmoothedValue(const typename SPHTree::coords& c,
computeParticleValue fun, SPHState *state = 0);
FuncT fun, SPHState *state = 0);
template<typename FuncT>
ComputePrecision computeInterpolatedValue(const typename SPHTree::coords& c,
computeParticleValue fun, SPHState *state = 0);
FuncT fun, SPHState *state = 0);
ComputePrecision getMaxDistance(const typename SPHTree::coords& c,
SPHNode *node) const;
@ -101,7 +105,8 @@ namespace CosmoTool
}
// END
void runForEachNeighbour(runParticleValue fun, SPHState *state = 0);
template<typename FuncT>
void runForEachNeighbour(FuncT fun, SPHState *state = 0);
void addGridSite(const typename SPHTree::coords& c);
bool hasNeighbours() const;
@ -127,12 +132,15 @@ namespace CosmoTool
uint32_t maxNgb;
SPHTree *tree;
template<typename FuncT>
ComputePrecision computeWValue(const typename SPHTree::coords & c,
SPHCell& cell,
CoordType d,
computeParticleValue fun, SPHState *state);
FuncT fun, SPHState *state);
template<typename FuncT>
void runUnrollNode(SPHNode *node,
runParticleValue fun);
FuncT fun);
};
template<class ValType1, class ValType2, int Ndims>