diff options
| author | Stanislaw Skowronek <skylark@disorder.sko> | 2013-11-15 23:13:35 (GMT) |
|---|---|---|
| committer | Stanislaw Skowronek <skylark@disorder.sko> | 2013-11-15 23:13:35 (GMT) |
| commit | ba095664c0c7a1f16e3dbc05d52fe3c31095ed66 (patch) | |
| tree | cc93da625c0ad23940dfa443c57b8f2ba65517af | |
| parent | c4bcc97f5a608a39fbac7dd6030390d2b2ff75d9 (diff) | |
| download | powder-ba095664c0c7a1f16e3dbc05d52fe3c31095ed66.zip powder-ba095664c0c7a1f16e3dbc05d52fe3c31095ed66.tar.gz | |
Clean up some ugly debug prints.
| -rw-r--r-- | src/simulation/Simulation.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 63c3afc..c6dec35 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -1,3 +1,5 @@ +//#define DEBUG_SOLID + //#include <cstdlib> #include <cmath> #include <math.h> @@ -4809,7 +4811,9 @@ void Simulation::update_solids() break; } if(bd >= 4) { +#ifdef DEBUG_SOLID printf("Solid %d: blocked\n", i); +#endif for(bd=0; bd<4; bd++) { for(bb=0; bb<bd; bb++) @@ -4851,7 +4855,9 @@ void Simulation::update_solids() if(parts[pp].sld && parts[pp].type) { if(parts[pp].sld-1 != i) { +#ifdef DEBUG_SOLID printf(" reaction momentum: %f %f (solid-solid %d)\n", rmx, rmy, parts[pp].sld-1); +#endif parts[pp].vx += rmx; parts[pp].vy += rmy; } @@ -4862,7 +4868,9 @@ void Simulation::update_solids() rmx *= ee; rmy *= ee; } +#ifdef DEBUG_SOLID printf(" reaction momentum: %f %f (solid-particle %s)\n", rmx, rmy, elements[parts[pp].type].Name); +#endif parts[pp].vx += rmx; parts[pp].vy += rmy; } @@ -4932,6 +4940,7 @@ void Simulation::update_solids() if(sld->an) { sld->vrot = atanf(sld->arot / av); +#ifdef DEBUG_SOLID printf("Solid %d: count %d, vx %f, vy %f, vrot %f, b %d/%d, cdx %f, cdy %f\n", i, sld->an, sld->vx, sld->vy, sld->vrot, sld->bf, bd, sld->cdx, sld->cdy); if(sld->bf) { printf(" "); @@ -4939,6 +4948,7 @@ void Simulation::update_solids() printf(" [ %f %f ]", sld->bpx[bb], sld->bpy[bb]); printf("\n"); } +#endif } cvrot = cosf(sld->vrot) - 1.0f; @@ -4959,7 +4969,9 @@ void Simulation::update_solids() pp = sld->bp[bd]; if(parts[pp].sld && parts[pp].type) { if(parts[pp].sld-1 != i) { +#ifdef DEBUG_SOLID printf(" reaction momentum: %f %f (solid-solid %d)\n", rmx, rmy, parts[pp].sld-1); +#endif parts[pp].vx += rmx; parts[pp].vy += rmy; } @@ -4970,7 +4982,9 @@ void Simulation::update_solids() rmx *= ee; rmy *= ee; } +#ifdef DEBUG_SOLID printf(" reaction momentum: %f %f (solid-particle %s)\n", rmx, rmy, elements[parts[pp].type].Name); +#endif parts[pp].vx += rmx; parts[pp].vy += rmy; } |
