Changeset ad37ab


Ignore:
Timestamp:
Oct 27, 2009, 11:51:52 AM (15 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
776b64
Parents:
70ff32
Message:

analyzer.cpp and boundary.cpp refactored.

  • ticket #39 is done with respect to these files
  • both do not contain member functions (anymore), hence ticket #4 and ticket #38 are both fulfilled.
Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/analyzer.cpp

    r70ff32 rad37ab  
    5959  bool NoTime = false;
    6060  bool NoHCorrection = true;
    61   int counter;
     61  int counter = 0;
    6262
    6363  cout << "ANOVA Analyzer" << endl;
  • src/boundary.cpp

    r70ff32 rad37ab  
    3434  bool BoundaryFreeFlag = false;
    3535  Boundaries *BoundaryPoints = BoundaryPtr;
     36  double OldComponent = 0.;
     37  double tmp = 0.;
     38  double w1 = 0.;
     39  double w2 = 0.;
     40  Vector DistanceVector;
     41  Vector OtherVector;
     42  int component = 0;
     43  int Othercomponent = 0;
     44  Boundaries::iterator Neighbour;
     45  Boundaries::iterator OtherNeighbour;
     46  double *GreatestDiameter = new double[NDIM];
     47
    3648  if (BoundaryPoints == NULL) {
    3749    BoundaryFreeFlag = true;
     
    4153  }
    4254  // determine biggest "diameter" of cluster for each axis
    43   Boundaries::iterator Neighbour, OtherNeighbour;
    44   double *GreatestDiameter = new double[NDIM];
    4555  for (int i = 0; i < NDIM; i++)
    4656    GreatestDiameter[i] = 0.;
    47   double OldComponent, tmp, w1, w2;
    48   Vector DistanceVector, OtherVector;
    49   int component, Othercomponent;
    5057  for (int axis = 0; axis < NDIM; axis++)
    5158    { // regard each projected plane
     
    135142  Vector *MolCenter = mol->DetermineCenterOfAll(out);
    136143  Vector helper;
     144  BoundariesTestPair BoundaryTestPair;
     145  Vector AxisVector;
     146  Vector AngleReferenceVector;
     147  Vector AngleReferenceNormalVector;
     148  Vector ProjectedVector;
     149  Boundaries *BoundaryPoints = new Boundaries[NDIM]; // first is alpha, second is (r, nr)
     150  double radius = 0.;
     151  double angle = 0.;
    137152
    138153  *out << Verbose(1) << "Finding all boundary points." << endl;
    139   Boundaries *BoundaryPoints = new Boundaries[NDIM]; // first is alpha, second is (r, nr)
    140   BoundariesTestPair BoundaryTestPair;
    141   Vector AxisVector, AngleReferenceVector, AngleReferenceNormalVector;
    142   double radius, angle;
    143154  // 3a. Go through every axis
    144155  for (int axis = 0; axis < NDIM; axis++) {
     
    156167    while (Walker->next != mol->end) {
    157168      Walker = Walker->next;
    158       Vector ProjectedVector;
    159169      ProjectedVector.CopyVector(&Walker->x);
    160170      ProjectedVector.SubtractVector(MolCenter);
     
    267277
    268278          // calculate each length
    269           double a = SideA.Norm();
    270           //double b = SideB.Norm();
    271           //double c = SideC.Norm();
    272           double h = SideH.Norm();
     279          const double a = SideA.Norm();
     280          //const double b = SideB.Norm();
     281          //const double c = SideC.Norm();
     282          const double h = SideH.Norm();
    273283          // calculate the angles
    274           double alpha = SideA.Angle(&SideH);
    275           double beta = SideA.Angle(&SideC);
    276           double gamma = SideB.Angle(&SideH);
    277           double delta = SideC.Angle(&SideH);
    278           double MinDistance = a * sin(beta) / (sin(delta)) * (((alpha < M_PI / 2.) || (gamma < M_PI / 2.)) ? 1. : -1.);
     284          const double alpha = SideA.Angle(&SideH);
     285          const double beta = SideA.Angle(&SideC);
     286          const double gamma = SideB.Angle(&SideH);
     287          const double delta = SideC.Angle(&SideH);
     288          const double MinDistance = a * sin(beta) / (sin(delta)) * (((alpha < M_PI / 2.) || (gamma < M_PI / 2.)) ? 1. : -1.);
    279289          //*out << Verbose(2) << " I calculated: a = " << a << ", h = " << h << ", beta(" << left->second.second->Name << "," << left->second.second->Name << "-" << right->second.second->Name << ") = " << beta << ", delta(" << left->second.second->Name << "," << runner->second.second->Name << ") = " << delta << ", Min = " << MinDistance << "." << endl;
    280290          *out << Verbose(1) << "Checking CoG distance of runner " << *runner->second.second << " " << h << " against triangle's side length spanned by (" << *left->second.second << "," << *right->second.second << ") of " << MinDistance << "." << endl;
     
    386396
    387397  // 3d. check all baselines whether the peaks of the two adjacent triangles with respect to center of baseline are convex, if not, make the baseline between the two peaks and baseline endpoints become the new peaks
    388   bool AllConvex;
     398  bool AllConvex = true;
    389399  class BoundaryLineSet *line = NULL;
    390400  do {
     
    506516  class BoundaryPointSet *point = NULL;
    507517  class BoundaryLineSet *line = NULL;
    508   bool Concavity;
     518  bool Concavity = false;
    509519  char dummy[MAXSTRINGSIZE];
    510   PointMap::iterator PointRunner, PointAdvance;
    511   LineMap::iterator LineRunner, LineAdvance;
    512   TriangleMap::iterator TriangleRunner, TriangleAdvance;
     520  PointMap::iterator PointRunner;
     521  PointMap::iterator PointAdvance;
     522  LineMap::iterator LineRunner;
     523  LineMap::iterator LineAdvance;
     524  TriangleMap::iterator TriangleRunner;
     525  TriangleMap::iterator TriangleAdvance;
     526  int run = 0;
    513527
    514528  *out << Verbose(0) << "Begin of ConvexizeNonconvexEnvelope" << endl;
     
    521535
    522536  // First step: RemovePointFromTesselatedSurface
    523   int run = 0;
    524   double tmp;
    525537  do {
    526538    Concavity = false;
     
    564576      // take highest of both lines
    565577      if (TesselStruct->IsConvexRectangle(out, line) == NULL) {
    566         tmp = TesselStruct->PickFarthestofTwoBaselines(out, line);
     578        const double tmp = TesselStruct->PickFarthestofTwoBaselines(out, line);
    567579        volume += tmp;
    568         if (tmp != 0) {
     580        if (tmp != 0.) {
    569581          mol->TesselStruct->FlipBaseline(out, line);
    570582          Concavity = true;
     
    619631  bool IsAngstroem = configuration->GetIsAngstroem();
    620632  double volume = 0.;
    621   double PyramidVolume = 0.;
    622   double G, h;
    623   Vector x, y;
    624   double a, b, c;
     633  Vector x;
     634  Vector y;
    625635
    626636  // 6a. Every triangle forms a pyramid with the center of gravity as its peak, sum up the volumes
     
    634644      y.CopyVector(runner->second->endpoints[0]->node->node);
    635645      y.SubtractVector(runner->second->endpoints[2]->node->node);
    636       a = sqrt(runner->second->endpoints[0]->node->node->DistanceSquared(runner->second->endpoints[1]->node->node));
    637       b = sqrt(runner->second->endpoints[0]->node->node->DistanceSquared(runner->second->endpoints[2]->node->node));
    638       c = sqrt(runner->second->endpoints[2]->node->node->DistanceSquared(runner->second->endpoints[1]->node->node));
    639       G = sqrt(((a + b + c) * (a + b + c) - 2 * (a * a + b * b + c * c)) / 16.); // area of tesselated triangle
     646      const double a = sqrt(runner->second->endpoints[0]->node->node->DistanceSquared(runner->second->endpoints[1]->node->node));
     647      const double b = sqrt(runner->second->endpoints[0]->node->node->DistanceSquared(runner->second->endpoints[2]->node->node));
     648      const double c = sqrt(runner->second->endpoints[2]->node->node->DistanceSquared(runner->second->endpoints[1]->node->node));
     649      const double G = sqrt(((a + b + c) * (a + b + c) - 2 * (a * a + b * b + c * c)) / 16.); // area of tesselated triangle
    640650      x.MakeNormalVector(runner->second->endpoints[0]->node->node, runner->second->endpoints[1]->node->node, runner->second->endpoints[2]->node->node);
    641651      x.Scale(runner->second->endpoints[1]->node->node->ScalarProduct(&x));
    642       h = x.Norm(); // distance of CoG to triangle
    643       PyramidVolume = (1. / 3.) * G * h; // this formula holds for _all_ pyramids (independent of n-edge base or (not) centered peak)
     652      const double h = x.Norm(); // distance of CoG to triangle
     653      const double PyramidVolume = (1. / 3.) * G * h; // this formula holds for _all_ pyramids (independent of n-edge base or (not) centered peak)
    644654      *out << Verbose(2) << "Area of triangle is " << G << " "
    645655          << (IsAngstroem ? "angstrom" : "atomiclength") << "^2, height is "
     
    694704 * \param celldensity desired average density in final cell
    695705 */
    696 void
    697 PrepareClustersinWater(ofstream *out, config *configuration, molecule *mol,
    698     double ClusterVolume, double celldensity)
     706void PrepareClustersinWater(ofstream *out, config *configuration, molecule *mol, double ClusterVolume, double celldensity)
    699707{
     708  bool IsAngstroem = NULL;
     709  double *GreatestDiameter = NULL;
     710  Boundaries *BoundaryPoints = NULL;
     711  class Tesselation *TesselStruct = NULL;
     712  Vector BoxLengths;
     713  int repetition[NDIM] = { 1, 1, 1 };
     714  int TotalNoClusters = 1;
     715  atom *Walker = NULL;
     716  double totalmass = 0.;
     717  double clustervolume = 0.;
     718  double cellvolume = 0.;
     719
    700720  // transform to PAS
    701721  mol->PrincipalAxisSystem(out, true);
    702722
    703   // some preparations beforehand
    704   bool IsAngstroem = configuration->GetIsAngstroem();
    705   Boundaries *BoundaryPoints = GetBoundaryPoints(out, mol);
    706   class Tesselation *TesselStruct = NULL;
     723  IsAngstroem = configuration->GetIsAngstroem();
     724  GreatestDiameter = GetDiametersOfCluster(out, BoundaryPoints, mol, IsAngstroem);
     725  BoundaryPoints = GetBoundaryPoints(out, mol);
    707726  LinkedCell LCList(mol, 10.);
    708727  FindConvexBorder(out, mol, &LCList, NULL);
    709   double clustervolume;
     728
     729  // some preparations beforehand
    710730  if (ClusterVolume == 0)
    711731    clustervolume = VolumeOfConvexEnvelope(out, TesselStruct, configuration);
    712732  else
    713733    clustervolume = ClusterVolume;
    714   double *GreatestDiameter = GetDiametersOfCluster(out, BoundaryPoints, mol, IsAngstroem);
    715   Vector BoxLengths;
    716   int repetition[NDIM] =
    717     { 1, 1, 1 };
    718   int TotalNoClusters = 1;
     734
    719735  for (int i = 0; i < NDIM; i++)
    720736    TotalNoClusters *= repetition[i];
    721737
    722738  // sum up the atomic masses
    723   double totalmass = 0.;
    724   atom *Walker = mol->start;
    725   while (Walker->next != mol->end)
    726     {
     739  Walker = mol->start;
     740  while (Walker->next != mol->end) {
    727741      Walker = Walker->next;
    728742      totalmass += Walker->type->mass;
    729     }
    730   *out << Verbose(0) << "RESULT: The summed mass is " << setprecision(10)
    731       << totalmass << " atomicmassunit." << endl;
    732 
    733   *out << Verbose(0) << "RESULT: The average density is " << setprecision(10)
    734       << totalmass / clustervolume << " atomicmassunit/"
    735       << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl;
     743  }
     744  *out << Verbose(0) << "RESULT: The summed mass is " << setprecision(10) << totalmass << " atomicmassunit." << endl;
     745  *out << Verbose(0) << "RESULT: The average density is " << setprecision(10) << totalmass / clustervolume << " atomicmassunit/" << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl;
    736746
    737747  // solve cubic polynomial
    738   *out << Verbose(1) << "Solving equidistant suspension in water problem ..."
    739       << endl;
    740   double cellvolume;
     748  *out << Verbose(1) << "Solving equidistant suspension in water problem ..." << endl;
    741749  if (IsAngstroem)
    742     cellvolume = (TotalNoClusters * totalmass / SOLVENTDENSITY_A - (totalmass
    743         / clustervolume)) / (celldensity - 1);
     750    cellvolume = (TotalNoClusters * totalmass / SOLVENTDENSITY_A - (totalmass / clustervolume)) / (celldensity - 1);
    744751  else
    745     cellvolume = (TotalNoClusters * totalmass / SOLVENTDENSITY_a0 - (totalmass
    746         / clustervolume)) / (celldensity - 1);
    747   *out << Verbose(1) << "Cellvolume needed for a density of " << celldensity
    748       << " g/cm^3 is " << cellvolume << " " << (IsAngstroem ? "angstrom"
    749       : "atomiclength") << "^3." << endl;
    750 
    751   double minimumvolume = TotalNoClusters * (GreatestDiameter[0]
    752       * GreatestDiameter[1] * GreatestDiameter[2]);
    753   *out << Verbose(1)
    754       << "Minimum volume of the convex envelope contained in a rectangular box is "
    755       << minimumvolume << " atomicmassunit/" << (IsAngstroem ? "angstrom"
    756       : "atomiclength") << "^3." << endl;
    757   if (minimumvolume > cellvolume)
    758     {
    759       cerr << Verbose(0)
    760           << "ERROR: the containing box already has a greater volume than the envisaged cell volume!"
    761           << endl;
    762       cout << Verbose(0)
    763           << "Setting Box dimensions to minimum possible, the greatest diameters."
    764           << endl;
    765       for (int i = 0; i < NDIM; i++)
    766         BoxLengths.x[i] = GreatestDiameter[i];
    767       mol->CenterEdge(out, &BoxLengths);
    768     }
    769   else
    770     {
    771       BoxLengths.x[0] = (repetition[0] * GreatestDiameter[0] + repetition[1]
    772           * GreatestDiameter[1] + repetition[2] * GreatestDiameter[2]);
    773       BoxLengths.x[1] = (repetition[0] * repetition[1] * GreatestDiameter[0]
    774           * GreatestDiameter[1] + repetition[0] * repetition[2]
    775           * GreatestDiameter[0] * GreatestDiameter[2] + repetition[1]
    776           * repetition[2] * GreatestDiameter[1] * GreatestDiameter[2]);
    777       BoxLengths.x[2] = minimumvolume - cellvolume;
    778       double x0 = 0., x1 = 0., x2 = 0.;
    779       if (gsl_poly_solve_cubic(BoxLengths.x[0], BoxLengths.x[1],
    780           BoxLengths.x[2], &x0, &x1, &x2) == 1) // either 1 or 3 on return
    781         *out << Verbose(0) << "RESULT: The resulting spacing is: " << x0
    782             << " ." << endl;
    783       else
    784         {
    785           *out << Verbose(0) << "RESULT: The resulting spacings are: " << x0
    786               << " and " << x1 << " and " << x2 << " ." << endl;
    787           x0 = x2; // sorted in ascending order
    788         }
    789 
    790       cellvolume = 1;
    791       for (int i = 0; i < NDIM; i++)
    792         {
    793           BoxLengths.x[i] = repetition[i] * (x0 + GreatestDiameter[i]);
    794           cellvolume *= BoxLengths.x[i];
    795         }
    796 
    797       // set new box dimensions
    798       *out << Verbose(0) << "Translating to box with these boundaries." << endl;
    799       mol->SetBoxDimension(&BoxLengths);
    800       mol->CenterInBox((ofstream *) &cout);
    801     }
     752    cellvolume = (TotalNoClusters * totalmass / SOLVENTDENSITY_a0 - (totalmass / clustervolume)) / (celldensity - 1);
     753  *out << Verbose(1) << "Cellvolume needed for a density of " << celldensity << " g/cm^3 is " << cellvolume << " " << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl;
     754
     755  double minimumvolume = TotalNoClusters * (GreatestDiameter[0] * GreatestDiameter[1] * GreatestDiameter[2]);
     756  *out << Verbose(1) << "Minimum volume of the convex envelope contained in a rectangular box is " << minimumvolume << " atomicmassunit/" << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl;
     757  if (minimumvolume > cellvolume) {
     758    cerr << Verbose(0) << "ERROR: the containing box already has a greater volume than the envisaged cell volume!" << endl;
     759    cout << Verbose(0) << "Setting Box dimensions to minimum possible, the greatest diameters." << endl;
     760    for (int i = 0; i < NDIM; i++)
     761      BoxLengths.x[i] = GreatestDiameter[i];
     762    mol->CenterEdge(out, &BoxLengths);
     763  } else {
     764    BoxLengths.x[0] = (repetition[0] * GreatestDiameter[0] + repetition[1] * GreatestDiameter[1] + repetition[2] * GreatestDiameter[2]);
     765    BoxLengths.x[1] = (repetition[0] * repetition[1] * GreatestDiameter[0] * GreatestDiameter[1] + repetition[0] * repetition[2] * GreatestDiameter[0] * GreatestDiameter[2] + repetition[1] * repetition[2] * GreatestDiameter[1] * GreatestDiameter[2]);
     766    BoxLengths.x[2] = minimumvolume - cellvolume;
     767    double x0 = 0.;
     768    double x1 = 0.;
     769    double x2 = 0.;
     770    if (gsl_poly_solve_cubic(BoxLengths.x[0], BoxLengths.x[1], BoxLengths.x[2], &x0, &x1, &x2) == 1) // either 1 or 3 on return
     771      *out << Verbose(0) << "RESULT: The resulting spacing is: " << x0 << " ." << endl;
     772    else {
     773      *out << Verbose(0) << "RESULT: The resulting spacings are: " << x0 << " and " << x1 << " and " << x2 << " ." << endl;
     774      x0 = x2; // sorted in ascending order
     775    }
     776
     777    cellvolume = 1.;
     778    for (int i = 0; i < NDIM; i++) {
     779      BoxLengths.x[i] = repetition[i] * (x0 + GreatestDiameter[i]);
     780      cellvolume *= BoxLengths.x[i];
     781    }
     782
     783    // set new box dimensions
     784    *out << Verbose(0) << "Translating to box with these boundaries." << endl;
     785    mol->SetBoxDimension(&BoxLengths);
     786    mol->CenterInBox((ofstream *) &cout);
     787  }
    802788  // update Box of atoms by boundary
    803789  mol->SetBoxDimension(&BoxLengths);
    804   *out << Verbose(0) << "RESULT: The resulting cell dimensions are: "
    805       << BoxLengths.x[0] << " and " << BoxLengths.x[1] << " and "
    806       << BoxLengths.x[2] << " with total volume of " << cellvolume << " "
    807       << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl;
    808 }
    809 ;
     790  *out << Verbose(0) << "RESULT: The resulting cell dimensions are: " << BoxLengths.x[0] << " and " << BoxLengths.x[1] << " and " << BoxLengths.x[2] << " with total volume of " << cellvolume << " " << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl;
     791};
    810792
    811793
     
    836818  atom *Walker = NULL;
    837819  bond *Binder = NULL;
    838   int i;
     820  int i = 0;
    839821  LinkedCell *LCList[List->ListOfMolecules.size()];
     822  double phi[NDIM];
    840823
    841824  *out << Verbose(0) << "Begin of FillBoxWithMolecule" << endl;
     
    858841  filler->CountAtoms(out);
    859842  atom * CopyAtoms[filler->AtomCount];
    860   int nr = 0;
    861843
    862844  // calculate filler grid in [0,1]^3
     
    903885
    904886          // go through all atoms
    905           nr=0;
    906887          Walker = filler->start;
    907888          while (Walker->next != filler->end) {
     
    916897            // ... and rotation matrix
    917898            if (DoRandomRotation) {
    918               double phi[NDIM];
    919899              for (int i=0;i<NDIM;i++) {
    920900                phi[i] = rand()/(RAND_MAX/(2.*M_PI));
     
    975955{
    976956  bool freeLC = false;
     957  LineMap::iterator baseline;
     958  LineMap::iterator testline;
     959  bool OneLoopWithoutSuccessFlag = false;  // marks whether we went once through all baselines without finding any without two triangles
     960  bool TesselationFailFlag = false;
    977961
    978962  *out << Verbose(1) << "Entering search for non convex hull. " << endl;
     
    985969    mol->TesselStruct = new Tesselation;
    986970  }
    987   LineMap::iterator baseline;
    988   LineMap::iterator testline;
     971
    989972  *out << Verbose(0) << "Begin of FindNonConvexBorder\n";
    990   bool OneLoopWithoutSuccessFlag = false;  // marks whether we went once through all baselines without finding any without two triangles
    991   bool TesselationFailFlag = false;
    992973
    993974  // initialise Linked Cell
     
    10661047
    10671048
    1068 /** Finds a hole of sufficient size in \a this molecule to embed \a *srcmol into it.
     1049/** Finds a hole of sufficient size in \a *mols to embed \a *srcmol into it.
    10691050 * \param *out output stream for debugging
    1070  * \param *srcmol molecule to embed into
     1051 * \param *mols molecules in the domain to embed in between
     1052 * \param *srcmol embedding molecule
    10711053 * \return *Vector new center of \a *srcmol for embedding relative to \a this
    10721054 */
    1073 Vector* molecule::FindEmbeddingHole(ofstream *out, molecule *srcmol)
     1055Vector* FindEmbeddingHole(ofstream *out, MoleculeListClass *mols, molecule *srcmol)
    10741056{
    10751057  Vector *Center = new Vector;
  • src/boundary.hpp

    r70ff32 rad37ab  
    5959void StoreTrianglesinFile(ofstream *out, molecule *mol, const char *filename, const char *extraSuffix);
    6060bool RemoveAllBoundaryPoints(ofstream *out, class Tesselation *TesselStruct, molecule *mol, char *filename);
     61Vector* FindEmbeddingHole(ofstream *out, MoleculeListClass *mols, molecule *srcmol);
    6162
    6263
  • src/molecule.hpp

    r70ff32 rad37ab  
    228228  void PrincipalAxisSystem(ofstream *out, bool DoRotate);
    229229  double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem);
    230   Vector* FindEmbeddingHole(ofstream *out, molecule *srcmol);
    231 
    232230
    233231  double ConstrainedPotential(ofstream *out, struct EvaluatePotential &Params);
Note: See TracChangeset for help on using the changeset viewer.