Commit cfbff5e4 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

fix

parent 87e7dea6
......@@ -186,7 +186,7 @@ void getParticleVelocity(ParticleProblem *p, double *v){
r[d] = p->particles[i].x[d];
}
#if DIMENSION==2
r[2] = 0;
r[2] = 0; // TODO FIXME !!!! cross does not work in 2D
omega[2] = p->omega[p->particles[i].body*DIMENSION];
#endif
_cross(omega,r,res);
......@@ -1569,14 +1569,20 @@ void particleProblemAddBodyMaterialTagId(ParticleProblem *p, const double x[DIME
vectorPushN(&p->velocity, DIMENSION);
vectorPush(&p->bodyMaterial);
vectorPush(&p->ForcedFlag);
#if DIMENSION == 3
vectorPushN(&p->omega,DIMENSION);
#endif
for (int i = 0; i < DIMENSION; ++i) {
p->position[n * DIMENSION + i] = x[i];
p->velocity[n * DIMENSION + i] = 0;
#if DIMENSION == 3
p->omega[n*DIMENSION +i] = 0;
#endif
}
#if DIMENSION == 2
vectorPush(&p->omega);
p->omega[n] = 0.0;
#endif
p->bodyMaterial[n] = tag;
p->ForcedFlag[n] = forced;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment