Commit 79602e8d authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

fix particle move

parent a76d2e32
......@@ -575,15 +575,11 @@ void dgParticleTracker2D::particleMove(dgDofContainer* solution, fullMatrix<doub
jac.invert(ijac);
convertVectorCoords(duvw, dxyz, ijac);
for (int i=0; i<3; i++) { uvw[i] += duvw[i]; }
uvw[0] += duvw[0];
uvw[1] += duvw[1];
uvw[2] += duvw[2];
double remaining = 0.0;
int edge_id=-1;
if (1-(uvw[0] + uvw[1]) < 2e-8) {
uvw[0] -= 2e-8;
uvw[1] -= 2e-8;
}
if (uvw[0] < 1e-8) uvw[0] = 2e-8;
if (uvw[1] < 1e-8) uvw[1] = 2e-8;
if((uvw[1] < 0.) && ((uvw[1] / duvw[1]) > remaining)) {
edge_id = 0;
remaining = uvw[1] / duvw[1];
......@@ -945,7 +941,7 @@ void convertVectorCoords(double target_v[3], double original_v[3], const fullMat
//2. Assign it new value, using a) new dxyz (defined @ end of last cycle) & b) this element's jacobian
for (int i=0; i<3; i++) {
for (int j=0; j<3; j++) {
target_v[j] = target_v[j] + jac(j,i)*original_v[i];
target_v[j] += jac(i,j)*original_v[i];
}
}
}
......
Markdown is supported
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