Ignore:
Timestamp:
Nov 4, 2009, 6:15:10 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
ec70ec
Parents:
20895b
git-author:
Frederik Heber <heber@…> (11/04/09 18:11:09)
git-committer:
Frederik Heber <heber@…> (11/04/09 18:15:10)
Message:

Periodic variants of AnalysisPair...() implemented.

  • BUGFIX: Vector::DistanceToPlane() - we did not check whether sign is 0.
  • NOTE: Due to changes in Vector::DistanceToPlane() with sign, Unit test AnalysisCorrelationToSurfaceUnitTest had to be changed:
    • we now have bin -0.5 filled with 1 (instead of 0.) and -0.288 instead of 0.288
    • find() replaced by lower_bound
  • new functions: PeriodicPairCorrelation(), PeriodicCorrelationToPoint(), PeriodicCorrelationToSurface()
    • each has a ranges[NDIM] argument with specifies the neighbours to scan: [ -ranges[i], ranges[i] ]
    • the atom::node is periodically translated to each periodic cell and the distance calculated.
  • NOTE: make check was broken before due to implementation of Periodic variants as normal ones (yielding more points that expected in unit test).

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/vector.cpp

    r20895b r5f1d021  
    276276  temp.SubtractVector(PlaneOffset);
    277277  double sign = temp.ScalarProduct(PlaneNormal);
    278   sign /= fabs(sign);
     278  if (fabs(sign) > MYEPSILON)
     279    sign /= fabs(sign);
     280  else
     281    sign = 0.;
    279282
    280283  return (temp.Norm()*sign);
Note: See TracChangeset for help on using the changeset viewer.