Added state definition in SPHSmooth. Fixed cmake LINK_FLAGS problem

This commit is contained in:
Guilhem Lavaux 2014-05-05 12:07:55 +02:00
parent b80734bf07
commit cc769b2b1d
5 changed files with 106 additions and 77 deletions

View file

@ -85,14 +85,16 @@ int main()
uint32_t dims[] = { NX, NX };
ProgressiveOutput<ComputePrecision> out =
ProgressiveOutput<ComputePrecision>::saveArrayProgressive("out.nc", dims, 2);
//#pragma omp parallel for schedule(static)
for (uint32_t iy = 0; iy < NX; iy++)
{
MySmooth::SPHState state;
cout << "iy=" << iy << endl;
for (uint32_t ix = 0; ix < NX; ix++)
{
MyTree::coords c = { 1.0*ix/NX, 1.0*iy/NX };
smooth.fetchNeighbours(c);
out.put(smooth.computeSmoothedValue(c, unit_fun));
smooth.fetchNeighbours(c, &state);
out.put(smooth.computeSmoothedValue(c, unit_fun, &state));
}