source: molecuilder/src/boundary.hpp@ eec6c8

Last change on this file since eec6c8 was eec6c8, checked in by Frederik Heber <heber@…>, 17 years ago

Now we also produce Raster3D output files additionally to TecPlot ones ...

  • Property mode set to 100644
File size: 3.3 KB
RevLine 
[dcf51d]1#ifndef BOUNDARY_HPP_
2#define BOUNDARY_HPP_
3
4class BoundaryPointSet;
5class BoundaryLineSet;
6class BoundaryTriangleSet;
7
8// include config.h
9#ifdef HAVE_CONFIG_H
10#include <config.h>
11#endif
12
13// STL headers
14#include <map>
15#include <set>
16#include <deque>
17
18#include <gsl/gsl_poly.h>
19
20#include "molecules.hpp"
21
22template <typename T> void SetEndpointsOrdered(T endpoints[2], T endpoint1, T endpoint2)
23{
24 if (endpoint1->Nr < endpoint2->Nr) {
25 endpoints[0] = endpoint1;
26 endpoints[1] = endpoint2;
27 } else {
28 endpoints[0] = endpoint2;
29 endpoints[1] = endpoint1;
30 }
31};
32
33class BoundaryPointSet {
34 public:
35 BoundaryPointSet();
36 BoundaryPointSet(atom *Walker);
37 ~BoundaryPointSet();
[db177a]38
[dcf51d]39 void AddLine(class BoundaryLineSet *line);
[db177a]40
[dcf51d]41 LineMap lines;
42 int LinesCount;
43 atom *node;
44 int Nr;
45};
46
47class BoundaryLineSet {
48 public:
49 BoundaryLineSet();
50 BoundaryLineSet(class BoundaryPointSet *Point[2], int number);
51 ~BoundaryLineSet();
52
53 void AddTriangle(class BoundaryTriangleSet *triangle);
54
55 class BoundaryPointSet *endpoints[2];
56 TriangleMap triangles;
57 int TrianglesCount;
58 int Nr;
59};
60
61class BoundaryTriangleSet {
62 public:
63 BoundaryTriangleSet();
64 BoundaryTriangleSet(class BoundaryLineSet *line[3], int number);
65 ~BoundaryTriangleSet();
[db177a]66
[8f8621]67 void GetNormalVector(Vector &NormalVector);
[db177a]68
[dcf51d]69 class BoundaryPointSet *endpoints[3];
70 class BoundaryLineSet *lines[3];
[db177a]71 Vector NormalVector;
[dcf51d]72 int Nr;
73};
74
75class Tesselation {
76 public:
[db177a]77
[dcf51d]78 Tesselation();
79 ~Tesselation();
[db177a]80
[dcf51d]81 void TesselateOnBoundary(ofstream *out, config *configuration, molecule *mol);
82 void GuessStartingTriangle(ofstream *out);
83 void AddPoint(atom * Walker);
[5a447f]84 void AddTrianglePoint(atom* Candidate, int n);
[313dff]85 void AddTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, int n);
[5a447f]86 void AddTriangleToLines();
[e0c5b1]87 void Find_starting_triangle(molecule* mol, const double RADIUS);
[eec6c8]88 void Find_next_suitable_triangle(ofstream *out, molecule* mol, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, int N, const char *tempbasename);
[db177a]89
[dcf51d]90 PointMap PointsOnBoundary;
91 LineMap LinesOnBoundary;
92 TriangleMap TrianglesOnBoundary;
[313dff]93 class BoundaryPointSet *TPS[3]; //this is a Storage for pointers to triangle points, this and BPS[2] needed due to AddLine restrictions
[dcf51d]94 class BoundaryPointSet *BPS[2];
95 class BoundaryLineSet *BLS[3];
96 class BoundaryTriangleSet *BTS;
97 int PointsOnBoundaryCount;
98 int LinesOnBoundaryCount;
99 int TrianglesOnBoundaryCount;
[313dff]100 int TriangleFilesWritten;
[dcf51d]101};
102
103
104ostream & operator << (ostream &ost, BoundaryPointSet &a);
105ostream & operator << (ostream &ost, BoundaryLineSet &a);
106ostream & operator << (ostream &ost, BoundaryTriangleSet &a);
107
108
[59f86c]109double VolumeOfConvexEnvelope(ofstream *out, ofstream *tecplot, config *configuration, Boundaries *BoundaryPoints, molecule *mol);
[3f0c46]110double * GetDiametersOfCluster(ofstream *out, Boundaries *BoundaryPtr, molecule *mol, bool IsAngstroem);
[0779a9]111void PrepareClustersinWater(ofstream *out, config *configuration, molecule *mol, double ClusterVolume, double celldensity);
[db177a]112void Find_next_suitable_point(atom a, atom b, atom Candidate, int n, Vector *d1, Vector *d2, atom*& Opt_Candidate, double *Storage, const double RADIUS, molecule *mol, bool problem);
[eec6c8]113void Find_non_convex_border(ofstream *out, const char *filename, molecule* mol);
[dcf51d]114
115
116#endif /*BOUNDARY_HPP_*/
Note: See TracBrowser for help on using the repository browser.