Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Geometric_Metrics_2.h
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 // $Id: Geometric_Metrics_2.h,v 1.5 2008/12/06 08:45:23 mtcampbe Exp $
24 
29 #ifndef __GEOMETRIC_METRICS_2_H__
30 #define __GEOMETRIC_METRICS_2_H__
31 
32 #include "Metric.h"
33 
35 
37 
41 class Geo_Metric_Base_2 : public Metric {
42 
43 public:
44 
47 
49 
53  virtual void initialize(Vector_3<double> n[], int type);
54 
55  virtual void initialize(Element_node_enumerator &ene);
56 
58  virtual double maxValue() const { return 1.0; }
59 
61  virtual double minValue() const { return 0.0; }
62 
63 protected:
64 
66  void compute_angles(double& min, double& max) const;
67 
69  void compute_aspects(double& R, double& r, double& l) const;
70 
71 protected:
73  int type_;
74 };
75 
78 public:
79 
82 
84 
87  virtual void compute(double atts[]) const;
88 
90  double maxValue() const;
91 
93  double minValue() const;
94 };
95 
98 public:
99 
102 
104 
111  virtual void compute(double atts[]) const;
112 
114  double maxValue() const;
115 
117  double minValue() const;
118 };
119 
121 
122 #endif
123 
124 
125 
126 
127 
128 
Geo_Metric_Base_2()
Constructor.
An adaptor for enumerating node IDs of an element.
2D Aspect Ratios Metric Class
virtual void compute(double atts[]) const
Calculate scaled R/r and R/l.
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:354
double maxValue() const
The maximum value for this metric.
Vector_3< double > v[4]
Metric Base Class.
Definition: Metric.h:48
double minValue() const
The minimum value for this metric.
2D Max and Min Angle Metric Class
2D Geometric Metric Base Class
double minValue() const
The minimum value for this metric.
void compute_angles(double &min, double &max) const
Compute the min and max angles.
virtual void compute(double atts[]) const
Calculate max and min angles.
virtual double minValue() const
The minimum value for this metric.
virtual void initialize(Vector_3< double > n[], int type)
Initialize a 2D Geometric Metric.
const NT & n
#define MOP_END_NAMESPACE
Definition: mopbasic.h:29
Angle_Metric_2()
Initialize a 2D Angle Metric.
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:346
Aspect_Metric_2()
Initialize an Aspect Ratio Metric.
double maxValue() const
The maximum value for this metric.
#define MOP_BEGIN_NAMESPACE
Definition: mopbasic.h:28
virtual double maxValue() const
The maximum value for this metric.
The Metric Base Class, from which algebraic and geometric metric clases are derived.
void compute_aspects(double &R, double &r, double &l) const
Compute the circumradius, inradius, and shortest edge length.