Changeset 4782e78 for pcp/src/ions.c


Ignore:
Timestamp:
Apr 21, 2008, 2:19:25 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
6590194
Parents:
9a2c8c
git-author:
Frederik Heber <heber@…> (04/18/08 16:17:36)
git-committer:
Frederik Heber <heber@…> (04/21/08 14:19:25)
Message:

CorrectVelocity(): FixedIon may still move, there's just no force acting on them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified pcp/src/ions.c

    r9a2c8c r4782e78  
    787787/** Shifts center of gravity of ion velocities (rather momentums).
    788788 * First sums up ion speed U times their IonMass (summed up for each
    789  * dimension), then reduces the velocity by temp per Ions::TotalMass (so here
     789 * dimension) in temp, then reduces the velocity by temp per Ions::TotalMass (so here
    790790 * total number of Ions is included)
    791791 * \param *P Problem at hand
    792  * \sa CorrectForces
     792 * \sa CorrectForces()
    793793 */
    794794void CorrectVelocity(struct Problem *P)
     
    803803    for (ia=0; ia < I->I[is].Max_IonsOfType; ia++) {    // ... all ions per type ...
    804804      U = &I->I[is].U[NDIM*ia];
    805       if (I->I[is].IMT[ia] == MoveIon) {        // ... if it's movable
     805      //if (I->I[is].IMT[ia] == MoveIon) {      // ... even FixedIon moves, only not by other's forces
    806806                                for (d=0; d<NDIM; d++)
    807807                                  UTemp[d] += I->I[is].IonMass*U[d];
    808       }
     808      //}
    809809    }
    810810  }
     
    812812    for (ia=0; ia < I->I[is].Max_IonsOfType; ia++) {
    813813      U = &I->I[is].U[NDIM*ia];
    814       if (I->I[is].IMT[ia] == MoveIon) {
     814      //if (I->I[is].IMT[ia] == MoveIon) {
    815815                                for (d=0; d<NDIM; d++)
    816816                                  U[d] -= UTemp[d]/I->TotalMass;                // shift by mean velocity over mass and number of ions
    817       }
     817      //}
    818818    }
    819819  }
Note: See TracChangeset for help on using the changeset viewer.