Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/boundary.cpp

    r8468cb r9473f6  
    789789 * \param configuration contains box dimensions
    790790 * \param distance[NDIM] distance between filling molecules in each direction
     791 * \param boundary length of boundary zone between molecule and filling mollecules
    791792 * \param epsilon distance to surface which is not filled
    792793 * \param RandAtomDisplacement maximum distance for random displacement per atom
     
    795796 * \return *mol pointer to new molecule with filled atoms
    796797 */
    797 molecule * FillBoxWithMolecule(MoleculeListClass *List, molecule *filler, config &configuration, const double distance[NDIM], const double RandomAtomDisplacement, const double RandomMolDisplacement, const bool DoRandomRotation)
     798molecule * FillBoxWithMolecule(MoleculeListClass *List, molecule *filler, config &configuration, const double distance[NDIM], const double boundary, const double RandomAtomDisplacement, const double RandomMolDisplacement, const bool DoRandomRotation)
    798799{
    799800        Info FunctionInfo(__func__);
     
    856857            FillIt = false;
    857858          } else {
    858             const bool FillResult = (!TesselStruct[i]->IsInnerPoint(CurrentPosition, LCList[i]));
    859             FillIt = FillIt && FillResult;
    860             if (FillResult) {
     859            const double distance = (TesselStruct[i]->GetDistanceSquaredToSurface(CurrentPosition, LCList[i]));
     860            FillIt = FillIt && (distance > boundary*boundary);
     861            if (FillIt) {
    861862              Log() << Verbose(1) << "INFO: Position at " << CurrentPosition << " is outer point." << endl;
    862863            } else {
    863               Log() << Verbose(1) << "INFO: Position at " << CurrentPosition << " is inner point." << endl;
     864              Log() << Verbose(1) << "INFO: Position at " << CurrentPosition << " is inner point or within boundary." << endl;
     865              break;
    864866            }
    865867            i++;
Note: See TracChangeset for help on using the changeset viewer.