- Timestamp:
- Apr 21, 2008, 2:19:26 PM (17 years ago)
- Children:
- 05fec0
- Parents:
- 4782e78
- git-author:
- Frederik Heber <heber@…> (04/18/08 16:18:38)
- git-committer:
- Frederik Heber <heber@…> (04/21/08 14:19:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified pcp/src/ions.c ¶
r4782e78 r6590194 853 853 R_old = &I->I[is].R_old[NDIM*ia]; 854 854 R_old_old = &I->I[is].R_old_old[NDIM*ia]; 855 if (I->I[is].IMT[ia] == MoveIon) {855 //if (I->I[is].IMT[ia] == MoveIon) { // even FixedIon moves, only not by other's forces 856 856 for (d=0; d<NDIM; d++) { 857 857 R_old_old[d] = R_old[d]; // shift old values 858 858 R_old[d] = R[d]; 859 859 R[d] += delta_t*(U[d]+a*FIon[d]); // F = m * a and s = 0.5 * a * t^2 860 860 FIon_old[d] = FIon[d]; // store old force 861 FIon[d] = 0; // zero all as a sign that's been moved 862 FIonL[d] = 0; 863 FIonNL[d] = 0; 864 FEwald[d] = 0; 861 // FIon[d] = 0.; // zero all as a sign that's been moved 862 // FIonL[d] = 0.; 863 // FIonNL[d] = 0.; 864 // FEwald[d] = 0.; 865 // don't reset forces here anymore, as we OutputVis() after this and before next CalculateForce() (rendering them null in the cute graphs) 865 866 } 867 if (I->I[is].Constraints[ia] != NULL) { // override current resulting R if constrained is given 868 fprintf(stderr, "(%i) Using constrained coordinates R of step %d on ion (%i,%i)\n", P->Par.me, I->I[is].Constraints[ia]->step, is, ia); 869 if ((I->I[is].Constraints[ia]->step != P->R.OuterStep) && (P->Par.me == 0)) 870 fprintf(stderr, "(%i) WARNING: constraint step %d does not match Outerstep %d for ion (%d,%d)\n", P->Par.me, I->I[is].Constraints[ia]->step, P->R.OuterStep, is, ia); 871 for (d=0; d<NDIM; d++) 872 R[d] = I->I[is].Constraints[ia]->R[d]; 873 I->I[is].IMT[ia] = I->I[is].Constraints[ia]->IMT; 874 //RemoveConstraintItem(&I->I[is],ia); // and remove this first item from the list: // is done now at UpdateIonsU() 875 } 866 876 RMat33Vec3(sR, P->Lat.InvBasis, R); 867 877 RMat33Vec3(sRold, P->Lat.InvBasis, R_old); … … 882 892 RMat33Vec3(R_old, P->Lat.RealBasis, sRold); 883 893 RMat33Vec3(R_old_old, P->Lat.RealBasis, sRoldold); 884 }894 //} 885 895 } 886 896 }
Note:
See TracChangeset
for help on using the changeset viewer.