Particle Tracer work in progress
This commit is contained in:
@@ -178,7 +178,7 @@ void solve(Solver* solver)
|
||||
it++;
|
||||
}
|
||||
|
||||
#ifdef VERBOSE
|
||||
#ifndef VERBOSE
|
||||
printf("Solver took %d iterations to reach %f\n", it, sqrt(res));
|
||||
#endif
|
||||
}
|
||||
|
@@ -77,7 +77,6 @@ static void advanceParticles(
|
||||
|
||||
double yn = y + delt * vn;
|
||||
m[particleId * NCOORD + Y] = yn;
|
||||
printf("P%i VEL %f %f dt %f OP %f %f NP %f %f\n", i, un, vn, delt, x, y, xn, yn);
|
||||
}
|
||||
|
||||
double xlength = t->grid.xlength;
|
||||
@@ -107,7 +106,6 @@ static void injectParticles(Tracing* t)
|
||||
double* m = t->memorypool;
|
||||
|
||||
for (int i = 0; i < t->numParticles; i++) {
|
||||
printf("Inject %d as %d mem %d\n", i, t->totalParticles, t->cursor);
|
||||
t->particles[t->totalParticles] = t->cursor;
|
||||
m[(t->cursor) * NCOORD + X] = line[i * NCOORD + X];
|
||||
m[(t->cursor) * NCOORD + Y] = line[i * NCOORD + Y];
|
||||
@@ -145,14 +143,11 @@ void trace(Tracing* t, double* restrict u, double* restrict v, double time)
|
||||
{
|
||||
if (time >= t->traceStart) {
|
||||
if ((time - t->lastUpdate[INJECT]) > t->traceInject) {
|
||||
printf("Inject at %f\n", time);
|
||||
printState(t);
|
||||
injectParticles(t);
|
||||
t->lastUpdate[INJECT] = time;
|
||||
}
|
||||
|
||||
if ((time - t->lastUpdate[WRITE]) > t->traceWrite) {
|
||||
printf("Write at %f\n", time);
|
||||
writeParticles(t);
|
||||
t->lastUpdate[WRITE] = time;
|
||||
}
|
||||
@@ -199,7 +194,7 @@ void initTrace(Tracing* t, Parameter* p)
|
||||
double x = spacing * x1 + (1.0 - spacing) * x2;
|
||||
double y = spacing * y1 + (1.0 - spacing) * y2;
|
||||
|
||||
printf("S: %f x: %f y: %f\n", spacing, x, y);
|
||||
//printf("S: %f x: %f y: %f\n", spacing, x, y);
|
||||
line[i * NCOORD + X] = x;
|
||||
line[i * NCOORD + Y] = y;
|
||||
}
|
||||
|
Reference in New Issue
Block a user