- Timestamp:
- Aug 4, 2009, 1:53:55 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:
- 9f97c5
- Parents:
- 62bb91
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/boundary.cpp
r62bb91 ref0e6d 439 439 * \return *TesselStruct is filled with convex boundary and tesselation is stored under \a *filename. 440 440 */ 441 void Find_convex_border(ofstream *out, molecule* mol, class Tesselation *&TesselStruct, classLinkedCell *LCList, const char *filename)441 void Find_convex_border(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename) 442 442 { 443 443 bool BoundaryFreeFlag = false; … … 446 446 cout << Verbose(1) << "Begin of find_convex_border" << endl; 447 447 448 if ( TesselStruct != NULL) // free if allocated449 delete( TesselStruct);450 TesselStruct = new class Tesselation;448 if (mol->TesselStruct != NULL) // free if allocated 449 delete(mol->TesselStruct); 450 mol->TesselStruct = new class Tesselation; 451 451 452 452 // 1. Find all points on the boundary … … 476 476 for (int axis = 0; axis < NDIM; axis++) 477 477 for (Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) 478 TesselStruct->AddPoint(runner->second.second);479 480 *out << Verbose(2) << "I found " << TesselStruct->PointsOnBoundaryCount << " points on the convex boundary." << endl;478 mol->TesselStruct->AddPoint(runner->second.second); 479 480 *out << Verbose(2) << "I found " << mol->TesselStruct->PointsOnBoundaryCount << " points on the convex boundary." << endl; 481 481 // now we have the whole set of edge points in the BoundaryList 482 482 … … 489 489 490 490 // 3a. guess starting triangle 491 TesselStruct->GuessStartingTriangle(out);491 mol->TesselStruct->GuessStartingTriangle(out); 492 492 493 493 // 3b. go through all lines, that are not yet part of two triangles (only of one so far) 494 TesselStruct->TesselateOnBoundary(out, mol);494 mol->TesselStruct->TesselateOnBoundary(out, mol); 495 495 496 496 // 3c. check whether all atoms lay inside the boundary, if not, add to boundary points, segment triangle into three with the new point 497 if (! TesselStruct->InsertStraddlingPoints(out, mol))497 if (!mol->TesselStruct->InsertStraddlingPoints(out, mol, LCList)) 498 498 *out << Verbose(1) << "Insertion of straddling points failed!" << endl; 499 499 500 *out << Verbose(2) << "I created " << mol->TesselStruct->TrianglesOnBoundary.size() << " intermediate triangles with " << mol->TesselStruct->LinesOnBoundary.size() << " lines and " << mol->TesselStruct->PointsOnBoundary.size() << " points." << endl; 501 502 // 4. Store triangles in tecplot file 503 if (filename != NULL) { 504 if (DoTecplotOutput) { 505 string OutputName(filename); 506 OutputName.append("_intermed"); 507 OutputName.append(TecplotSuffix); 508 ofstream *tecplot = new ofstream(OutputName.c_str()); 509 write_tecplot_file(out, tecplot, mol->TesselStruct, mol, 0); 510 tecplot->close(); 511 delete(tecplot); 512 } 513 if (DoRaster3DOutput) { 514 string OutputName(filename); 515 OutputName.append("_intermed"); 516 OutputName.append(Raster3DSuffix); 517 ofstream *rasterplot = new ofstream(OutputName.c_str()); 518 write_raster3d_file(out, rasterplot, mol->TesselStruct, mol); 519 rasterplot->close(); 520 delete(rasterplot); 521 } 522 } 523 500 524 // 3d. check all baselines whether the peaks of the two adjacent triangles with respect to center of baseline are convex, if not, make the baseline between the two peaks and baseline endpoints become the new peaks 501 if (! TesselStruct->CorrectConcaveBaselines(out))525 if (!mol->TesselStruct->CorrectConcaveBaselines(out)) 502 526 *out << Verbose(1) << "Correction of concave baselines failed!" << endl; 503 527 504 *out << Verbose(2) << "I created " << TesselStruct->TrianglesOnBoundary.size() << " triangles with " << TesselStruct->LinesOnBoundary.size() << " lines and " << TesselStruct->PointsOnBoundary.size() << " points." << endl; 528 // 3e. we need another correction here, for TesselPoints that are below the surface (i.e. have an odd number of concave triangles surrounding it) 529 // if (!mol->TesselStruct->CorrectConcaveTesselPoints(out)) 530 // *out << Verbose(1) << "Correction of concave tesselpoints failed!" << endl; 531 532 *out << Verbose(2) << "I created " << mol->TesselStruct->TrianglesOnBoundary.size() << " triangles with " << mol->TesselStruct->LinesOnBoundary.size() << " lines and " << mol->TesselStruct->PointsOnBoundary.size() << " points." << endl; 505 533 506 534 // 4. Store triangles in tecplot file … … 510 538 OutputName.append(TecplotSuffix); 511 539 ofstream *tecplot = new ofstream(OutputName.c_str()); 512 write_tecplot_file(out, tecplot, TesselStruct, mol, 0);540 write_tecplot_file(out, tecplot, mol->TesselStruct, mol, 0); 513 541 tecplot->close(); 514 542 delete(tecplot); … … 518 546 OutputName.append(Raster3DSuffix); 519 547 ofstream *rasterplot = new ofstream(OutputName.c_str()); 520 write_raster3d_file(out, rasterplot, TesselStruct, mol);548 write_raster3d_file(out, rasterplot, mol->TesselStruct, mol); 521 549 rasterplot->close(); 522 550 delete(rasterplot); 523 551 } 524 552 } 553 525 554 526 555 // free reference lists … … 600 629 class Tesselation *TesselStruct = NULL; 601 630 LinkedCell LCList(mol, 10.); 602 Find_convex_border(out, mol, TesselStruct,&LCList, NULL);631 Find_convex_border(out, mol, &LCList, NULL); 603 632 double clustervolume; 604 633 if (ClusterVolume == 0) … … 728 757 Vector FillerDistance; 729 758 double FillIt = false; 730 atom *Walker = NULL , *Runner = NULL;759 atom *Walker = NULL; 731 760 bond *Binder = NULL; 761 int i; 762 LinkedCell *LCList[List->ListOfMolecules.size()]; 763 764 *out << Verbose(0) << "Begin of FillBoxWithMolecule" << endl; 765 766 i=0; 767 for (MoleculeList::iterator ListRunner = List->ListOfMolecules.begin(); ListRunner != List->ListOfMolecules.end(); ListRunner++) { 768 *out << Verbose(1) << "Pre-creating linked cell lists for molecule " << *ListRunner << "." << endl; 769 LCList[i] = new LinkedCell((*ListRunner), 5.); // get linked cell list 770 if ((*ListRunner)->TesselStruct == NULL) { 771 *out << Verbose(1) << "Pre-creating tesselation for molecule " << *ListRunner << "." << endl; 772 Find_non_convex_border((ofstream *)&cout, (*ListRunner), LCList[i], NULL, 5.); 773 } 774 i++; 775 } 732 776 733 777 // Center filler at origin … … 735 779 filler->Center.Zero(); 736 780 781 filler->CountAtoms(out); 782 atom * CopyAtoms[filler->AtomCount]; 783 int nr = 0; 784 737 785 // calculate filler grid in [0,1]^3 738 786 FillerDistance.Init(distance[0], distance[1], distance[2]); 739 787 FillerDistance.InverseMatrixMultiplication(M); 740 for(int i=0;i<NDIM;i++) 788 *out << Verbose(1) << "INFO: Grid steps are "; 789 for(int i=0;i<NDIM;i++) { 741 790 N[i] = (int) ceil(1./FillerDistance.x[i]); 791 *out << N[i]; 792 if (i != NDIM-1) 793 *out<< ", "; 794 else 795 *out << "." << endl; 796 } 742 797 743 798 // go over [0,1]^3 filler grid … … 746 801 for (n[2] = 0; n[2] < N[2]; n[2]++) { 747 802 // calculate position of current grid vector in untransformed box 748 CurrentPosition.Init( n[0], n[1], n[2]);803 CurrentPosition.Init((double)n[0]/(double)N[0], (double)n[1]/(double)N[1], (double)n[2]/(double)N[2]); 749 804 CurrentPosition.MatrixMultiplication(M); 805 *out << Verbose(2) << "INFO: Current Position is " << CurrentPosition << "." << endl; 750 806 // Check whether point is in- or outside 751 807 FillIt = true; 808 i=0; 752 809 for (MoleculeList::iterator ListRunner = List->ListOfMolecules.begin(); ListRunner != List->ListOfMolecules.end(); ListRunner++) { 753 FillIt = FillIt && (!(*ListRunner)->TesselStruct->IsInside(&CurrentPosition)); 810 // get linked cell list 811 if ((*ListRunner)->TesselStruct == NULL) { 812 *out << Verbose(1) << "ERROR: TesselStruct of " << (*ListRunner) << " is NULL. Didn't we pre-create it?" << endl; 813 FillIt = false; 814 } else 815 FillIt = FillIt && (!(*ListRunner)->TesselStruct->IsInnerPoint(out, CurrentPosition, LCList[i++])); 754 816 } 755 817 … … 761 823 for (int i=0;i<NDIM;i++) 762 824 FillerTranslations.x[i] = RandomMolDisplacement*(rand()/(RAND_MAX/2.) - 1.); 825 *out << Verbose(3) << "INFO: Translating this filler by " << FillerTranslations << "." << endl; 763 826 764 827 // go through all atoms 828 nr=0; 765 829 Walker = filler->start; 766 while (Walker != filler->end) {830 while (Walker->next != filler->end) { 767 831 Walker = Walker->next; 768 832 // copy atom ... 769 *Runner= new atom(Walker);833 CopyAtoms[Walker->nr] = new atom(Walker); 770 834 771 835 // create atomic random translation vector ... … … 793 857 // ... and put at new position 794 858 if (DoRandomRotation) 795 Runner->x.MatrixMultiplication(Rotations); 796 Runner->x.AddVector(&AtomTranslations); 797 Runner->x.AddVector(&FillerTranslations); 798 Runner->x.AddVector(&CurrentPosition); 859 CopyAtoms[Walker->nr]->x.MatrixMultiplication(Rotations); 860 CopyAtoms[Walker->nr]->x.AddVector(&AtomTranslations); 861 CopyAtoms[Walker->nr]->x.AddVector(&FillerTranslations); 862 CopyAtoms[Walker->nr]->x.AddVector(&CurrentPosition); 863 799 864 // insert into Filling 800 Filling->AddAtom(Runner); 865 *out << Verbose(4) << "Filling atom " << *Walker << ", translated to " << AtomTranslations << ", at final position is " << (CopyAtoms[Walker->nr]->x) << "." << endl; 866 Filling->AddAtom(CopyAtoms[Walker->nr]); 801 867 } 802 868 803 869 // go through all bonds and add as well 804 870 Binder = filler->first; 805 while(Binder != filler->last) {871 while(Binder->next != filler->last) { 806 872 Binder = Binder->next; 873 *out << Verbose(3) << "Adding Bond between " << *CopyAtoms[Binder->leftatom->nr] << " and " << *CopyAtoms[Binder->rightatom->nr]<< "." << endl; 874 Filling->AddBond(CopyAtoms[Binder->leftatom->nr], CopyAtoms[Binder->rightatom->nr], Binder->BondDegree); 807 875 } 808 876 } else { … … 811 879 } 812 880 } 881 *out << Verbose(0) << "End of FillBoxWithMolecule" << endl; 882 813 883 return Filling; 814 884 }; … … 823 893 * \para RADIUS radius of the virtual sphere 824 894 */ 825 void Find_non_convex_border(ofstream *out, molecule* mol, class Tesselation *Tess, classLinkedCell *LCList, const char *filename, const double RADIUS)895 void Find_non_convex_border(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename, const double RADIUS) 826 896 { 827 897 int N = 0; 828 bool freeTess = false;829 898 bool freeLC = false; 830 899 ofstream *tempstream = NULL; … … 833 902 834 903 *out << Verbose(1) << "Entering search for non convex hull. " << endl; 835 if ( Tess== NULL) {904 if (mol->TesselStruct == NULL) { 836 905 *out << Verbose(1) << "Allocating Tesselation struct ..." << endl; 837 Tess = new Tesselation; 838 freeTess = true; 906 mol->TesselStruct = new Tesselation; 907 } else { 908 delete(mol->TesselStruct); 909 *out << Verbose(1) << "Re-Allocating Tesselation struct ..." << endl; 910 mol->TesselStruct = new Tesselation; 839 911 } 840 912 LineMap::iterator baseline; … … 849 921 } 850 922 851 Tess->Find_starting_triangle(out, RADIUS, LCList);852 853 baseline = Tess->LinesOnBoundary.begin();854 while ((baseline != Tess->LinesOnBoundary.end()) || (flag)) {923 mol->TesselStruct->Find_starting_triangle(out, RADIUS, LCList); 924 925 baseline = mol->TesselStruct->LinesOnBoundary.begin(); 926 while ((baseline != mol->TesselStruct->LinesOnBoundary.end()) || (flag)) { 855 927 if (baseline->second->TrianglesCount == 1) { 856 failflag = Tess->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.928 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. 857 929 flag = flag || failflag; 858 930 if (!failflag) … … 861 933 //cout << Verbose(1) << "Line " << *baseline->second << " has " << baseline->second->TrianglesCount << " triangles adjacent" << endl; 862 934 if (baseline->second->TrianglesCount != 2) 863 cout << Verbose(1) << "ERROR: TESSELATION FINISHED WITH INVALID TRIANGLE COUNT!" << endl;935 *out << Verbose(1) << "ERROR: TESSELATION FINISHED WITH INVALID TRIANGLE COUNT!" << endl; 864 936 } 865 937 866 938 N++; 867 939 baseline++; 868 if ((baseline == Tess->LinesOnBoundary.end()) && (flag)) {869 baseline = Tess->LinesOnBoundary.begin(); // restart if we reach end due to newly inserted lines940 if ((baseline == mol->TesselStruct->LinesOnBoundary.end()) && (flag)) { 941 baseline = mol->TesselStruct->LinesOnBoundary.begin(); // restart if we reach end due to newly inserted lines 870 942 flag = false; 871 943 } 872 944 873 945 // write temporary envelope 874 if ((DoSingleStepOutput && ( Tess->TrianglesOnBoundaryCount % 1 == 0))) { // if we have a new triangle and want to output each new triangle configuration875 class BoundaryTriangleSet *triangle = ( Tess->TrianglesOnBoundary.end()--)->second;946 if ((DoSingleStepOutput && (mol->TesselStruct->TrianglesOnBoundaryCount % 1 == 0))) { // if we have a new triangle and want to output each new triangle configuration 947 class BoundaryTriangleSet *triangle = (mol->TesselStruct->TrianglesOnBoundary.end()--)->second; 876 948 sprintf(NumberName, "-%04d-%s_%s_%s", TriangleFilesWritten, triangle->endpoints[0]->node->Name, triangle->endpoints[1]->node->Name, triangle->endpoints[2]->node->Name); 877 949 if (DoTecplotOutput) { … … 881 953 NameofTempFile.erase(npos, 1); 882 954 NameofTempFile.append(TecplotSuffix); 883 cout << Verbose(1) << "Writing temporary non convex hull to file " << NameofTempFile << ".\n";955 *out << Verbose(1) << "Writing temporary non convex hull to file " << NameofTempFile << ".\n"; 884 956 tempstream = new ofstream(NameofTempFile.c_str(), ios::trunc); 885 write_tecplot_file(out, tempstream, Tess, mol, TriangleFilesWritten);957 write_tecplot_file(out, tempstream, mol->TesselStruct, mol, TriangleFilesWritten); 886 958 tempstream->close(); 887 959 tempstream->flush(); … … 895 967 NameofTempFile.erase(npos, 1); 896 968 NameofTempFile.append(Raster3DSuffix); 897 cout << Verbose(1) << "Writing temporary non convex hull to file " << NameofTempFile << ".\n";969 *out << Verbose(1) << "Writing temporary non convex hull to file " << NameofTempFile << ".\n"; 898 970 tempstream = new ofstream(NameofTempFile.c_str(), ios::trunc); 899 write_raster3d_file(out, tempstream, Tess, mol);971 write_raster3d_file(out, tempstream, mol->TesselStruct, mol); 900 972 // // include the current position of the virtual sphere in the temporary raster3d file 901 973 // // make the circumsphere's center absolute again … … 930 1002 OutputName.append(TecplotSuffix); 931 1003 ofstream *tecplot = new ofstream(OutputName.c_str()); 932 write_tecplot_file(out, tecplot, Tess, mol, -1);1004 write_tecplot_file(out, tecplot, mol->TesselStruct, mol, -1); 933 1005 tecplot->close(); 934 1006 delete(tecplot); … … 938 1010 OutputName.append(Raster3DSuffix); 939 1011 ofstream *raster = new ofstream(OutputName.c_str()); 940 write_raster3d_file(out, raster, Tess, mol);1012 write_raster3d_file(out, raster, mol->TesselStruct, mol); 941 1013 raster->close(); 942 1014 delete(raster); … … 948 1020 cout << Verbose(2) << "Check: List of Baselines with not two connected triangles:" << endl; 949 1021 int counter = 0; 950 for (testline = Tess->LinesOnBoundary.begin(); testline != Tess->LinesOnBoundary.end(); testline++) {1022 for (testline = mol->TesselStruct->LinesOnBoundary.begin(); testline != mol->TesselStruct->LinesOnBoundary.end(); testline++) { 951 1023 if (testline->second->TrianglesCount != 2) { 952 1024 cout << Verbose(2) << *testline->second << "\t" << testline->second->TrianglesCount << endl; … … 955 1027 } 956 1028 if (counter == 0) 957 cout << Verbose(2) << "None." << endl; 958 959 // Tests the IsInnerAtom() function. 960 Vector x (0, 0, 0); 961 cout << Verbose(0) << "Point to check: " << x << endl; 962 cout << Verbose(0) << "Check: IsInnerPoint() returns " << IsInnerPoint(x, Tess, LCList) 963 << "for vector " << x << "." << endl; 964 TesselPoint* a = Tess->PointsOnBoundary.begin()->second->node; 965 cout << Verbose(0) << "Point to check: " << *a << " (on boundary)." << endl; 966 cout << Verbose(0) << "Check: IsInnerAtom() returns " << IsInnerPoint(a, Tess, LCList) 967 << "for atom " << a << " (on boundary)." << endl; 968 LinkedNodes *List = NULL; 969 for (int i=0;i<NDIM;i++) { // each axis 970 LCList->n[i] = LCList->N[i]-1; // current axis is topmost cell 971 for (LCList->n[(i+1)%NDIM]=0;LCList->n[(i+1)%NDIM]<LCList->N[(i+1)%NDIM];LCList->n[(i+1)%NDIM]++) 972 for (LCList->n[(i+2)%NDIM]=0;LCList->n[(i+2)%NDIM]<LCList->N[(i+2)%NDIM];LCList->n[(i+2)%NDIM]++) { 973 List = LCList->GetCurrentCell(); 974 //cout << Verbose(2) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl; 975 if (List != NULL) { 976 for (LinkedNodes::iterator Runner = List->begin();Runner != List->end();Runner++) { 977 if (Tess->PointsOnBoundary.find((*Runner)->nr) == Tess->PointsOnBoundary.end()) { 978 a = *Runner; 979 i=3; 980 for (int j=0;j<NDIM;j++) 981 LCList->n[j] = LCList->N[j]; 982 break; 983 } 984 } 985 } 986 } 987 } 988 cout << Verbose(0) << "Check: IsInnerPoint() returns " << IsInnerPoint(a, Tess, LCList) 989 << "for atom " << a << " (inside)." << endl; 990 991 992 if (freeTess) 993 delete(Tess); 1029 *out << Verbose(2) << "None." << endl; 1030 1031 // // Tests the IsInnerAtom() function. 1032 // Vector x (0, 0, 0); 1033 // *out << Verbose(0) << "Point to check: " << x << endl; 1034 // *out << Verbose(0) << "Check: IsInnerPoint() returns " << mol->TesselStruct->IsInnerPoint(out, x, LCList) 1035 // << "for vector " << x << "." << endl; 1036 // TesselPoint* a = mol->TesselStruct->PointsOnBoundary.begin()->second->node; 1037 // *out << Verbose(0) << "Point to check: " << *a << " (on boundary)." << endl; 1038 // *out << Verbose(0) << "Check: IsInnerAtom() returns " << mol->TesselStruct->IsInnerPoint(out, a, LCList) 1039 // << "for atom " << a << " (on boundary)." << endl; 1040 // LinkedNodes *List = NULL; 1041 // for (int i=0;i<NDIM;i++) { // each axis 1042 // LCList->n[i] = LCList->N[i]-1; // current axis is topmost cell 1043 // for (LCList->n[(i+1)%NDIM]=0;LCList->n[(i+1)%NDIM]<LCList->N[(i+1)%NDIM];LCList->n[(i+1)%NDIM]++) 1044 // for (LCList->n[(i+2)%NDIM]=0;LCList->n[(i+2)%NDIM]<LCList->N[(i+2)%NDIM];LCList->n[(i+2)%NDIM]++) { 1045 // List = LCList->GetCurrentCell(); 1046 // //cout << Verbose(2) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl; 1047 // if (List != NULL) { 1048 // for (LinkedNodes::iterator Runner = List->begin();Runner != List->end();Runner++) { 1049 // if (mol->TesselStruct->PointsOnBoundary.find((*Runner)->nr) == mol->TesselStruct->PointsOnBoundary.end()) { 1050 // a = *Runner; 1051 // i=3; 1052 // for (int j=0;j<NDIM;j++) 1053 // LCList->n[j] = LCList->N[j]; 1054 // break; 1055 // } 1056 // } 1057 // } 1058 // } 1059 // } 1060 // *out << Verbose(0) << "Check: IsInnerPoint() returns " << mol->TesselStruct->IsInnerPoint(out, a, LCList) 1061 // << "for atom " << a << " (inside)." << endl; 1062 1063 994 1064 if (freeLC) 995 1065 delete(LCList); -
src/boundary.hpp
r62bb91 ref0e6d 36 36 void PrepareClustersinWater(ofstream *out, config *configuration, molecule *mol, double ClusterVolume, double celldensity); 37 37 molecule * FillBoxWithMolecule(ofstream *out, MoleculeListClass *List, molecule *filler, config &configuration, double distance[NDIM], double RandAtomDisplacement, double RandMolDisplacement, bool DoRandomRotation); 38 void Find_convex_border(ofstream *out, molecule* mol, class Tesselation *&TesselStruct, classLinkedCell *LCList, const char *filename);39 void Find_non_convex_border(ofstream *out, molecule* mol, class Tesselation *T, classLinkedCell *LC, const char *tempbasename, const double RADIUS);38 void Find_convex_border(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename); 39 void Find_non_convex_border(ofstream *out, molecule* mol, class LinkedCell *LC, const char *tempbasename, const double RADIUS); 40 40 void Find_next_suitable_point(class BoundaryTriangleSet *BaseTriangle, class BoundaryLineSet *BaseLine, atom*& OptCandidate, Vector *OptCandidateCenter, double *ShortestAngle, const double RADIUS, LinkedCell *LC); 41 41 Boundaries *GetBoundaryPoints(ofstream *out, molecule *mol);
Note:
See TracChangeset
for help on using the changeset viewer.