Changeset 2390e6


Ignore:
Timestamp:
Apr 28, 2021, 10:02:49 PM (5 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
e0e77e
Parents:
87c1cc
git-author:
Frederik Heber <frederik.heber@…> (04/17/21 09:41:33)
git-committer:
Frederik Heber <frederik.heber@…> (04/28/21 22:02:49)
Message:

SaturateAction may use outer shell information.

  • when considering the outer shell, then we look at both occupied and unoccupied orbitals. The ideal polygon will be created for the number of all orbitals, but only the unoccupied will be allowed to be taken by either present bonds or saturation hydrogens.
  • SphericalPointDistribution allows to occupy less than present points.
  • I have tested this manually by adding oxygen, saturation, adding carbon, saturating again, then turning oxygen into nitrogen and saturating. Results were always exactly as hoped for.
  • DOCU: Added note to action in userguide.
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • doc/userguide/userguide.xml

    r87c1cc r2390e6  
    10701070          and approximately with same distance to their nearest neighbor
    10711071          hydrogens. Already present bonds (i.e. the position of neighboring
    1072           atoms) are taken into account and left intact.</para>
     1072          atoms) are taken into account and left intact.</para>
     1073          <programlisting>^M
     1074  ... --saturate-atoms --use-outer-shell 1^M
     1075   </programlisting>
     1076          <para>This will not simply consider the number of unoccupied orbitals
     1077          of the respective element. Instead it will take the outermost shell
     1078          into consideration and use the number of orbitals in total as the
     1079          ideal polyhedra but only taking the number of unoccupied orbitals as
     1080          free nodes, i.e. where to saturate with hydrogens. For example,
     1081          nitrogen will then fill an tetrahedron (4 orbitals in outer shell)
     1082          where one orbital is already fully occupied and 3 nodes in the
     1083          tetrahedron remain to fill up with hydrogens.
     1084          Without the outer shell, saturate atoms would simply consider a
     1085          triangle as the ideal polyhedron and fill its 3 corners.</para>
    10731086        </section>
    10741087        <section xml:id="atoms.bondify-atom">
  • src/Actions/AtomAction/SaturateAction.cpp

    r87c1cc r2390e6  
    8686    const BondList& ListOfBonds = _atom->getListOfBonds();
    8787    SphericalPointDistribution PointSphere(typical_distance);
     88    int num_orbitals_outer_shell;
     89    int num_unoccupied_orbitals;
     90    if (params.useOuterShell.get()) {
     91      /*
     92       * Number of valence electrons (getValence()) + number of unoccupied
     93       * orbitals (getNoValenceOrbitals()) is the number of electrons able
     94       * to fit into the outer shell. Hence, half the number gives the number
     95       * of orbitals in the outer shell
     96       */
     97      num_orbitals_outer_shell =
     98          (((int)_atom->getType()->getValence())+_atom->getType()->getNoValenceOrbitals())/2;
     99      num_unoccupied_orbitals = _atom->getType()->getNoValenceOrbitals();
     100    } else {
     101      /**
     102       * Here, same number of points on the polyhedra and available ones.
     103       */
     104      num_orbitals_outer_shell = num_unoccupied_orbitals = _atom->getType()->getNoValenceOrbitals();
     105    }
    88106    if (ListOfBonds.size() == 0) {
    89       vacant_positions = PointSphere.getSimplePolygon(_atom->getType()->getNoValenceOrbitals());
     107      vacant_positions = PointSphere.getSimplePolygon(num_orbitals_outer_shell);
     108
     109      // if less available then present in the ideal polygon, remove some
     110      if (num_unoccupied_orbitals < vacant_positions.size())
     111        vacant_positions.resize(num_unoccupied_orbitals);
     112
    90113      LOG(3, "DEBUG: Using ideal positions as " << vacant_positions);
    91114    } else {
    92       // get ideal polygon and currently occupied positions
    93       const SphericalPointDistribution::Polygon_t ideal_positions =
    94           PointSphere.getSimplePolygon(_atom->getType()->getNoValenceOrbitals());
    95       LOG(3, "DEBUG: ideal positions are " << ideal_positions);
    96115      SphericalPointDistribution::WeightedPolygon_t current_positions;
    97116      for (BondList::const_iterator bonditer = ListOfBonds.begin();
     
    104123      LOG(3, "DEBUG: current occupied positions are " << current_positions);
    105124
     125      // get ideal polygon and currently occupied positions
     126      const SphericalPointDistribution::Polygon_t ideal_positions =
     127          PointSphere.getSimplePolygon(num_orbitals_outer_shell);
     128      LOG(3, "DEBUG: ideal positions are " << ideal_positions);
     129
    106130      // find the best matching rotated polygon
    107131      vacant_positions = PointSphere.getRemainingPoints(
    108132          current_positions,
    109           _atom->getType()->getNoValenceOrbitals());
     133          num_orbitals_outer_shell,
     134          num_unoccupied_orbitals);
    110135      LOG(3, "DEBUG: Resulting vacant positions are " << vacant_positions);
    111136
  • src/Actions/AtomAction/SaturateAction.def

    r87c1cc r2390e6  
    77
    88// all includes and forward declarations necessary for non-integral types below
    9 #include "Atom/AtomicInfo.hpp"
     9
     10#include "Parameters/Validators/DummyValidator.hpp"
    1011
    1112// i.e. there is an integer with variable name Z that can be found in
    1213// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    1314// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    14 #undef paramtypes
    15 #undef paramtokens
    16 #undef paramdescriptions
    17 #undef paramreferences
    18 #undef paramdefaults
    19 #undef paramvalids
     15#define paramtypes (bool)
     16#define paramtokens ("use-outer-shell")
     17#define paramdescriptions ("whether to just look at valencies (false) or take the occupancy of the outer shell into account (true) for the polyhedra")
     18#define paramreferences (useOuterShell)
     19#define paramdefaults (PARAM_DEFAUALT(0))
     20#define paramvalids (DummyValidator<bool>())
    2021
    2122#define statetypes (std::vector<AtomicInfo>)
  • src/Fragmentation/Exporters/SphericalPointDistribution.cpp

    r87c1cc r2390e6  
    882882SphericalPointDistribution::getRemainingPoints(
    883883    const WeightedPolygon_t &_polygon,
    884     const int _N)
     884    const int _num_spots,
     885    const int _num_spots_available)
    885886{
    886887  SphericalPointDistribution::Polygon_t remainingpoints;
    887888
    888889  // initialze to given number of points
    889   initSelf(_N);
     890  initSelf(_num_spots);
    890891  LOG(2, "INFO: Matching old polygon " << _polygon
    891892      << " with new polygon " << points);
    892893
    893894  // check whether any points will remain vacant
    894   int RemainingPoints = _N;
     895  int RemainingPoints = _num_spots_available;
    895896  for (WeightedPolygon_t::const_iterator iter = _polygon.begin();
    896897      iter != _polygon.end(); ++iter)
     
    899900    return remainingpoints;
    900901
    901   if (_N > 0) {
     902  if (_num_spots_available > 0) {
    902903    IndexList_t bestmatching = findBestMatching(_polygon);
    903904    LOG(2, "INFO: Best matching is " << bestmatching);
     
    10241025    SphericalPointDistribution::Polygon_t remainingpoints =
    10251026        removeMatchingPoints(rotatednewSet);
     1027    // when less spots unoccupied than the ideal polygon has nodes, remove some
     1028    if (RemainingPoints < remainingpoints.size())
     1029      remainingpoints.resize(RemainingPoints);
    10261030    LOG(2, "INFO: Remaining points are " << remainingpoints);
    10271031    return remainingpoints;
  • src/Fragmentation/Exporters/SphericalPointDistribution.hpp

    r87c1cc r2390e6  
    8787   *
    8888   * \param _polygon already filled places to match
    89    * \param _N desired total number fo points
    90    */
    91   Polygon_t getRemainingPoints(const WeightedPolygon_t &_polygon, const int _N);
     89   * \param _num_spots number of nodes in the polyhedra (e.g., number of orbitals in outer shell)
     90   * \param _num_spots_available nodes available (e.g., number of orbitals not fully occupied)
     91   */
     92  Polygon_t getRemainingPoints(
     93      const WeightedPolygon_t &_polygon,
     94      const int _num_spots,
     95      const int _num_spots_available);
    9296
    9397  //!> default radius of the spherical distribution
  • src/Fragmentation/Exporters/unittests/SphericalPointDistributionUnitTest.cpp

    r87c1cc r2390e6  
    748748    expected += Vector(-1.,0.,0.);
    749749    SphericalPointDistribution::Polygon_t remaining =
    750         SPD.getRemainingPoints(polygon, 2);
     750        SPD.getRemainingPoints(polygon, 2, 2);
    751751//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    752752    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    760760    expected += Vector(0.,-1.,0.);
    761761    SphericalPointDistribution::Polygon_t remaining =
    762         SPD.getRemainingPoints(polygon, 2);
     762        SPD.getRemainingPoints(polygon, 2, 2);
    763763//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    764764    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    772772    expected += Vector(0.,0.,1.);
    773773    SphericalPointDistribution::Polygon_t remaining =
    774         SPD.getRemainingPoints(polygon, 2);
     774        SPD.getRemainingPoints(polygon, 2, 2);
    775775//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    776776    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    785785    expected += RotationAxis.rotateVector(Vector(-1.,0.,0.), 47.6/180*M_PI);
    786786    SphericalPointDistribution::Polygon_t remaining =
    787         SPD.getRemainingPoints(polygon, 2);
     787        SPD.getRemainingPoints(polygon, 2, 2);
    788788//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    789789    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    805805    expected.pop_front(); // remove first point
    806806    SphericalPointDistribution::Polygon_t remaining =
    807         SPD.getRemainingPoints(polygon, 3);
     807        SPD.getRemainingPoints(polygon, 3, 3);
    808808//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    809809    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    823823    }
    824824    SphericalPointDistribution::Polygon_t remaining =
    825         SPD.getRemainingPoints(polygon, 3);
     825        SPD.getRemainingPoints(polygon, 3, 3);
    826826//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    827827    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    838838    expected.pop_front(); // remove second point
    839839    SphericalPointDistribution::Polygon_t remaining =
    840         SPD.getRemainingPoints(polygon, 3);
     840        SPD.getRemainingPoints(polygon, 3, 3);
    841841//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    842842    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    861861      *iter = RotationAxis.rotateVector(*iter, 47.6/180*M_PI);
    862862    SphericalPointDistribution::Polygon_t remaining =
    863         SPD.getRemainingPoints(polygon, 3);
     863        SPD.getRemainingPoints(polygon, 3, 3);
    864864//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    865865    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    880880    SphericalPointDistribution::Polygon_t expected; // empty cause none are vacant
    881881    SphericalPointDistribution::Polygon_t remaining =
    882         SPD.getRemainingPoints(polygon, 3);
     882        SPD.getRemainingPoints(polygon, 3, 3);
    883883//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    884884    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    901901    SphericalPointDistribution::Polygon_t expected; // empty cause none are vacant
    902902    SphericalPointDistribution::Polygon_t remaining =
    903         SPD.getRemainingPoints(polygon, 3);
     903        SPD.getRemainingPoints(polygon, 3, 3);
    904904//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    905905    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    925925    expected.pop_front(); // remove first point
    926926    SphericalPointDistribution::Polygon_t remaining =
    927         SPD.getRemainingPoints(polygon, 4);
     927        SPD.getRemainingPoints(polygon, 4, 4);
    928928    //    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    929929        CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    943943    }
    944944    SphericalPointDistribution::Polygon_t remaining =
    945         SPD.getRemainingPoints(polygon, 4);
     945        SPD.getRemainingPoints(polygon, 4, 4);
    946946//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    947947    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    958958    expected.pop_front(); // remove second point
    959959    SphericalPointDistribution::Polygon_t remaining =
    960         SPD.getRemainingPoints(polygon, 4);
     960        SPD.getRemainingPoints(polygon, 4, 4);
    961961//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    962962    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    977977    expected.pop_front(); // remove second point
    978978    SphericalPointDistribution::Polygon_t remaining =
    979         SPD.getRemainingPoints(polygon, 4);
     979        SPD.getRemainingPoints(polygon, 4, 4);
    980980//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    981981    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    10001000      *iter = RotationAxis.rotateVector(*iter, 47.6/180*M_PI);
    10011001    SphericalPointDistribution::Polygon_t remaining =
    1002         SPD.getRemainingPoints(polygon, 4);
     1002        SPD.getRemainingPoints(polygon, 4, 4);
    10031003//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    10041004    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    10211021    expected.pop_front(); // remove third point
    10221022    SphericalPointDistribution::Polygon_t remaining =
    1023         SPD.getRemainingPoints(polygon, 4);
     1023        SPD.getRemainingPoints(polygon, 4, 4);
    10241024//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    10251025    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    10461046      *iter = RotationAxis.rotateVector(*iter, 47.6/180*M_PI);
    10471047    SphericalPointDistribution::Polygon_t remaining =
    1048         SPD.getRemainingPoints(polygon, 4);
     1048        SPD.getRemainingPoints(polygon, 4, 4);
    10491049//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    10501050    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    10731073    expected += Vector(-0.5773502691896,-5.551115123126e-17,-0.8164965809277);
    10741074    SphericalPointDistribution::Polygon_t remaining =
    1075         SPD.getRemainingPoints(polygon, 4);
     1075        SPD.getRemainingPoints(polygon, 4, 4);
    10761076//    std::cout << std::setprecision(13) << "Matched polygon is " << remaining << std::endl;
    10771077//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
     
    10901090    expected += Vector(-0.3535533905933,-0.3535533905933,-0.8660254037844);
    10911091    SphericalPointDistribution::Polygon_t remaining =
    1092         SPD.getRemainingPoints(polygon, 5);
     1092        SPD.getRemainingPoints(polygon, 5, 5);
    10931093    std::cout << std::setprecision(13) << "Matched polygon is " << remaining << std::endl;
    10941094//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
     
    11081108    expected += Vector(0.3535534025157,-0.3535533856548,0.8660254009332);
    11091109    SphericalPointDistribution::Polygon_t remaining =
    1110         SPD.getRemainingPoints(polygon, 5);
     1110        SPD.getRemainingPoints(polygon, 5, 5);
    11111111//    std::cout << std::setprecision(13) << "Matched polygon is " << remaining << std::endl;
    11121112//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
     
    11251125    expected += Vector(0.,0.,-1.);
    11261126    SphericalPointDistribution::Polygon_t remaining =
    1127         SPD.getRemainingPoints(polygon, 6);
     1127        SPD.getRemainingPoints(polygon, 6, 6);
    11281128//    std::cout << std::setprecision(13) << "Matched polygon is " << remaining << std::endl;
    11291129//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
     
    11461146    expected.pop_front(); // remove first point
    11471147    SphericalPointDistribution::Polygon_t remaining =
    1148         SPD.getRemainingPoints(polygon, 5);
     1148        SPD.getRemainingPoints(polygon, 5, 5);
    11491149//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    11501150    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    11641164    }
    11651165    SphericalPointDistribution::Polygon_t remaining =
    1166         SPD.getRemainingPoints(polygon, 5);
     1166        SPD.getRemainingPoints(polygon, 5, 5);
    11671167//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    11681168    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    11791179    expected.pop_front(); // remove second point
    11801180    SphericalPointDistribution::Polygon_t remaining =
    1181         SPD.getRemainingPoints(polygon, 5);
     1181        SPD.getRemainingPoints(polygon, 5, 5);
    11821182//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    11831183    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    12021202      *iter = RotationAxis.rotateVector(*iter, 47.6/180.*M_PI);
    12031203    SphericalPointDistribution::Polygon_t remaining =
    1204         SPD.getRemainingPoints(polygon, 5);
     1204        SPD.getRemainingPoints(polygon, 5, 5);
    12051205    // the three remaining points sit on a plane that may be rotated arbitrarily
    12061206    // so we cannot simply check for equality between expected and remaining
     
    12281228    expected.pop_front(); // remove third point
    12291229    SphericalPointDistribution::Polygon_t remaining =
    1230         SPD.getRemainingPoints(polygon, 5);
     1230        SPD.getRemainingPoints(polygon, 5, 5);
    12311231//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    12321232    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    12531253      *iter = RotationAxis.rotateVector(*iter, 47.6/180*M_PI);
    12541254    SphericalPointDistribution::Polygon_t remaining =
    1255         SPD.getRemainingPoints(polygon, 5);
     1255        SPD.getRemainingPoints(polygon, 5, 5);
    12561256//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    12571257    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    12771277    expected.pop_front(); // remove first point
    12781278    SphericalPointDistribution::Polygon_t remaining =
    1279         SPD.getRemainingPoints(polygon, 6);
     1279        SPD.getRemainingPoints(polygon, 6, 6);
    12801280//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    12811281    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    12951295    }
    12961296    SphericalPointDistribution::Polygon_t remaining =
    1297         SPD.getRemainingPoints(polygon, 6);
     1297        SPD.getRemainingPoints(polygon, 6, 6);
    12981298//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    12991299    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    13101310    expected.pop_front(); // remove second spoint
    13111311    SphericalPointDistribution::Polygon_t remaining =
    1312         SPD.getRemainingPoints(polygon, 6);
     1312        SPD.getRemainingPoints(polygon, 6, 6);
    13131313//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    13141314    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    13331333      *iter = RotationAxis.rotateVector(*iter, 47.6/180*M_PI);
    13341334    SphericalPointDistribution::Polygon_t remaining =
    1335         SPD.getRemainingPoints(polygon, 6);
     1335        SPD.getRemainingPoints(polygon, 6, 6);
    13361336    // the four remaining points sit on a plane that may have been rotated arbitrarily
    13371337    // so we cannot simply check for equality between expected and remaining
     
    13591359    expected.pop_front(); // remove third point
    13601360    SphericalPointDistribution::Polygon_t remaining =
    1361         SPD.getRemainingPoints(polygon, 6);
     1361        SPD.getRemainingPoints(polygon, 6, 6);
    13621362//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    13631363    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    13841384      *iter = RotationAxis.rotateVector(*iter, 47.6/180*M_PI);
    13851385    SphericalPointDistribution::Polygon_t remaining =
    1386         SPD.getRemainingPoints(polygon, 6);
     1386        SPD.getRemainingPoints(polygon, 6, 6);
    13871387//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    13881388    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    14081408    expected.pop_front(); // remove first point
    14091409    SphericalPointDistribution::Polygon_t remaining =
    1410         SPD.getRemainingPoints(polygon, 7);
     1410        SPD.getRemainingPoints(polygon, 7, 7);
    14111411//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    14121412    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    14261426    }
    14271427    SphericalPointDistribution::Polygon_t remaining =
    1428         SPD.getRemainingPoints(polygon, 7);
     1428        SPD.getRemainingPoints(polygon, 7, 7);
    14291429//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    14301430    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    14411441    expected.pop_front(); // remove second point
    14421442    SphericalPointDistribution::Polygon_t remaining =
    1443         SPD.getRemainingPoints(polygon, 7);
     1443        SPD.getRemainingPoints(polygon, 7, 7);
    14441444//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    14451445    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    14641464      *iter = RotationAxis.rotateVector(*iter, 47.6/180*M_PI);
    14651465    SphericalPointDistribution::Polygon_t remaining =
    1466         SPD.getRemainingPoints(polygon, 7);
     1466        SPD.getRemainingPoints(polygon, 7, 7);
    14671467    // the five remaining points sit on a plane that may have been rotated arbitrarily
    14681468    // so we cannot simply check for equality between expected and remaining
     
    14901490    expected.pop_front(); // remove third point
    14911491    SphericalPointDistribution::Polygon_t remaining =
    1492         SPD.getRemainingPoints(polygon, 7);
     1492        SPD.getRemainingPoints(polygon, 7, 7);
    14931493//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    14941494    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    15151515      *iter = RotationAxis.rotateVector(*iter, 47.6/180*M_PI);
    15161516    SphericalPointDistribution::Polygon_t remaining =
    1517         SPD.getRemainingPoints(polygon, 7);
     1517        SPD.getRemainingPoints(polygon, 7, 7);
    15181518//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    15191519    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    15391539    expected.pop_front(); // remove first point
    15401540    SphericalPointDistribution::Polygon_t remaining =
    1541         SPD.getRemainingPoints(polygon, 8);
     1541        SPD.getRemainingPoints(polygon, 8, 8);
    15421542//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    15431543    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    15571557    }
    15581558    SphericalPointDistribution::Polygon_t remaining =
    1559         SPD.getRemainingPoints(polygon, 8);
     1559        SPD.getRemainingPoints(polygon, 8, 8);
    15601560//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    15611561    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    15721572    expected.pop_front(); // remove second point
    15731573    SphericalPointDistribution::Polygon_t remaining =
    1574         SPD.getRemainingPoints(polygon, 8);
     1574        SPD.getRemainingPoints(polygon, 8, 8);
    15751575//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    15761576    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    15951595      *iter = RotationAxis.rotateVector(*iter, 47.6/180*M_PI);
    15961596    SphericalPointDistribution::Polygon_t remaining =
    1597         SPD.getRemainingPoints(polygon, 8);
     1597        SPD.getRemainingPoints(polygon, 8, 8);
    15981598    // the six remaining points sit on two planes that may have been rotated arbitrarily
    15991599    // so we cannot simply check for equality between expected and remaining
     
    16251625    expected.pop_front(); // remove third point
    16261626    SphericalPointDistribution::Polygon_t remaining =
    1627         SPD.getRemainingPoints(polygon, 8);
     1627        SPD.getRemainingPoints(polygon, 8, 8);
    16281628//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    16291629    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     
    16501650      *iter = RotationAxis.rotateVector(*iter, 47.6/180*M_PI);
    16511651    SphericalPointDistribution::Polygon_t remaining =
    1652         SPD.getRemainingPoints(polygon, 8);
    1653 //    CPPUNIT_ASSERT_EQUAL( expected, remaining );
    1654     CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
    1655     // also slightly perturbed
    1656     const double amplitude = 0.05;
    1657     perturbPolygon(polygon, amplitude);
    1658     CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, amplitude) );
    1659   }
    1660 }
     1652        SPD.getRemainingPoints(polygon, 8, 8);
     1653//    CPPUNIT_ASSERT_EQUAL( expected, remaining );
     1654    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, CenterAccuracy) );
     1655    // also slightly perturbed
     1656    const double amplitude = 0.05;
     1657    perturbPolygon(polygon, amplitude);
     1658    CPPUNIT_ASSERT( areEqualToWithinBounds(expected, remaining, amplitude) );
     1659  }
     1660}
Note: See TracChangeset for help on using the changeset viewer.