Fixed Poisson 2D MPI
This commit is contained in:
@@ -78,7 +78,7 @@ int main (int argc, char** argv)
|
||||
|
||||
|
||||
/* Added function for particle tracing. Will inject and advance particles as per timePeriod */
|
||||
trace(&particletracer, solver.u, solver.v, t);
|
||||
//trace(&particletracer, solver.u, solver.v, t);
|
||||
|
||||
t += solver.dt;
|
||||
nt++;
|
||||
|
@@ -595,7 +595,8 @@ void setSpecialBoundaryCondition(Solver* solver)
|
||||
for (int i = 1; i < imax; i++) {
|
||||
U(i, jmax + 1) = 2.0 - U(i, jmax);
|
||||
}
|
||||
} else if (strcmp(solver->problem, "canal") == 0) {
|
||||
}
|
||||
else if (strcmp(solver->problem, "canal") == 0) {
|
||||
double ylength = solver->ylength;
|
||||
double y;
|
||||
|
||||
@@ -604,6 +605,15 @@ void setSpecialBoundaryCondition(Solver* solver)
|
||||
U(0, j) = y * (ylength - y) * 4.0 / (ylength * ylength);
|
||||
}
|
||||
}
|
||||
else if (strcmp(solver->problem, "backstep") == 0) {
|
||||
double ylength = solver->ylength;
|
||||
double y;
|
||||
|
||||
for (int j = 1; j < jmax + 1; j++) {
|
||||
//y = mDy * (j - 0.5);
|
||||
U(0, j) = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void setObjectBoundaryCondition(Solver* solver)
|
||||
|
Reference in New Issue
Block a user