Changeset 9f03b2 for molecuilder/src/boundary.cpp
- Timestamp:
- Mar 3, 2010, 9:31:24 AM (16 years ago)
- Children:
- 9565ec
- Parents:
- e49719
- File:
-
- 1 edited
-
molecuilder/src/boundary.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/boundary.cpp
re49719 r9f03b2 819 819 map<molecule *, LinkedCell *> LCList; 820 820 821 for (MoleculeList::iterator ListRunner = List->ListOfMolecules.begin(); ListRunner != List->ListOfMolecules.end(); ListRunner++) { 822 Log() << Verbose(1) << "Pre-creating linked cell lists for molecule " << *ListRunner << "." << endl; 823 LCList[(*ListRunner)] = new LinkedCell((*ListRunner), 10.); // get linked cell list 824 Log() << Verbose(1) << "Pre-creating tesselation for molecule " << *ListRunner << "." << endl; 825 TesselStruct[(*ListRunner)] = NULL; 826 FindNonConvexBorder((*ListRunner), TesselStruct[(*ListRunner)], (const LinkedCell *&)LCList[(*ListRunner)], 5., NULL); 827 } 821 for (MoleculeList::iterator ListRunner = List->ListOfMolecules.begin(); ListRunner != List->ListOfMolecules.end(); ListRunner++) 822 if ((*ListRunner)->AtomCount > 0) { 823 Log() << Verbose(1) << "Pre-creating linked cell lists for molecule " << *ListRunner << "." << endl; 824 LCList[(*ListRunner)] = new LinkedCell((*ListRunner), 10.); // get linked cell list 825 Log() << Verbose(1) << "Pre-creating tesselation for molecule " << *ListRunner << "." << endl; 826 TesselStruct[(*ListRunner)] = NULL; 827 FindNonConvexBorder((*ListRunner), TesselStruct[(*ListRunner)], (const LinkedCell *&)LCList[(*ListRunner)], 5., NULL); 828 } 828 829 829 830 // Center filler at origin 830 filler->Center Origin();831 filler->CenterEdge(&Inserter); 831 832 filler->Center.Zero(); 832 833 … … 845 846 846 847 // go over [0,1]^3 filler grid 847 for (n[0] = 0; n[0] < =N[0]; n[0]++)848 for (n[1] = 0; n[1] < =N[1]; n[1]++)849 for (n[2] = 0; n[2] < =N[2]; n[2]++) {848 for (n[0] = 0; n[0] < N[0]; n[0]++) 849 for (n[1] = 0; n[1] < N[1]; n[1]++) 850 for (n[2] = 0; n[2] < N[2]; n[2]++) { 850 851 // calculate position of current grid vector in untransformed box 851 852 CurrentPosition.Init((double)n[0]/(double)N[0], (double)n[1]/(double)N[1], (double)n[2]/(double)N[2]); … … 857 858 858 859 // go through all atoms 860 for (int i=0;i<filler->AtomCount;i++) 861 CopyAtoms[i] = NULL; 859 862 Walker = filler->start; 860 863 while (Walker->next != filler->end) { … … 900 903 for (MoleculeList::iterator ListRunner = List->ListOfMolecules.begin(); ListRunner != List->ListOfMolecules.end(); ListRunner++) { 901 904 // get linked cell list 902 if (TesselStruct[(*ListRunner)] == NULL) { 903 eLog() << Verbose(0) << "TesselStruct of " << (*ListRunner) << " is NULL. Didn't we pre-create it?" << endl; 904 FillIt = false; 905 } else { 905 if (TesselStruct[(*ListRunner)] != NULL) { 906 906 const double distance = (TesselStruct[(*ListRunner)]->GetDistanceToSurface(Inserter, LCList[(*ListRunner)])); 907 907 FillIt = FillIt && (distance > boundary) && ((MaxDistance < 0) || (MaxDistance > distance)); … … 919 919 Log() << Verbose(1) << "INFO: Position at " << Inserter << " is inner point, within boundary or outside of MaxDistance." << endl; 920 920 CopyAtoms[Walker->nr] = NULL; 921 break;921 continue; 922 922 } 923 923
Note:
See TracChangeset
for help on using the changeset viewer.
