Particle Tracer work in progress
This commit is contained in:
@@ -47,13 +47,13 @@ gamma 0.9 # upwind differencing factor gamma
|
||||
# Visualization Data:
|
||||
# ------------------
|
||||
|
||||
traceStart 10.0 # time for starting visualization
|
||||
traceStart 0.0 # time for starting visualization
|
||||
traceWrite 2.0 # time stepsize for saving particle data
|
||||
traceInject 2.0 # time stepsize for particle injection
|
||||
lineX1 2.0 # Coordinates of line segment for particle injection
|
||||
lineY1 0.5
|
||||
lineX2 2.0
|
||||
lineY2 3.5
|
||||
nparticles 30 # number of particles to inject
|
||||
lineX1 1.0 # Coordinates of line segment for particle injection
|
||||
lineY1 0.0
|
||||
lineX2 1.0
|
||||
lineY2 4.0
|
||||
nparticles 50 # number of particles to inject
|
||||
|
||||
#===============================================================================
|
||||
|
@@ -1,5 +1,5 @@
|
||||
# Supported: GCC, CLANG, ICC
|
||||
TAG ?= CLANG
|
||||
TAG ?= ICC
|
||||
ENABLE_OPENMP ?= false
|
||||
|
||||
#Feature options
|
||||
|
10050
BasicSolver/2D-seq-pt/pressure.dat
Normal file
10050
BasicSolver/2D-seq-pt/pressure.dat
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
|
10000
BasicSolver/2D-seq-pt/velocity.dat
Normal file
10000
BasicSolver/2D-seq-pt/velocity.dat
Normal file
File diff suppressed because it is too large
Load Diff
BIN
BasicSolver/2D-seq-pt/velocity.png
Normal file
BIN
BasicSolver/2D-seq-pt/velocity.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Reference in New Issue
Block a user