DFNgen  2.0
DFN Model Generator
structures.h
Go to the documentation of this file.
1 #ifndef _polyStruct_h_
2 #define _polyStruct_h_
3 #include <vector>
4 #include <cmath>
5 
6 
7 /**************************************************************************************/
8 /**************************************************************************************/
12 struct Poly{
15 
22  int familyNum;
23 
30  unsigned int groupNum;
31 
33  float area;
34 
40  double xradius;
41 
46  double yradius;
47 
49  float aspectRatio;
50 
52  double translation[3];
53 
55  double normal[3];
56 
62  double boundingBox[6];
63 
66  double aperture;
67 
70  double *vertices;
71 
74  double permeability;
75 
84  bool faces[6]; // Touching boundary faces of the fractures group, not neccesarily the faces of the fracture
85 
91  bool XYPlane;
92 
95  bool truncated;
96 
98  std::vector<unsigned int> intersectionIndex;
99 
100  // Constructor
101  Poly();
102 };
103 
104 
105 
106 /**************************************************************************************/
107 /**************************************************************************************/
111 struct Point{
112  double x;
113  double y;
114  double z;
115 
116  Point();
117  Point(double _x, double _y, double _z);
118 };
119 
120 
121 
122 /**************************************************************************************/
123 /**************************************************************************************/
132 struct IntPoints {
135  long int fract1;
136 
139  long int fract2;
140 
142  double x1;
144  double y1;
146  double z1;
148  double x2;
150  double y2;
152  double z2;
154  std::vector<unsigned int> triplePointsIdx;
155 
159 
160  IntPoints(); // Constructor. initializes fract1, fract2 = -1
161 };
162 
163 
164 
165 /**************************************************************************************/
166 /**************************************************************************************/
186  std::vector<int> intIndex;
187 };
188 
189 
190 
191 /**************************************************************************************/
192 /**************************************************************************************/
210  unsigned long long int groupNum;
212  std::vector<unsigned int> polyList;
213  FractureGroups();
214 };
215 
216 
217 
218 /**************************************************************************************/
219 /**************************************************************************************/
220 // GroupData works in conjunction with 'FractureGroups'
221 // GroupData keeps track of which group numbers ('groupNum' in above struct)
222 // Connect to which boundaries. When a cluster of fractures bridges two
223 // groups/clusters, One of the groups 'valid' bool is set to 0 (not valid).
224 // The fractures whos valid bool becomes 0 are moved to the other group
225 // In the 'GroupData' structure array, FractureGroups.groupNum-1 is the index
226 // to the corresponding GroupData struct in the GroupData array.
227 struct GroupData {
229  unsigned int size;
232  bool valid;
238  bool faces[6];
239 
240  // Constructor sets size to zero an sets 'valid' bit and 'faces' elements
241  // to false.
242  GroupData();
243 };
244 
245 
246 
247 /**************************************************************************************/
248 /**************************************************************************************/
252  unsigned long long int shortIntersection;
255  unsigned long long int closeToNode;
258  unsigned long long int closeToEdge;
259  /* Counter no longer in use. */
260  unsigned long long int closePointToEdge;
262  unsigned long long int outside;
264  unsigned long long int triple;
267  unsigned long long int interCloseToInter;
269 };
270 
271 
272 /**************************************************************************************/
273 /**************************************************************************************/
274 // TODO: Make singleton
277 struct Stats {
278 
284 
290 
297 
300  unsigned int acceptedPolyCount;
301 
304  unsigned long long int rejectedPolyCount;
305 
308  unsigned int retranslatedPolyCount;
309 
311  unsigned int truncated;
312 
316  // unsigned int numIntPoints;
317 
321 
325 
329 
333 
336  unsigned long long int nextGroupNum;
337 
339  struct RejectionReasons rejectionReasons;
340 
345 
347  double originalLength; // Length of all intersections if none were shortened
348 
353 
358  unsigned int intersectionNodeCount;
359 
364  unsigned int tripleNodeCount;
365 
371  std::vector<unsigned int> rejectsPerAttempt;
372 
374  std::vector<struct FractureGroups> fractGroup;
376  std::vector<struct GroupData> groupData;
377  // Constructor
378  Stats();
379 };
380 
381 
382 
383 /**************************************************************************************/
384 /**************************************************************************************/
390 struct Shape {
391 
393  short shapeFamily;
394 
397 
399  short numPoints;
400 
402  float *thetaList;
403 
405  unsigned int radiiIdx;
406 
408  std::vector<double> radiiList;
409 
412  short layer;
413 
415  float aspectRatio;
416 
418  float p32Target;
419 
421  float currentP32;
422 
427 
432 
435  float beta;
436 
439  double theta;
440 
443  double phi;
444 
448  double kappa;
449 
450 
451  /**************** Distribution Variables *********************/
452  /*************************************************************/
457  double minDistInput;
458 
463  double maxDistInput;
464 
466  float expMean;
467 
470  float expLambda;
471 
474  float expMin;
475 
478  float expMax;
479 
482  float mean;
483 
486  float sd;
487 
490  float logMin;
493  float logMax;
494 
496  float constRadi;
497 
499  float min;
500 
502  float max;
503 
505  float alpha;
506 
507  Shape(); // Constructor
508 };
509 
510 
511 void printPolyData(struct Poly &Poly);
512 void printStats(struct stats *obj);
513 
514 #endif
515 
516 
std::vector< double > radiiList
Definition: structures.h:408
double theta
Definition: structures.h:439
float expMean
Definition: structures.h:466
unsigned int groupNum
Definition: structures.h:30
std::vector< unsigned int > polyList
Definition: structures.h:212
float max
Definition: structures.h:502
bool truncated
Definition: structures.h:95
int numberOfNodes
Definition: structures.h:14
double boundingBox[6]
Definition: structures.h:62
unsigned long long int shortIntersection
Definition: structures.h:252
double areaAfterRemoval
Definition: structures.h:324
unsigned long long int closeToNode
Definition: structures.h:255
float constRadi
Definition: structures.h:496
unsigned long long int closeToEdge
Definition: structures.h:258
bool betaDistribution
Definition: structures.h:431
unsigned long long int triple
Definition: structures.h:264
double phi
Definition: structures.h:443
float * thetaList
Definition: structures.h:402
unsigned int intersectionsShortened
Definition: structures.h:344
double x2
Definition: structures.h:148
bool XYPlane
Definition: structures.h:91
double originalLength
Definition: structures.h:347
unsigned long long int interCloseToInter
Definition: structures.h:267
double y2
Definition: structures.h:150
double kappa
Definition: structures.h:448
double y
Definition: structures.h:113
void printStats(struct stats *obj)
std::vector< struct FractureGroups > fractGroup
Definition: structures.h:374
short layer
Definition: structures.h:412
double y1
Definition: structures.h:144
unsigned long long int groupNum
Definition: structures.h:210
float logMin
Definition: structures.h:490
double z2
Definition: structures.h:152
bool angleOption
Definition: structures.h:426
unsigned int truncated
Definition: structures.h:311
float sd
Definition: structures.h:486
double maxDistInput
Definition: structures.h:463
double z1
Definition: structures.h:146
Poly()
Definition: structures.cpp:28
unsigned long long int closePointToEdge
Definition: structures.h:260
unsigned int intersectionNodeCount
Definition: structures.h:358
int * expectedFromFam
Definition: structures.h:296
double discardedLength
Definition: structures.h:352
double x
Definition: structures.h:112
float aspectRatio
Definition: structures.h:49
unsigned long long int outside
Definition: structures.h:262
long int fract1
Definition: structures.h:135
double areaBeforeRemoval
Definition: structures.h:320
float expMax
Definition: structures.h:478
std::vector< unsigned int > rejectsPerAttempt
Definition: structures.h:371
double volBeforeRemoval
Definition: structures.h:328
double * vertices
Definition: structures.h:70
int * acceptedFromFam
Definition: structures.h:283
unsigned int radiiIdx
Definition: structures.h:405
float beta
Definition: structures.h:435
float expMin
Definition: structures.h:474
double volAfterRemoval
Definition: structures.h:332
std::vector< unsigned int > triplePointsIdx
Definition: structures.h:154
float expLambda
Definition: structures.h:470
double yradius
Definition: structures.h:46
float min
Definition: structures.h:499
double permeability
Definition: structures.h:74
bool valid
Definition: structures.h:232
double x1
Definition: structures.h:142
unsigned int retranslatedPolyCount
Definition: structures.h:308
float alpha
Definition: structures.h:505
short numPoints
Definition: structures.h:399
float logMax
Definition: structures.h:493
std::vector< struct GroupData > groupData
Definition: structures.h:376
unsigned int tripleNodeCount
Definition: structures.h:364
double z
Definition: structures.h:114
short distributionType
Definition: structures.h:396
float aspectRatio
Definition: structures.h:415
unsigned long long int nextGroupNum
Definition: structures.h:336
float mean
Definition: structures.h:482
double xradius
Definition: structures.h:40
std::vector< unsigned int > intersectionIndex
Definition: structures.h:98
int * rejectedFromFam
Definition: structures.h:289
double normal[3]
Definition: structures.h:55
float area
Definition: structures.h:33
float p32Target
Definition: structures.h:418
short shapeFamily
Definition: structures.h:393
bool intersectionShortened
Definition: structures.h:158
long int fract2
Definition: structures.h:139
double aperture
Definition: structures.h:66
void printPolyData(struct Poly &Poly)
int familyNum
Definition: structures.h:22
unsigned int size
Definition: structures.h:229
std::vector< int > intIndex
Definition: structures.h:186
bool faces[6]
Definition: structures.h:84
float currentP32
Definition: structures.h:421
unsigned int acceptedPolyCount
Definition: structures.h:300
double minDistInput
Definition: structures.h:457
double translation[3]
Definition: structures.h:52
unsigned long long int rejectedPolyCount
Definition: structures.h:304