Changeset f1cccd for src/tesselationhelpers.cpp
- Timestamp:
- Aug 17, 2009, 1:20:16 PM (16 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tesselationhelpers.cpp
r093645 rf1cccd 8 8 #include "tesselationhelpers.hpp" 9 9 10 double det_get(gsl_matrix *A, int inPlace) {10 double DetGet(gsl_matrix *A, int inPlace) { 11 11 /* 12 12 inPlace = 1 => A is replaced with the LU decomposed copy. … … 36 36 }; 37 37 38 void get_sphere(Vector *center, Vector &a, Vector &b, Vector &c, double RADIUS)38 void GetSphere(Vector *center, Vector &a, Vector &b, Vector &c, double RADIUS) 39 39 { 40 40 gsl_matrix *A = gsl_matrix_calloc(3,3); … … 46 46 gsl_matrix_set(A, i, 2, c.x[i]); 47 47 } 48 m11 = det_get(A, 1);48 m11 = DetGet(A, 1); 49 49 50 50 for(int i=0;i<3;i++) { … … 53 53 gsl_matrix_set(A, i, 2, c.x[i]); 54 54 } 55 m12 = det_get(A, 1);55 m12 = DetGet(A, 1); 56 56 57 57 for(int i=0;i<3;i++) { … … 60 60 gsl_matrix_set(A, i, 2, c.x[i]); 61 61 } 62 m13 = det_get(A, 1);62 m13 = DetGet(A, 1); 63 63 64 64 for(int i=0;i<3;i++) { … … 67 67 gsl_matrix_set(A, i, 2, b.x[i]); 68 68 } 69 m14 = det_get(A, 1);69 m14 = DetGet(A, 1); 70 70 71 71 if (fabs(m11) < MYEPSILON) … … 101 101 * @param Umkreisradius double radius of circumscribing circle 102 102 */ 103 void Get _center_of_sphere(Vector* Center, Vector a, Vector b, Vector c, Vector *NewUmkreismittelpunkt, Vector* Direction, Vector* AlternativeDirection,103 void GetCenterOfSphere(Vector* Center, Vector a, Vector b, Vector c, Vector *NewUmkreismittelpunkt, Vector* Direction, Vector* AlternativeDirection, 104 104 double HalfplaneIndicator, double AlternativeIndicator, double alpha, double beta, double gamma, double RADIUS, double Umkreisradius) 105 105 { … … 107 107 double Restradius; 108 108 Vector OtherCenter; 109 cout << Verbose(3) << "Begin of Get _center_of_sphere.\n";109 cout << Verbose(3) << "Begin of GetCenterOfSphere.\n"; 110 110 Center->Zero(); 111 111 helper.CopyVector(&a); … … 153 153 Center->AddVector(&TempNormal); 154 154 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); 156 156 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"; 158 158 }; 159 159 … … 307 307 gsl_multimin_fminimizer *s = NULL; 308 308 gsl_vector *ss, *x; 309 gsl_multimin_function minex _func;309 gsl_multimin_function minexFunction; 310 310 311 311 size_t iter = 0; … … 324 324 325 325 /* Initialize method and iterate */ 326 minex _func.n = NDIM;327 minex _func.f = &MinIntersectDistance;328 minex _func.params = (void *)∥326 minexFunction.n = NDIM; 327 minexFunction.f = &MinIntersectDistance; 328 minexFunction.params = (void *)∥ 329 329 330 330 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); 332 332 333 333 do {
Note:
See TracChangeset
for help on using the changeset viewer.