Changeset 418b5e


Ignore:
Timestamp:
Mar 27, 2012, 3:53:36 PM (13 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:
f6ad4d
Parents:
cc21cd
git-author:
Frederik Heber <heber@…> (03/14/12 16:18:30)
git-committer:
Frederik Heber <heber@…> (03/27/12 15:53:36)
Message:

Added verbosity to some tesselation functions.

Location:
src/Tesselation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Tesselation/tesselation.cpp

    rcc21cd r418b5e  
    11611161    BaseLine = new BoundaryLineSet();
    11621162    BaseLine->endpoints[0] = new BoundaryPointSet(MaxPoint[k]);
    1163     LOG(0, "Coordinates of start node at " << *BaseLine->endpoints[0]->node << ".");
     1163    LOG(0, "INFO: Coordinates of start node at " << *BaseLine->endpoints[0]->node << ".");
    11641164
    11651165    double ShortestAngle;
     
    11741174    }
    11751175    BaseLine->endpoints[1] = new BoundaryPointSet(Temporary);
     1176    LOG(1, "INFO: Second node is at " << *Temporary << ".");
    11761177
    11771178    // construct center of circle
    11781179    CircleCenter = 0.5 * ((BaseLine->endpoints[0]->node->getPosition()) + (BaseLine->endpoints[1]->node->getPosition()));
     1180    LOG(1, "INFO: CircleCenter is at " << CircleCenter << ".");
    11791181
    11801182    // construct normal vector of circle
    11811183    CirclePlaneNormal = (BaseLine->endpoints[0]->node->getPosition()) - (BaseLine->endpoints[1]->node->getPosition());
     1184    LOG(1, "INFO: CirclePlaneNormal is at " << CirclePlaneNormal << ".");
    11821185
    11831186    double radius = CirclePlaneNormal.NormSquared();
     
    11861189    NormalVector.ProjectOntoPlane(CirclePlaneNormal);
    11871190    NormalVector.Normalize();
     1191    LOG(1, "INFO: NormalVector is at " << NormalVector << ".");
    11881192    ShortestAngle = 2. * M_PI; // This will indicate the quadrant.
    11891193
     
    11921196
    11931197    // look in one direction of baseline for initial candidate
    1194     SearchDirection = Plane(CirclePlaneNormal, NormalVector,0).getNormal();  // whether we look "left" first or "right" first is not important ...
     1198    try {
     1199      SearchDirection = Plane(CirclePlaneNormal, NormalVector,0).getNormal();  // whether we look "left" first or "right" first is not important ...
     1200    } catch(LinearAlgebraException) {
     1201      ELOG(1, "Vectors are linear dependent: "
     1202          << CirclePlaneNormal << ", " << NormalVector << ".");
     1203      delete BaseLine;
     1204      continue;
     1205    }
    11951206
    11961207    // adding point 1 and point 2 and add the line between them
  • src/Tesselation/triangleintersectionlist.cpp

    rcc21cd r418b5e  
    113113{
    114114  Info FunctionInfo(__func__);
    115   TriangleVectorMap::const_iterator runner;
    116   runner = GetIteratortoSmallestDistance();
     115  TriangleVectorMap::const_iterator runner = GetIteratortoSmallestDistance();
    117116  if (runner != IntersectionList.end()) {
    118117    // if we have found one, check Scalarproduct between the vector
    119118    Vector TestVector = (Point) - (*(*runner).second);
    120     if (fabs(TestVector.NormSquared()) < MYEPSILON) //
     119    LOG(1, "INFO: Distance vector between point " << Point
     120        << " and triangle intersection at " << (*(*runner).second) << " is "
     121        << TestVector << ".");
     122    if (fabs(TestVector.NormSquared()) < MYEPSILON)  {//
     123      LOG(1, "ACCEPT: Point is on the intersected triangle.");
    121124      return true;
     125    }
    122126    const double sign = (*runner).first->NormalVector.ScalarProduct(TestVector);
     127    LOG(1, "INFO: Checking sign of SKP between Distance vector and triangle's NormalVector "
     128        << (*runner).first->NormalVector << ": " << sign << ".");
    123129    if (sign < 0) {
     130      LOG(1, "ACCEPT: Point lies on inner side of intersected triangle.");
    124131      return true;
    125132    } else {
     133      LOG(1, "REJECT: Point lies on outer side of intersected triangle.");
    126134      return false;
    127135    }
     
    186194
    187195  // do we have any intersections?
    188   TriangleVectorMap::const_iterator runner;
     196  TriangleVectorMap::const_iterator runner = IntersectionList.end();
    189197  if (!DistanceList.empty()) {
    190198    // get closest triangle(s)
Note: See TracChangeset for help on using the changeset viewer.