Changeset 34e0592 for src/boundary.cpp
- Timestamp:
- Aug 20, 2009, 7:48:07 AM (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, Candidate_v1.7.0, 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:
- 78b73c, 9ba9ee
- Parents:
- 1d9b7aa (diff), 7c14ec (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - git-author:
- Frederik Heber <heber@…> (08/19/09 14:40:33)
- git-committer:
- Frederik Heber <heber@…> (08/20/09 07:48:07)
- File:
-
- 1 edited
-
src/boundary.cpp (modified) (23 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/boundary.cpp
r1d9b7aa r34e0592 118 118 * \param *mol molecule structure with atom positions 119 119 */ 120 void write_vrml_file(ofstream *out, ofstream *vrmlfile, class Tesselation *Tess, class molecule *mol)120 void WriteVrmlFile(ofstream *out, ofstream *vrmlfile, class Tesselation *Tess, class molecule *mol) 121 121 { 122 122 atom *Walker = mol->start; … … 172 172 * \param *mol molecule structure with atom positions 173 173 */ 174 void write_raster3d_file(ofstream *out, ofstream *rasterfile, class Tesselation *Tess, class molecule *mol)174 void WriteRaster3dFile(ofstream *out, ofstream *rasterfile, class Tesselation *Tess, class molecule *mol) 175 175 { 176 176 atom *Walker = mol->start; … … 227 227 * \param N arbitrary number to differentiate various zones in the tecplot format 228 228 */ 229 void write_tecplot_file(ofstream *out, ofstream *tecplot, class Tesselation *TesselStruct, class molecule *mol, int N)229 void WriteTecplotFile(ofstream *out, ofstream *tecplot, class Tesselation *TesselStruct, class molecule *mol, int N) 230 230 { 231 231 if ((tecplot != NULL) && (TesselStruct != NULL)) { … … 440 440 * \return *TesselStruct is filled with convex boundary and tesselation is stored under \a *filename. 441 441 */ 442 void Find _convex_border(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename)442 void FindConvexBorder(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename) 443 443 { 444 444 bool BoundaryFreeFlag = false; 445 445 Boundaries *BoundaryPoints = NULL; 446 446 447 cout << Verbose(1) << "Begin of find_convex_border" << endl;447 cout << Verbose(1) << "Begin of FindConvexBorder" << endl; 448 448 449 449 if (mol->TesselStruct != NULL) // free if allocated … … 509 509 OutputName.append(TecplotSuffix); 510 510 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); 512 512 tecplot->close(); 513 513 delete(tecplot); … … 518 518 OutputName.append(Raster3DSuffix); 519 519 ofstream *rasterplot = new ofstream(OutputName.c_str()); 520 write_raster3d_file(out, rasterplot, mol->TesselStruct, mol);520 WriteRaster3dFile(out, rasterplot, mol->TesselStruct, mol); 521 521 rasterplot->close(); 522 522 delete(rasterplot); … … 556 556 OutputName.append(TecplotSuffix); 557 557 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); 559 559 tecplot->close(); 560 560 delete(tecplot); … … 564 564 OutputName.append(Raster3DSuffix); 565 565 ofstream *rasterplot = new ofstream(OutputName.c_str()); 566 write_raster3d_file(out, rasterplot, mol->TesselStruct, mol);566 WriteRaster3dFile(out, rasterplot, mol->TesselStruct, mol); 567 567 rasterplot->close(); 568 568 delete(rasterplot); … … 575 575 delete[] (BoundaryPoints); 576 576 577 cout << Verbose(1) << "End of find_convex_border" << endl;577 cout << Verbose(1) << "End of FindConvexBorder" << endl; 578 578 }; 579 579 … … 732 732 OutputName.append(TecplotSuffix); 733 733 ofstream *tecplot = new ofstream(OutputName.c_str()); 734 write_tecplot_file(out, tecplot, mol->TesselStruct, mol, 0);734 WriteTecplotFile(out, tecplot, mol->TesselStruct, mol, 0); 735 735 tecplot->close(); 736 736 delete(tecplot); … … 741 741 OutputName.append(Raster3DSuffix); 742 742 ofstream *rasterplot = new ofstream(OutputName.c_str()); 743 write_raster3d_file(out, rasterplot, mol->TesselStruct, mol);743 WriteRaster3dFile(out, rasterplot, mol->TesselStruct, mol); 744 744 rasterplot->close(); 745 745 delete(rasterplot); … … 816 816 class Tesselation *TesselStruct = NULL; 817 817 LinkedCell LCList(mol, 10.); 818 Find _convex_border(out, mol, &LCList, NULL);818 FindConvexBorder(out, mol, &LCList, NULL); 819 819 double clustervolume; 820 820 if (ClusterVolume == 0) … … 957 957 if ((*ListRunner)->TesselStruct == NULL) { 958 958 *out << Verbose(1) << "Pre-creating tesselation for molecule " << *ListRunner << "." << endl; 959 Find _non_convex_border((ofstream *)&cout, (*ListRunner), LCList[i], NULL, 5.);959 FindNonConvexBorder((ofstream *)&cout, (*ListRunner), LCList[i], NULL, 5.); 960 960 } 961 961 i++; … … 1082 1082 * \para RADIUS radius of the virtual sphere 1083 1083 */ 1084 void Find _non_convex_border(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename, const double RADIUS)1084 void FindNonConvexBorder(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename, const double RADIUS) 1085 1085 { 1086 1086 int N = 0; … … 1101 1101 LineMap::iterator baseline; 1102 1102 LineMap::iterator testline; 1103 *out << Verbose(0) << "Begin of Find _non_convex_border\n";1103 *out << Verbose(0) << "Begin of FindNonConvexBorder\n"; 1104 1104 bool flag = false; // marks whether we went once through all baselines without finding any without two triangles 1105 1105 bool failflag = false; … … 1110 1110 } 1111 1111 1112 mol->TesselStruct->Find _starting_triangle(out, RADIUS, LCList);1112 mol->TesselStruct->FindStartingTriangle(out, RADIUS, LCList); 1113 1113 1114 1114 baseline = mol->TesselStruct->LinesOnBoundary.begin(); … … 1119 1119 while ((baseline != mol->TesselStruct->LinesOnBoundary.end()) || (flag)) { 1120 1120 if (baseline->second->triangles.size() == 1) { 1121 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.1121 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. 1122 1122 flag = flag || failflag; 1123 1123 if (!failflag) 1124 cerr << "WARNING: Find _next_suitable_triangle failed." << endl;1124 cerr << "WARNING: FindNextSuitableTriangle failed." << endl; 1125 1125 // write temporary envelope 1126 1126 if ((DoSingleStepOutput && (mol->TesselStruct->TrianglesOnBoundaryCount % SingleStepWidth == 0))) { // if we have a new triangle and want to output each new triangle configuration … … 1138 1138 *out << Verbose(1) << "Writing temporary non convex hull to file " << NameofTempFile << ".\n"; 1139 1139 tempstream = new ofstream(NameofTempFile.c_str(), ios::trunc); 1140 write_tecplot_file(out, tempstream, mol->TesselStruct, mol, TriangleFilesWritten);1140 WriteTecplotFile(out, tempstream, mol->TesselStruct, mol, TriangleFilesWritten); 1141 1141 tempstream->close(); 1142 1142 tempstream->flush(); … … 1152 1152 *out << Verbose(1) << "Writing temporary non convex hull to file " << NameofTempFile << ".\n"; 1153 1153 tempstream = new ofstream(NameofTempFile.c_str(), ios::trunc); 1154 write_raster3d_file(out, tempstream, mol->TesselStruct, mol);1154 WriteRaster3dFile(out, tempstream, mol->TesselStruct, mol); 1155 1155 // // include the current position of the virtual sphere in the temporary raster3d file 1156 1156 // // make the circumsphere's center absolute again … … 1191 1191 } 1192 1192 1193 // Purges surplus triangles. 1194 mol->TesselStruct->RemoveDegeneratedTriangles(); 1195 1193 1196 // write final envelope 1194 1197 if (filename != 0) { … … 1198 1201 OutputName.append(TecplotSuffix); 1199 1202 ofstream *tecplot = new ofstream(OutputName.c_str()); 1200 write_tecplot_file(out, tecplot, mol->TesselStruct, mol, -1);1203 WriteTecplotFile(out, tecplot, mol->TesselStruct, mol, -1); 1201 1204 tecplot->close(); 1202 1205 delete(tecplot); … … 1206 1209 OutputName.append(Raster3DSuffix); 1207 1210 ofstream *raster = new ofstream(OutputName.c_str()); 1208 write_raster3d_file(out, raster, mol->TesselStruct, mol);1211 WriteRaster3dFile(out, raster, mol->TesselStruct, mol); 1209 1212 raster->close(); 1210 1213 delete(raster); … … 1257 1260 // << "for atom " << a << " (inside)." << endl; 1258 1261 1259 1260 1262 if (freeLC) 1261 1263 delete(LCList); 1262 *out << Verbose(0) << "End of Find _non_convex_border\n";1264 *out << Verbose(0) << "End of FindNonConvexBorder\n"; 1263 1265 }; 1264 1266
Note:
See TracChangeset
for help on using the changeset viewer.
