- Timestamp:
- Jun 1, 2010, 8:25:36 PM (15 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:
- e0aee2b
- Parents:
- 0de7e8
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/molecule_geometry.cpp
r0de7e8 r15b670 133 133 if (iter != end()) { //list not empty? 134 134 for (; iter != end(); ++iter) { // continue with second if present 135 Num += 1.;135 Num++; 136 136 (*a) += (*iter)->x; 137 137 } … … 175 175 (*a) += tmp; 176 176 } 177 a->Scale( -1./Num); // divide through total mass (and sign for direction)177 a->Scale(1./Num); // divide through total mass (and sign for direction) 178 178 } 179 179 // Log() << Verbose(1) << "Resulting center of gravity: "; -
src/tesselationhelpers.cpp
r0de7e8 r15b670 785 785 Walker = cloud->GetPoint(); 786 786 *rasterfile << "2" << endl << " "; // 2 is sphere type 787 for (i=0;i<NDIM;i++) 788 *rasterfile << Walker->node->at(i)-center->at(i) << " "; 787 for (int j=0;j<NDIM;j++) { // and for each node all NDIM coordinates 788 const double tmp = Walker->node->at(j)-center->at(j); 789 *rasterfile << ((fabs(tmp) < MYEPSILON) ? 0 : tmp) << " "; 790 } 789 791 *rasterfile << "\t0.1\t1. 1. 1." << endl; // radius 0.05 and white as colour 790 792 cloud->GoToNext(); … … 796 798 *rasterfile << "1" << endl << " "; // 1 is triangle type 797 799 for (i=0;i<3;i++) { // print each node 798 for (int j=0;j<NDIM;j++) // and for each node all NDIM coordinates 799 *rasterfile << TriangleRunner->second->endpoints[i]->node->node->at(j)-center->at(j) << " "; 800 for (int j=0;j<NDIM;j++) { // and for each node all NDIM coordinates 801 const double tmp = TriangleRunner->second->endpoints[i]->node->node->at(j)-center->at(j); 802 *rasterfile << ((fabs(tmp) < MYEPSILON) ? 0 : tmp) << " "; 803 } 800 804 *rasterfile << "\t"; 801 805 } … … 836 840 } 837 841 *tecplot << "\", N=" << TesselStruct->PointsOnBoundary.size() << ", E=" << TesselStruct->TrianglesOnBoundary.size() << ", DATAPACKING=POINT, ZONETYPE=FETRIANGLE" << endl; 838 int i=cloud->GetMaxId();839 int *LookupList = new int[ i];840 for ( cloud->GoToFirst(), i=0; !cloud->IsEnd(); cloud->GoToNext(),i++){842 const int MaxId=cloud->GetMaxId(); 843 int *LookupList = new int[MaxId]; 844 for (int i=0; i< MaxId ; i++){ 841 845 LookupList[i] = -1; 842 846 } … … 848 852 Walker = target->second->node; 849 853 LookupList[Walker->nr] = Counter++; 850 *tecplot << Walker->node->at(0) << " " << Walker->node->at(1) << " " << Walker->node->at(2) << " " << target->second->value << endl; 854 for (int i=0;i<NDIM;i++) { 855 const double tmp = Walker->node->at(i); 856 *tecplot << ((fabs(tmp) < MYEPSILON) ? 0 : tmp) << " "; 857 } 858 *tecplot << target->second->value << endl; 851 859 } 852 860 *tecplot << endl;
Note:
See TracChangeset
for help on using the changeset viewer.