Changeset f1cccd for src


Ignore:
Timestamp:
Aug 17, 2009, 1:20:16 PM (15 years ago)
Author:
Saskia Metzler <metzler@…>
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:
7c14ec
Parents:
093645
Message:

Ticket 14: Rename .._.. functions in boundary.cpp

Location:
src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/boundary.cpp

    r093645 rf1cccd  
    118118 * \param *mol molecule structure with atom positions
    119119 */
    120 void write_vrml_file(ofstream *out, ofstream *vrmlfile, class Tesselation *Tess, class molecule *mol)
     120void WriteVrmlFile(ofstream *out, ofstream *vrmlfile, class Tesselation *Tess, class molecule *mol)
    121121{
    122122  atom *Walker = mol->start;
     
    172172 * \param *mol molecule structure with atom positions
    173173 */
    174 void write_raster3d_file(ofstream *out, ofstream *rasterfile, class Tesselation *Tess, class molecule *mol)
     174void WriteRaster3dFile(ofstream *out, ofstream *rasterfile, class Tesselation *Tess, class molecule *mol)
    175175{
    176176  atom *Walker = mol->start;
     
    227227 * \param N arbitrary number to differentiate various zones in the tecplot format
    228228 */
    229 void write_tecplot_file(ofstream *out, ofstream *tecplot, class Tesselation *TesselStruct, class molecule *mol, int N)
     229void WriteTecplotFile(ofstream *out, ofstream *tecplot, class Tesselation *TesselStruct, class molecule *mol, int N)
    230230{
    231231  if ((tecplot != NULL) && (TesselStruct != NULL)) {
     
    440440 * \return *TesselStruct is filled with convex boundary and tesselation is stored under \a *filename.
    441441 */
    442 void Find_convex_border(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename)
     442void FindConvexBorder(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename)
    443443{
    444444  bool BoundaryFreeFlag = false;
    445445  Boundaries *BoundaryPoints = NULL;
    446446
    447   cout << Verbose(1) << "Begin of find_convex_border" << endl;
     447  cout << Verbose(1) << "Begin of FindConvexBorder" << endl;
    448448
    449449  if (mol->TesselStruct != NULL) // free if allocated
     
    509509      OutputName.append(TecplotSuffix);
    510510      ofstream *tecplot = new ofstream(OutputName.c_str());
    511       write_tecplot_file(out, tecplot, mol->TesselStruct, mol, 0);
     511      WriteTecplotFile(out, tecplot, mol->TesselStruct, mol, 0);
    512512      tecplot->close();
    513513      delete(tecplot);
     
    518518      OutputName.append(Raster3DSuffix);
    519519      ofstream *rasterplot = new ofstream(OutputName.c_str());
    520       write_raster3d_file(out, rasterplot, mol->TesselStruct, mol);
     520      WriteRaster3dFile(out, rasterplot, mol->TesselStruct, mol);
    521521      rasterplot->close();
    522522      delete(rasterplot);
     
    556556      OutputName.append(TecplotSuffix);
    557557      ofstream *tecplot = new ofstream(OutputName.c_str());
    558       write_tecplot_file(out, tecplot, mol->TesselStruct, mol, 0);
     558      WriteTecplotFile(out, tecplot, mol->TesselStruct, mol, 0);
    559559      tecplot->close();
    560560      delete(tecplot);
     
    564564      OutputName.append(Raster3DSuffix);
    565565      ofstream *rasterplot = new ofstream(OutputName.c_str());
    566       write_raster3d_file(out, rasterplot, mol->TesselStruct, mol);
     566      WriteRaster3dFile(out, rasterplot, mol->TesselStruct, mol);
    567567      rasterplot->close();
    568568      delete(rasterplot);
     
    575575    delete[] (BoundaryPoints);
    576576
    577   cout << Verbose(1) << "End of find_convex_border" << endl;
     577  cout << Verbose(1) << "End of FindConvexBorder" << endl;
    578578};
    579579
     
    700700      OutputName.append(TecplotSuffix);
    701701      ofstream *tecplot = new ofstream(OutputName.c_str());
    702       write_tecplot_file(out, tecplot, mol->TesselStruct, mol, 0);
     702      WriteTecplotFile(out, tecplot, mol->TesselStruct, mol, 0);
    703703      tecplot->close();
    704704      delete(tecplot);
     
    709709      OutputName.append(Raster3DSuffix);
    710710      ofstream *rasterplot = new ofstream(OutputName.c_str());
    711       write_raster3d_file(out, rasterplot, mol->TesselStruct, mol);
     711      WriteRaster3dFile(out, rasterplot, mol->TesselStruct, mol);
    712712      rasterplot->close();
    713713      delete(rasterplot);
     
    754754      OutputName.append(TecplotSuffix);
    755755      ofstream *tecplot = new ofstream(OutputName.c_str());
    756       write_tecplot_file(out, tecplot, mol->TesselStruct, mol, 0);
     756      WriteTecplotFile(out, tecplot, mol->TesselStruct, mol, 0);
    757757      tecplot->close();
    758758      delete(tecplot);
     
    762762      OutputName.append(Raster3DSuffix);
    763763      ofstream *rasterplot = new ofstream(OutputName.c_str());
    764       write_raster3d_file(out, rasterplot, mol->TesselStruct, mol);
     764      WriteRaster3dFile(out, rasterplot, mol->TesselStruct, mol);
    765765      rasterplot->close();
    766766      delete(rasterplot);
     
    841841  class Tesselation *TesselStruct = NULL;
    842842  LinkedCell LCList(mol, 10.);
    843   Find_convex_border(out, mol, &LCList, NULL);
     843  FindConvexBorder(out, mol, &LCList, NULL);
    844844  double clustervolume;
    845845  if (ClusterVolume == 0)
     
    982982    if ((*ListRunner)->TesselStruct == NULL) {
    983983      *out << Verbose(1) << "Pre-creating tesselation for molecule " << *ListRunner << "." << endl;
    984       Find_non_convex_border((ofstream *)&cout, (*ListRunner), LCList[i], NULL, 5.);
     984      FindNonConvexBorder((ofstream *)&cout, (*ListRunner), LCList[i], NULL, 5.);
    985985    }
    986986    i++;
     
    11071107 * \para RADIUS radius of the virtual sphere
    11081108 */
    1109 void Find_non_convex_border(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename, const double RADIUS)
     1109void FindNonConvexBorder(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename, const double RADIUS)
    11101110{
    11111111  int N = 0;
     
    11261126  LineMap::iterator baseline;
    11271127  LineMap::iterator testline;
    1128   *out << Verbose(0) << "Begin of Find_non_convex_border\n";
     1128  *out << Verbose(0) << "Begin of FindNonConvexBorder\n";
    11291129  bool flag = false;  // marks whether we went once through all baselines without finding any without two triangles
    11301130  bool failflag = false;
     
    11351135  }
    11361136
    1137   mol->TesselStruct->Find_starting_triangle(out, RADIUS, LCList);
     1137  mol->TesselStruct->FindStartingTriangle(out, RADIUS, LCList);
    11381138
    11391139  baseline = mol->TesselStruct->LinesOnBoundary.begin();
     
    11441144  while ((baseline != mol->TesselStruct->LinesOnBoundary.end()) || (flag)) {
    11451145    if (baseline->second->triangles.size() == 1) {
    1146       failflag = mol->TesselStruct->Find_next_suitable_triangle(out, *(baseline->second), *(((baseline->second->triangles.begin()))->second), RADIUS, N, LCList); //the line is there, so there is a triangle, but only one.
     1146      failflag = mol->TesselStruct->FindNextSuitableTriangle(out, *(baseline->second), *(((baseline->second->triangles.begin()))->second), RADIUS, N, LCList); //the line is there, so there is a triangle, but only one.
    11471147      flag = flag || failflag;
    11481148      if (!failflag)
    1149         cerr << "WARNING: Find_next_suitable_triangle failed." << endl;
     1149        cerr << "WARNING: FindNextSuitableTriangle failed." << endl;
    11501150      // write temporary envelope
    11511151      if ((DoSingleStepOutput && (mol->TesselStruct->TrianglesOnBoundaryCount % SingleStepWidth == 0))) { // if we have a new triangle and want to output each new triangle configuration
     
    11631163            *out << Verbose(1) << "Writing temporary non convex hull to file " << NameofTempFile << ".\n";
    11641164            tempstream = new ofstream(NameofTempFile.c_str(), ios::trunc);
    1165             write_tecplot_file(out, tempstream, mol->TesselStruct, mol, TriangleFilesWritten);
     1165            WriteTecplotFile(out, tempstream, mol->TesselStruct, mol, TriangleFilesWritten);
    11661166            tempstream->close();
    11671167            tempstream->flush();
     
    11771177            *out << Verbose(1) << "Writing temporary non convex hull to file " << NameofTempFile << ".\n";
    11781178            tempstream = new ofstream(NameofTempFile.c_str(), ios::trunc);
    1179             write_raster3d_file(out, tempstream, mol->TesselStruct, mol);
     1179            WriteRaster3dFile(out, tempstream, mol->TesselStruct, mol);
    11801180    //        // include the current position of the virtual sphere in the temporary raster3d file
    11811181    //        // make the circumsphere's center absolute again
     
    12231223      OutputName.append(TecplotSuffix);
    12241224      ofstream *tecplot = new ofstream(OutputName.c_str());
    1225       write_tecplot_file(out, tecplot, mol->TesselStruct, mol, -1);
     1225      WriteTecplotFile(out, tecplot, mol->TesselStruct, mol, -1);
    12261226      tecplot->close();
    12271227      delete(tecplot);
     
    12311231      OutputName.append(Raster3DSuffix);
    12321232      ofstream *raster = new ofstream(OutputName.c_str());
    1233       write_raster3d_file(out, raster, mol->TesselStruct, mol);
     1233      WriteRaster3dFile(out, raster, mol->TesselStruct, mol);
    12341234      raster->close();
    12351235      delete(raster);
     
    12851285  if (freeLC)
    12861286    delete(LCList);
    1287   *out << Verbose(0) << "End of Find_non_convex_border\n";
     1287  *out << Verbose(0) << "End of FindNonConvexBorder\n";
    12881288};
    12891289
  • src/boundary.hpp

    r093645 rf1cccd  
    3737void PrepareClustersinWater(ofstream *out, config *configuration, molecule *mol, double ClusterVolume, double celldensity);
    3838molecule * FillBoxWithMolecule(ofstream *out, MoleculeListClass *List, molecule *filler, config &configuration, double distance[NDIM], double RandAtomDisplacement, double RandMolDisplacement, bool DoRandomRotation);
    39 void Find_convex_border(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename);
    40 void Find_non_convex_border(ofstream *out, molecule* mol, class LinkedCell *LC, const char *tempbasename, const double RADIUS);
     39void FindConvexBorder(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename);
     40void FindNonConvexBorder(ofstream *out, molecule* mol, class LinkedCell *LC, const char *tempbasename, const double RADIUS);
    4141double ConvexizeNonconvexEnvelope(ofstream *out, class Tesselation *TesselStruct, molecule *mol, char *filename);
    42 void Find_next_suitable_point(class BoundaryTriangleSet *BaseTriangle, class BoundaryLineSet *BaseLine, atom*& OptCandidate, Vector *OptCandidateCenter, double *ShortestAngle, const double RADIUS, LinkedCell *LC);
     42void FindNextSuitablePoint(class BoundaryTriangleSet *BaseTriangle, class BoundaryLineSet *BaseLine, atom*& OptCandidate, Vector *OptCandidateCenter, double *ShortestAngle, const double RADIUS, LinkedCell *LC);
    4343Boundaries *GetBoundaryPoints(ofstream *out, molecule *mol);
    4444
  • src/builder.cpp

    r093645 rf1cccd  
    584584        LinkedCell LCList(mol, 10.);
    585585        class Tesselation *TesselStruct = NULL;
    586         Find_convex_border((ofstream *)&cout, mol, &LCList, NULL);
     586        FindConvexBorder((ofstream *)&cout, mol, &LCList, NULL);
    587587        double clustervolume = VolumeOfConvexEnvelope((ofstream *)&cout, TesselStruct, configuration);
    588588        cout << Verbose(0) << "The tesselated surface area is " << clustervolume << "." << endl;
     
    644644  Vector x,y,z,n; // coordinates for absolute point in cell volume
    645645  double *factor; // unit factor if desired
    646   double bond, min_bond;
     646  double bond, minBond;
    647647  char choice;  // menu choice char
    648648  bool valid;
     
    683683        first = mol->AskAtom("Enter first (fixed) atom: ");
    684684        second = mol->AskAtom("Enter second (shifting) atom: ");
    685         min_bond = 0.;
     685        minBond = 0.;
    686686        for (int i=NDIM;i--;)
    687           min_bond += (first->x.x[i]-second->x.x[i])*(first->x.x[i] - second->x.x[i]);
    688         min_bond = sqrt(min_bond);
    689         cout << Verbose(0) << "Current Bond length between " << first->type->name << " Atom " << first->nr << " and " << second->type->name << " Atom " << second->nr << ": " << min_bond << " a.u." << endl;
     687          minBond += (first->x.x[i]-second->x.x[i])*(first->x.x[i] - second->x.x[i]);
     688        minBond = sqrt(minBond);
     689        cout << Verbose(0) << "Current Bond length between " << first->type->name << " Atom " << first->nr << " and " << second->type->name << " Atom " << second->nr << ": " << minBond << " a.u." << endl;
    690690        cout << Verbose(0) << "Enter new bond length [a.u.]: ";
    691691        cin >> bond;
    692692        for (int i=NDIM;i--;) {
    693           second->x.x[i] -= (second->x.x[i]-first->x.x[i])/min_bond*(min_bond-bond);
     693          second->x.x[i] -= (second->x.x[i]-first->x.x[i])/minBond*(minBond-bond);
    694694        }
    695695        //cout << Verbose(0) << "New coordinates of Atom " << second->nr << " are: ";
     
    13251325  int j;
    13261326  double volume = 0.;
    1327   enum ConfigStatus config_present = absent;
     1327  enum ConfigStatus configPresent = absent;
    13281328  clock_t start,end;
    13291329  int argptr;
     
    14251425        if (output == NULL) {
    14261426          cout << Verbose(1) << "Specified config file " << argv[1] << " not found." << endl;
    1427           config_present = absent;
     1427          configPresent = absent;
    14281428        } else {
    14291429          cout << "Empty configuration file." << endl;
    14301430          ConfigFileName = argv[1];
    1431           config_present = empty;
     1431          configPresent = empty;
    14321432          output.close();
    14331433        }
     
    14401440            cout << "new syntax." << endl;
    14411441            configuration.Load(ConfigFileName, periode, mol);
    1442             config_present = present;
     1442            configPresent = present;
    14431443            break;
    14441444          case 0:
    14451445            cout << "old syntax." << endl;
    14461446            configuration.LoadOld(ConfigFileName, periode, mol);
    1447             config_present = present;
     1447            configPresent = present;
    14481448            break;
    14491449          default:
    14501450            cout << "Unknown syntax or empty, yet present file." << endl;
    1451             config_present = empty;
     1451            configPresent = empty;
    14521452       }
    14531453      }
    14541454    } else
    1455       config_present = absent;
     1455      configPresent = absent;
    14561456    // 4. parse again through options, now for those depending on elements db and config presence
    14571457    argptr = 1;
     
    14601460      if (argv[argptr][0] == '-') {
    14611461        argptr++;
    1462         if ((config_present == present) || (config_present == empty)) {
     1462        if ((configPresent == present) || (configPresent == empty)) {
    14631463          switch(argv[argptr-1][1]) {
    14641464            case 'p':
     
    14741474                else {
    14751475                  cout << Verbose(2) << "File found and parsed." << endl;
    1476                   config_present = present;
     1476                  configPresent = present;
    14771477                }
    14781478              }
     
    14941494                if (first->type != NULL) {
    14951495                  mol->AddAtom(first);  // add to molecule
    1496                   if ((config_present == empty) && (mol->AtomCount != 0))
    1497                     config_present = present;
     1496                  if ((configPresent == empty) && (mol->AtomCount != 0))
     1497                    configPresent = present;
    14981498                } else
    14991499                  cerr << Verbose(1) << "Could not find the specified element." << endl;
     
    15051505          }
    15061506        }
    1507         if (config_present == present) {
     1507        if (configPresent == present) {
    15081508          switch(argv[argptr-1][1]) {
    15091509            case 'M':
     
    16271627                start = clock();
    16281628                LinkedCell LCList(mol, atof(argv[argptr])*2.);
    1629                 Find_non_convex_border((ofstream *)&cout, mol, &LCList, argv[argptr+1], atof(argv[argptr]));
     1629                FindNonConvexBorder((ofstream *)&cout, mol, &LCList, argv[argptr+1], atof(argv[argptr]));
    16301630                //FindDistributionOfEllipsoids((ofstream *)&cout, &T, &LCList, N, number, filename.c_str());
    16311631                end = clock();
     
    18711871                cout << Verbose(1) << "Storing tecplot data in " << argv[argptr] << "." << endl;
    18721872                LinkedCell LCList(mol, 10.);
    1873                 //Find_convex_border((ofstream *)&cout, mol, &LCList, argv[argptr]);
    1874                 Find_non_convex_border((ofstream *)&cout, mol, &LCList, argv[argptr], 10.);
     1873                //FindConvexBorder((ofstream *)&cout, mol, &LCList, argv[argptr]);
     1874                FindNonConvexBorder((ofstream *)&cout, mol, &LCList, argv[argptr], 10.);
    18751875
    18761876                double volumedifference = ConvexizeNonconvexEnvelope((ofstream *)&cout, mol->TesselStruct, mol, argv[argptr]);
  • src/tesselation.cpp

    r093645 rf1cccd  
    218218    return true;
    219219  }
    220   double angle = getAngle(helper[0], helper[1], BaseLineNormal);
     220  double angle = GetAngle(helper[0], helper[1], BaseLineNormal);
    221221  if ((angle - M_PI) > -MYEPSILON)
    222222    return true;
     
    13981398
    13991399
    1400 /** Finds the starting triangle for find_non_convex_border().
    1401  * Looks at the outermost point per axis, then Find_second_point_for_Tesselation()
    1402  * for the second and Find_next_suitable_point_via_Angle_of_Sphere() for the third
     1400/** Finds the starting triangle for FindNonConvexBorder().
     1401 * Looks at the outermost point per axis, then FindSecondPointForTesselation()
     1402 * for the second and FindNextSuitablePointViaAngleOfSphere() for the third
    14031403 * point are called.
    14041404 * \param *out output stream for debugging
     
    14061406 * \param *LC LinkedCell structure with neighbouring TesselPoint's
    14071407 */
    1408 void Tesselation::Find_starting_triangle(ofstream *out, const double RADIUS, LinkedCell *LC)
    1409 {
    1410   cout << Verbose(1) << "Begin of Find_starting_triangle\n";
     1408void Tesselation::FindStartingTriangle(ofstream *out, const double RADIUS, LinkedCell *LC)
     1409{
     1410  cout << Verbose(1) << "Begin of FindStartingTriangle\n";
    14111411  int i = 0;
    14121412  LinkedNodes *List = NULL;
     
    14141414  TesselPoint* SecondPoint = NULL;
    14151415  TesselPoint* MaxPoint[NDIM];
    1416   double max_coordinate[NDIM];
     1416  double maxCoordinate[NDIM];
    14171417  Vector Oben;
    14181418  Vector helper;
     
    14241424  for (i = 0; i < 3; i++) {
    14251425    MaxPoint[i] = NULL;
    1426     max_coordinate[i] = -1;
     1426    maxCoordinate[i] = -1;
    14271427  }
    14281428
     
    14361436        if (List != NULL) {
    14371437          for (LinkedNodes::iterator Runner = List->begin();Runner != List->end();Runner++) {
    1438             if ((*Runner)->node->x[i] > max_coordinate[i]) {
     1438            if ((*Runner)->node->x[i] > maxCoordinate[i]) {
    14391439              cout << Verbose(2) << "New maximal for axis " << i << " node is " << *(*Runner) << " at " << *(*Runner)->node << "." << endl;
    1440               max_coordinate[i] = (*Runner)->node->x[i];
     1440              maxCoordinate[i] = (*Runner)->node->x[i];
    14411441              MaxPoint[i] = (*Runner);
    14421442            }
     
    14541454
    14551455  BTS = NULL;
    1456   CandidateList *Opt_Candidates = new CandidateList();
     1456  CandidateList *OptCandidates = new CandidateList();
    14571457  for (int k=0;k<NDIM;k++) {
    14581458    Oben.x[k] = 1.;
     
    14611461
    14621462    double ShortestAngle;
    1463     TesselPoint* Opt_Candidate = NULL;
     1463    TesselPoint* OptCandidate = NULL;
    14641464    ShortestAngle = 999999.; // This will contain the angle, which will be always positive (when looking for second point), when looking for third point this will be the quadrant.
    14651465
    1466     Find_second_point_for_Tesselation(FirstPoint, NULL, Oben, Opt_Candidate, &ShortestAngle, RADIUS, LC); // we give same point as next candidate as its bonds are looked into in find_second_...
    1467     SecondPoint = Opt_Candidate;
     1466    FindSecondPointForTesselation(FirstPoint, NULL, Oben, OptCandidate, &ShortestAngle, RADIUS, LC); // we give same point as next candidate as its bonds are looked into in find_second_...
     1467    SecondPoint = OptCandidate;
    14681468    if (SecondPoint == NULL)  // have we found a second point?
    14691469      continue;
     
    14961496
    14971497    //cout << Verbose(2) << "INFO: OldSphereCenter is at " << helper << ".\n";
    1498     Find_third_point_for_Tesselation(
    1499       Oben, SearchDirection, helper, BLS[0], NULL, *&Opt_Candidates, &ShortestAngle, RADIUS, LC
     1498    FindThirdPointForTesselation(
     1499      Oben, SearchDirection, helper, BLS[0], NULL, *&OptCandidates, &ShortestAngle, RADIUS, LC
    15001500    );
    15011501    cout << Verbose(1) << "List of third Points is ";
    1502     for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) {
     1502    for (CandidateList::iterator it = OptCandidates->begin(); it != OptCandidates->end(); ++it) {
    15031503        cout << " " << *(*it)->point;
    15041504    }
    15051505    cout << endl;
    15061506
    1507     for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) {
     1507    for (CandidateList::iterator it = OptCandidates->begin(); it != OptCandidates->end(); ++it) {
    15081508      // add third triangle point
    15091509      AddTesselationPoint((*it)->point, 2);
     
    15221522
    15231523      // if we do not reach the end with the next step of iteration, we need to setup a new first line
    1524       if (it != Opt_Candidates->end()--) {
     1524      if (it != OptCandidates->end()--) {
    15251525        FirstPoint = (*it)->BaseLine->endpoints[0]->node;
    15261526        SecondPoint = (*it)->point;
     
    15371537      // remove all candidates from the list and then the list itself
    15381538      class CandidateForTesselation *remover = NULL;
    1539       for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) {
     1539      for (CandidateList::iterator it = OptCandidates->begin(); it != OptCandidates->end(); ++it) {
    15401540        remover = *it;
    15411541        delete(remover);
    15421542      }
    1543       Opt_Candidates->clear();
     1543      OptCandidates->clear();
    15441544    }
    15451545  }
     
    15471547  // remove all candidates from the list and then the list itself
    15481548  class CandidateForTesselation *remover = NULL;
    1549   for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) {
     1549  for (CandidateList::iterator it = OptCandidates->begin(); it != OptCandidates->end(); ++it) {
    15501550    remover = *it;
    15511551    delete(remover);
    15521552  }
    1553   delete(Opt_Candidates);
    1554   cout << Verbose(1) << "End of Find_starting_triangle\n";
     1553  delete(OptCandidates);
     1554  cout << Verbose(1) << "End of FindStartingTriangle\n";
    15551555};
    15561556
     
    15641564 * @param *LC LinkedCell structure with neighbouring points
    15651565 */
    1566 bool Tesselation::Find_next_suitable_triangle(ofstream *out, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, int N, LinkedCell *LC)
    1567 {
    1568   cout << Verbose(0) << "Begin of Find_next_suitable_triangle\n";
     1566bool Tesselation::FindNextSuitableTriangle(ofstream *out, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, int N, LinkedCell *LC)
     1567{
     1568  cout << Verbose(0) << "Begin of FindNextSuitableTriangle\n";
    15691569  bool result = true;
    1570   CandidateList *Opt_Candidates = new CandidateList();
     1570  CandidateList *OptCandidates = new CandidateList();
    15711571
    15721572  Vector CircleCenter;
     
    16251625
    16261626    // add third point
    1627     Find_third_point_for_Tesselation(
    1628       T.NormalVector, SearchDirection, OldSphereCenter, &Line, ThirdNode, Opt_Candidates,
     1627    FindThirdPointForTesselation(
     1628      T.NormalVector, SearchDirection, OldSphereCenter, &Line, ThirdNode, OptCandidates,
    16291629      &ShortestAngle, RADIUS, LC
    16301630    );
     
    16341634  }
    16351635
    1636   if (Opt_Candidates->begin() == Opt_Candidates->end()) {
     1636  if (OptCandidates->begin() == OptCandidates->end()) {
    16371637    cerr << "WARNING: Could not find a suitable candidate." << endl;
    16381638    return false;
    16391639  }
    16401640  cout << Verbose(1) << "Third Points are ";
    1641   for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) {
     1641  for (CandidateList::iterator it = OptCandidates->begin(); it != OptCandidates->end(); ++it) {
    16421642    cout << " " << *(*it)->point;
    16431643  }
     
    16451645
    16461646  BoundaryLineSet *BaseRay = &Line;
    1647   for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) {
     1647  for (CandidateList::iterator it = OptCandidates->begin(); it != OptCandidates->end(); ++it) {
    16481648    cout << Verbose(1) << " Third point candidate is " << *(*it)->point
    16491649    << " with circumsphere's center at " << (*it)->OptCenter << "." << endl;
     
    16641664      AddTesselationPoint(BaseRay->endpoints[1]->node, 2);
    16651665
    1666       if (CheckLineCriteriaforDegeneratedTriangle(TPS)) {
     1666      if (CheckLineCriteriaForDegeneratedTriangle(TPS)) {
    16671667        AddTesselationLine(TPS[0], TPS[1], 0);
    16681668        AddTesselationLine(TPS[0], TPS[2], 1);
     
    16931693        // We demand that at most one new degenerate line is created and that this line also already exists (which has to be the case due to existentTrianglesCount == 1)
    16941694        // i.e. at least one of the three lines must be present with TriangleCount <= 1
    1695         if (CheckLineCriteriaforDegeneratedTriangle(TPS)) {
     1695        if (CheckLineCriteriaForDegeneratedTriangle(TPS)) {
    16961696          AddTesselationLine(TPS[0], TPS[1], 0);
    16971697          AddTesselationLine(TPS[0], TPS[2], 1);
     
    17311731  // remove all candidates from the list and then the list itself
    17321732  class CandidateForTesselation *remover = NULL;
    1733   for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) {
     1733  for (CandidateList::iterator it = OptCandidates->begin(); it != OptCandidates->end(); ++it) {
    17341734    remover = *it;
    17351735    delete(remover);
    17361736  }
    1737   delete(Opt_Candidates);
    1738   cout << Verbose(0) << "End of Find_next_suitable_triangle\n";
     1737  delete(OptCandidates);
     1738  cout << Verbose(0) << "End of FindNextSuitableTriangle\n";
    17391739  return result;
    17401740};
     
    20122012 * \param *Candidate pointer to candidate node on return
    20132013 * \param Oben vector indicating the outside
    2014  * \param Opt_Candidate reference to recommended candidate on return
     2014 * \param OptCandidate reference to recommended candidate on return
    20152015 * \param Storage[3] array storing angles and other candidate information
    20162016 * \param RADIUS radius of virtual sphere
    20172017 * \param *LC LinkedCell structure with neighbouring points
    20182018 */
    2019 void Tesselation::Find_second_point_for_Tesselation(TesselPoint* a, TesselPoint* Candidate, Vector Oben, TesselPoint*& Opt_Candidate, double Storage[3], double RADIUS, LinkedCell *LC)
    2020 {
    2021   cout << Verbose(2) << "Begin of Find_second_point_for_Tesselation" << endl;
     2019void Tesselation::FindSecondPointForTesselation(TesselPoint* a, TesselPoint* Candidate, Vector Oben, TesselPoint*& OptCandidate, double Storage[3], double RADIUS, LinkedCell *LC)
     2020{
     2021  cout << Verbose(2) << "Begin of FindSecondPointForTesselation" << endl;
    20222022  Vector AngleCheck;
    20232023  double norm = -1., angle;
     
    20572057            if (a != Candidate) {
    20582058              // Calculate center of the circle with radius RADIUS through points a and Candidate
    2059               Vector OrthogonalizedOben, a_Candidate, Center;
     2059              Vector OrthogonalizedOben, aCandidate, Center;
    20602060              double distance, scaleFactor;
    20612061
    20622062              OrthogonalizedOben.CopyVector(&Oben);
    2063               a_Candidate.CopyVector(a->node);
    2064               a_Candidate.SubtractVector(Candidate->node);
    2065               OrthogonalizedOben.ProjectOntoPlane(&a_Candidate);
     2063              aCandidate.CopyVector(a->node);
     2064              aCandidate.SubtractVector(Candidate->node);
     2065              OrthogonalizedOben.ProjectOntoPlane(&aCandidate);
    20662066              OrthogonalizedOben.Normalize();
    2067               distance = 0.5 * a_Candidate.Norm();
     2067              distance = 0.5 * aCandidate.Norm();
    20682068              scaleFactor = sqrt(((RADIUS * RADIUS) - (distance * distance)));
    20692069              OrthogonalizedOben.Scale(scaleFactor);
     
    20762076              AngleCheck.CopyVector(&Center);
    20772077              AngleCheck.SubtractVector(a->node);
    2078               norm = a_Candidate.Norm();
     2078              norm = aCandidate.Norm();
    20792079              // second point shall have smallest angle with respect to Oben vector
    20802080              if (norm < RADIUS*2.) {
     
    20832083                  //cout << Verbose(3) << "Old values of Storage: %lf %lf \n", Storage[0], Storage[1]);
    20842084                  cout << Verbose(3) << "Current candidate is " << *Candidate << ": Is a better candidate with distance " << norm << " and angle " << angle << " to oben " << Oben << ".\n";
    2085                   Opt_Candidate = Candidate;
     2085                  OptCandidate = Candidate;
    20862086                  Storage[0] = angle;
    20872087                  //cout << Verbose(3) << "Changing something in Storage: %lf %lf. \n", Storage[0], Storage[2]);
    20882088                } else {
    2089                   //cout << Verbose(3) << "Current candidate is " << *Candidate << ": Looses with angle " << angle << " to a better candidate " << *Opt_Candidate << endl;
     2089                  //cout << Verbose(3) << "Current candidate is " << *Candidate << ": Looses with angle " << angle << " to a better candidate " << *OptCandidate << endl;
    20902090                }
    20912091              } else {
     
    21002100        }
    21012101      }
    2102   cout << Verbose(2) << "End of Find_second_point_for_Tesselation" << endl;
     2102  cout << Verbose(2) << "End of FindSecondPointForTesselation" << endl;
    21032103};
    21042104
     
    21262126 * holds. Then, the normalized projection onto the SearchDirection is either +1 or -1 and thus states whether
    21272127 * the angle is uniquely in either (0,M_PI] or [M_PI, 2.*M_PI).
    2128  * @param NormalVector normal direction of the base triangle (here the unit axis vector, \sa Find_starting_triangle())
     2128 * @param NormalVector normal direction of the base triangle (here the unit axis vector, \sa FindStartingTriangle())
    21292129 * @param SearchDirection general direction where to search for the next point, relative to center of BaseLine
    21302130 * @param OldSphereCenter center of sphere for base triangle, relative to center of BaseLine, giving null angle for the parameter circle
     
    21322132 * @param ThirdNode third point to avoid in search
    21332133 * @param candidates list of equally good candidates to return
    2134  * @param ShortestAngle the current path length on this circle band for the current Opt_Candidate
     2134 * @param ShortestAngle the current path length on this circle band for the current OptCandidate
    21352135 * @param RADIUS radius of sphere
    21362136 * @param *LC LinkedCell structure with neighbouring points
    21372137 */
    2138 void Tesselation::Find_third_point_for_Tesselation(Vector NormalVector, Vector SearchDirection, Vector OldSphereCenter, class BoundaryLineSet *BaseLine, class TesselPoint  *ThirdNode, CandidateList* &candidates, double *ShortestAngle, const double RADIUS, LinkedCell *LC)
     2138void Tesselation::FindThirdPointForTesselation(Vector NormalVector, Vector SearchDirection, Vector OldSphereCenter, class BoundaryLineSet *BaseLine, class TesselPoint  *ThirdNode, CandidateList* &candidates, double *ShortestAngle, const double RADIUS, LinkedCell *LC)
    21392139{
    21402140  Vector CircleCenter;  // center of the circle, i.e. of the band of sphere's centers
     
    21532153  CandidateForTesselation *optCandidate = NULL;
    21542154
    2155   cout << Verbose(1) << "Begin of Find_third_point_for_Tesselation" << endl;
     2155  cout << Verbose(1) << "Begin of FindThirdPointForTesselation" << endl;
    21562156
    21572157  //cout << Verbose(2) << "INFO: NormalVector of BaseTriangle is " << NormalVector << "." << endl;
     
    23102310  if (candidates->size() > 1) {
    23112311    candidates->unique();
    2312     candidates->sort(sortCandidates);
    2313   }
    2314 
    2315   cout << Verbose(1) << "End of Find_third_point_for_Tesselation" << endl;
     2312    candidates->sort(SortCandidates);
     2313  }
     2314
     2315  cout << Verbose(1) << "End of FindThirdPointForTesselation" << endl;
    23162316};
    23172317
     
    23622362  }
    23632363
    2364   trianglePoints[0] = findClosestPoint(x, SecondPoint, LC);
     2364  trianglePoints[0] = FindClosestPoint(x, SecondPoint, LC);
    23652365 
    23662366  // check whether closest point is "too close" :), then it's inside
     
    23732373    return NULL;
    23742374  }
    2375   list<TesselPoint*> *connectedPoints = getCircleOfConnectedPoints(out, trianglePoints[0]);
    2376   list<TesselPoint*> *connectedClosestPoints = getNeighboursonCircleofConnectedPoints(out, connectedPoints, trianglePoints[0], x);
     2375  list<TesselPoint*> *connectedPoints = GetCircleOfConnectedPoints(out, trianglePoints[0]);
     2376  list<TesselPoint*> *connectedClosestPoints = GetNeighboursOnCircleOfConnectedPoints(out, connectedPoints, trianglePoints[0], x);
    23772377  delete(connectedPoints);
    23782378  trianglePoints[1] = connectedClosestPoints->front();
     
    24622462 * @return list of the all points linked to the provided one
    24632463 */
    2464 list<TesselPoint*> * Tesselation::getCircleOfConnectedPoints(ofstream *out, TesselPoint* Point)
     2464list<TesselPoint*> * Tesselation::GetCircleOfConnectedPoints(ofstream *out, TesselPoint* Point)
    24652465{
    24662466  list<TesselPoint*> *connectedPoints = new list<TesselPoint*>;
     
    25232523 * @return list of the two points linked to the provided one and closest to the point to be checked,
    25242524 */
    2525 list<TesselPoint*> * Tesselation::getNeighboursonCircleofConnectedPoints(ofstream *out, list<TesselPoint*> *connectedPoints, TesselPoint* Point, Vector* Reference)
     2525list<TesselPoint*> * Tesselation::GetNeighboursOnCircleOfConnectedPoints(ofstream *out, list<TesselPoint*> *connectedPoints, TesselPoint* Point, Vector* Reference)
    25262526{
    25272527  map<double, TesselPoint*> anglesOfPoints;
     
    25622562    helper.SubtractVector(Point->node);
    25632563    helper.ProjectOntoPlane(&PlaneNormal);
    2564     double angle = getAngle(helper, AngleZero, OrthogonalVector);
     2564    double angle = GetAngle(helper, AngleZero, OrthogonalVector);
    25652565    *out << Verbose(2) << "INFO: Calculated angle is " << angle << " for point " << **listRunner << "." << endl;
    25662566    anglesOfPoints.insert(pair<double, TesselPoint*>(angle, (*listRunner)));
     
    26032603    return 0.;
    26042604  }
    2605   list<TesselPoint*> *CircleofPoints = getCircleOfConnectedPoints(out, point->node);
     2605  list<TesselPoint*> *CircleofPoints = GetCircleOfConnectedPoints(out, point->node);
    26062606
    26072607  // remove all triangles
     
    26722672 * \return true - there is such a line (i.e. creation of degenerated triangle is valid), false - no such line (don't create)
    26732673 */
    2674 bool CheckLineCriteriaforDegeneratedTriangle(class BoundaryPointSet *nodes[3])
     2674bool CheckLineCriteriaForDegeneratedTriangle(class BoundaryPointSet *nodes[3])
    26752675{
    26762676  bool result = false;
     
    27062706/** Sort function for the candidate list.
    27072707 */
    2708 bool sortCandidates(CandidateForTesselation* candidate1, CandidateForTesselation* candidate2)
     2708bool SortCandidates(CandidateForTesselation* candidate1, CandidateForTesselation* candidate2)
    27092709{
    27102710  Vector BaseLineVector, OrthogonalVector, helper;
     
    27562756 * @return point which is second closest to the provided one
    27572757 */
    2758 TesselPoint* findSecondClosestPoint(const Vector* Point, LinkedCell* LC)
     2758TesselPoint* FindSecondClosestPoint(const Vector* Point, LinkedCell* LC)
    27592759{
    27602760  LinkedNodes *List = NULL;
     
    28132813 * @return point which is closest to the provided one, NULL if none found
    28142814 */
    2815 TesselPoint* findClosestPoint(const Vector* Point, TesselPoint *&SecondPoint, LinkedCell* LC)
     2815TesselPoint* FindClosestPoint(const Vector* Point, TesselPoint *&SecondPoint, LinkedCell* LC)
    28162816{
    28172817  LinkedNodes *List = NULL;
     
    29362936 * @return angle between point and reference
    29372937 */
    2938 double getAngle(const Vector &point, const Vector &reference, const Vector OrthogonalVector)
     2938double GetAngle(const Vector &point, const Vector &reference, const Vector OrthogonalVector)
    29392939{
    29402940  if (reference.IsNull())
  • src/tesselation.hpp

    r093645 rf1cccd  
    203203
    204204    // concave envelope
    205     void Find_starting_triangle(ofstream *out, const double RADIUS, class LinkedCell *LC);
    206     void Find_second_point_for_Tesselation(class TesselPoint* a, class TesselPoint* Candidate, Vector Oben, class TesselPoint*& Opt_Candidate, double Storage[3], double RADIUS, class LinkedCell *LC);
    207     void Find_third_point_for_Tesselation(Vector NormalVector, Vector SearchDirection, Vector OldSphereCenter, class BoundaryLineSet *BaseLine, class TesselPoint *ThirdNode, CandidateList* &candidates, double *ShortestAngle, const double RADIUS, class LinkedCell *LC);
    208     bool Find_next_suitable_triangle(ofstream *out, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, int N, LinkedCell *LC);
     205    void FindStartingTriangle(ofstream *out, const double RADIUS, class LinkedCell *LC);
     206    void FindSecondPointForTesselation(class TesselPoint* a, class TesselPoint* Candidate, Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, class LinkedCell *LC);
     207    void FindThirdPointForTesselation(Vector NormalVector, Vector SearchDirection, Vector OldSphereCenter, class BoundaryLineSet *BaseLine, class TesselPoint *ThirdNode, CandidateList* &candidates, double *ShortestAngle, const double RADIUS, class LinkedCell *LC);
     208    bool FindNextSuitableTriangle(ofstream *out, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, int N, LinkedCell *LC);
    209209    int CheckPresenceOfTriangle(ofstream *out, class TesselPoint *Candidates[3]);
    210210
     
    219219
    220220
    221     list<TesselPoint*> * getCircleOfConnectedPoints(ofstream *out, TesselPoint* Point);
    222     list<TesselPoint*> * getNeighboursonCircleofConnectedPoints(ofstream *out, list<TesselPoint*> *connectedPoints, TesselPoint* Point, Vector* Reference);
     221    list<TesselPoint*> * GetCircleOfConnectedPoints(ofstream *out, TesselPoint* Point);
     222    list<TesselPoint*> * GetNeighboursOnCircleOfConnectedPoints(ofstream *out, list<TesselPoint*> *connectedPoints, TesselPoint* Point, Vector* Reference);
    223223    list<BoundaryTriangleSet*> *FindTriangles(TesselPoint* Points[3]);
    224224    list<BoundaryTriangleSet*> * FindClosestTrianglesToPoint(ofstream *out, Vector *x, LinkedCell* LC);
     
    256256};
    257257
    258 bool CheckLineCriteriaforDegeneratedTriangle(class BoundaryPointSet *nodes[3]);
    259 bool sortCandidates(class CandidateForTesselation* candidate1, class CandidateForTesselation* candidate2);
    260 TesselPoint* findClosestPoint(const Vector* Point, TesselPoint *&SecondPoint, LinkedCell* LC);
    261 TesselPoint* findSecondClosestPoint(const Vector*, LinkedCell*);
    262 double getAngle(const Vector &point, const Vector &reference, const Vector OrthogonalVector);
     258bool CheckLineCriteriaForDegeneratedTriangle(class BoundaryPointSet *nodes[3]);
     259bool SortCandidates(class CandidateForTesselation* candidate1, class CandidateForTesselation* candidate2);
     260TesselPoint* FindClosestPoint(const Vector* Point, TesselPoint *&SecondPoint, LinkedCell* LC);
     261TesselPoint* FindSecondClosestPoint(const Vector*, LinkedCell*);
     262double GetAngle(const Vector &point, const Vector &reference, const Vector OrthogonalVector);
    263263Vector * GetClosestPointBetweenLine(ofstream *out, class BoundaryLineSet *Base, class BoundaryLineSet *OtherBase);
    264264
  • src/tesselationhelpers.cpp

    r093645 rf1cccd  
    88#include "tesselationhelpers.hpp"
    99
    10 double det_get(gsl_matrix *A, int inPlace) {
     10double DetGet(gsl_matrix *A, int inPlace) {
    1111  /*
    1212  inPlace = 1 => A is replaced with the LU decomposed copy.
     
    3636};
    3737
    38 void get_sphere(Vector *center, Vector &a, Vector &b, Vector &c, double RADIUS)
     38void GetSphere(Vector *center, Vector &a, Vector &b, Vector &c, double RADIUS)
    3939{
    4040  gsl_matrix *A = gsl_matrix_calloc(3,3);
     
    4646    gsl_matrix_set(A, i, 2, c.x[i]);
    4747  }
    48   m11 = det_get(A, 1);
     48  m11 = DetGet(A, 1);
    4949
    5050  for(int i=0;i<3;i++) {
     
    5353    gsl_matrix_set(A, i, 2, c.x[i]);
    5454  }
    55   m12 = det_get(A, 1);
     55  m12 = DetGet(A, 1);
    5656
    5757  for(int i=0;i<3;i++) {
     
    6060    gsl_matrix_set(A, i, 2, c.x[i]);
    6161  }
    62   m13 = det_get(A, 1);
     62  m13 = DetGet(A, 1);
    6363
    6464  for(int i=0;i<3;i++) {
     
    6767    gsl_matrix_set(A, i, 2, b.x[i]);
    6868  }
    69   m14 = det_get(A, 1);
     69  m14 = DetGet(A, 1);
    7070
    7171  if (fabs(m11) < MYEPSILON)
     
    101101 * @param Umkreisradius double radius of circumscribing circle
    102102 */
    103 void Get_center_of_sphere(Vector* Center, Vector a, Vector b, Vector c, Vector *NewUmkreismittelpunkt, Vector* Direction, Vector* AlternativeDirection,
     103void GetCenterOfSphere(Vector* Center, Vector a, Vector b, Vector c, Vector *NewUmkreismittelpunkt, Vector* Direction, Vector* AlternativeDirection,
    104104    double HalfplaneIndicator, double AlternativeIndicator, double alpha, double beta, double gamma, double RADIUS, double Umkreisradius)
    105105{
     
    107107  double Restradius;
    108108  Vector OtherCenter;
    109   cout << Verbose(3) << "Begin of Get_center_of_sphere.\n";
     109  cout << Verbose(3) << "Begin of GetCenterOfSphere.\n";
    110110  Center->Zero();
    111111  helper.CopyVector(&a);
     
    153153  Center->AddVector(&TempNormal);
    154154  cout << Verbose(0) << "Center of sphere of circumference is " << *Center << ".\n";
    155   get_sphere(&OtherCenter, a, b, c, RADIUS);
     155  GetSphere(&OtherCenter, a, b, c, RADIUS);
    156156  cout << Verbose(0) << "OtherCenter of sphere of circumference is " << OtherCenter << ".\n";
    157   cout << Verbose(3) << "End of Get_center_of_sphere.\n";
     157  cout << Verbose(3) << "End of GetCenterOfSphere.\n";
    158158};
    159159
     
    307307    gsl_multimin_fminimizer *s = NULL;
    308308    gsl_vector *ss, *x;
    309     gsl_multimin_function minex_func;
     309    gsl_multimin_function minexFunction;
    310310
    311311    size_t iter = 0;
     
    324324
    325325    /* Initialize method and iterate */
    326     minex_func.n = NDIM;
    327     minex_func.f = &MinIntersectDistance;
    328     minex_func.params = (void *)&par;
     326    minexFunction.n = NDIM;
     327    minexFunction.f = &MinIntersectDistance;
     328    minexFunction.params = (void *)&par;
    329329
    330330    s = gsl_multimin_fminimizer_alloc(T, NDIM);
    331     gsl_multimin_fminimizer_set(s, &minex_func, x, ss);
     331    gsl_multimin_fminimizer_set(s, &minexFunction, x, ss);
    332332
    333333    do {
  • src/tesselationhelpers.hpp

    r093645 rf1cccd  
    2828#include "vector.hpp"
    2929
    30 double det_get(gsl_matrix *A, int inPlace);
    31 void get_sphere(Vector *center, Vector &a, Vector &b, Vector &c, double RADIUS);
    32 void Get_center_of_sphere(Vector* Center, Vector a, Vector b, Vector c, Vector *NewUmkreismittelpunkt, Vector* Direction, Vector* AlternativeDirection, double HalfplaneIndicator, double AlternativeIndicator, double alpha, double beta, double gamma, double RADIUS, double Umkreisradius);
     30double DetGet(gsl_matrix *A, int inPlace);
     31void GetSphere(Vector *center, Vector &a, Vector &b, Vector &c, double RADIUS);
     32void GetCenterOfSphere(Vector* Center, Vector a, Vector b, Vector c, Vector *NewUmkreismittelpunkt, Vector* Direction, Vector* AlternativeDirection, double HalfplaneIndicator, double AlternativeIndicator, double alpha, double beta, double gamma, double RADIUS, double Umkreisradius);
    3333void GetCenterofCircumcircle(Vector *Center, Vector *a, Vector *b, Vector *c);
    3434double GetPathLengthonCircumCircle(Vector &CircleCenter, Vector &CirclePlaneNormal, double CircleRadius, Vector &NewSphereCenter, Vector &OldSphereCenter, Vector &NormalVector, Vector &SearchDirection);
     
    3636bool existsIntersection(Vector point1, Vector point2, Vector point3, Vector point4);
    3737
    38 //bool Choose_preferable_third_point(atom *Candidate, atom *OptCandidate, class BoundaryLineSet *BaseLine, atom *ThirdNode, Tesselation *Tess);
    39 
    40 
    4138#endif /* TESSELATIONHELPERS_HPP_ */
Note: See TracChangeset for help on using the changeset viewer.