Changeset 4782e78 for pcp/src/ions.c
- Timestamp:
- Apr 21, 2008, 2:19:25 PM (17 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified pcp/src/ions.c ¶
r9a2c8c r4782e78 787 787 /** Shifts center of gravity of ion velocities (rather momentums). 788 788 * 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 here789 * dimension) in temp, then reduces the velocity by temp per Ions::TotalMass (so here 790 790 * total number of Ions is included) 791 791 * \param *P Problem at hand 792 * \sa CorrectForces 792 * \sa CorrectForces() 793 793 */ 794 794 void CorrectVelocity(struct Problem *P) … … 803 803 for (ia=0; ia < I->I[is].Max_IonsOfType; ia++) { // ... all ions per type ... 804 804 U = &I->I[is].U[NDIM*ia]; 805 if (I->I[is].IMT[ia] == MoveIon) { // ... if it's movable805 //if (I->I[is].IMT[ia] == MoveIon) { // ... even FixedIon moves, only not by other's forces 806 806 for (d=0; d<NDIM; d++) 807 807 UTemp[d] += I->I[is].IonMass*U[d]; 808 }808 //} 809 809 } 810 810 } … … 812 812 for (ia=0; ia < I->I[is].Max_IonsOfType; ia++) { 813 813 U = &I->I[is].U[NDIM*ia]; 814 if (I->I[is].IMT[ia] == MoveIon) {814 //if (I->I[is].IMT[ia] == MoveIon) { 815 815 for (d=0; d<NDIM; d++) 816 816 U[d] -= UTemp[d]/I->TotalMass; // shift by mean velocity over mass and number of ions 817 }817 //} 818 818 } 819 819 }
Note:
See TracChangeset
for help on using the changeset viewer.