Changeset 850e50 for molecuilder/src/boundary.cpp
- Timestamp:
- Feb 21, 2010, 1:34:41 PM (16 years ago)
- Children:
- b1d8ab5
- Parents:
- 1074cb
- File:
-
- 1 edited
-
molecuilder/src/boundary.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/boundary.cpp
r1074cb r850e50 789 789 * \param *filler molecule which the box is to be filled with 790 790 * \param configuration contains box dimensions 791 * \param MaxDistance fills in molecules only up to this distance (set to -1 if whole of the domain) 791 792 * \param distance[NDIM] distance between filling molecules in each direction 792 793 * \param boundary length of boundary zone between molecule and filling mollecules … … 797 798 * \return *mol pointer to new molecule with filled atoms 798 799 */ 799 molecule * FillBoxWithMolecule(MoleculeListClass *List, molecule *filler, config &configuration, const double distance[NDIM], const double boundary, const double RandomAtomDisplacement, const double RandomMolDisplacement, const bool DoRandomRotation)800 molecule * FillBoxWithMolecule(MoleculeListClass *List, molecule *filler, config &configuration, const double MaxDistance, const double distance[NDIM], const double boundary, const double RandomAtomDisplacement, const double RandomMolDisplacement, const bool DoRandomRotation) 800 801 { 801 802 Info FunctionInfo(__func__); … … 862 863 } else { 863 864 const double distance = (TesselStruct[i]->GetDistanceSquaredToSurface(CurrentPosition, LCList[i])); 864 FillIt = FillIt && (distance > boundary*boundary) ;865 FillIt = FillIt && (distance > boundary*boundary) && ((MaxDistance < 0) || (MaxDistance*MaxDistance > distance)); 865 866 if (FillIt) { 866 867 Log() << Verbose(1) << "INFO: Position at " << CurrentPosition << " is outer point." << endl; 867 868 } else { 868 Log() << Verbose(1) << "INFO: Position at " << CurrentPosition << " is inner point or within boundary." << endl;869 Log() << Verbose(1) << "INFO: Position at " << CurrentPosition << " is inner point, within boundary or outside of MaxDistance." << endl; 869 870 break; 870 871 }
Note:
See TracChangeset
for help on using the changeset viewer.
