Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Algebraic_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: Algebraic_Metrics_2.h,v 1.5 2008/12/06 08:45:23 mtcampbe Exp $
24 
29 #ifndef __ALGEBRAIC_METRICS_2_H__
30 #define __ALGEBRAIC_METRICS_2_H__
31 
32 #include "Metric.h"
33 
35 
37 
42 class Alg_Metric_Base_2 : public Metric {
43  friend std::ostream & operator<<(std::ostream &,
44  const Alg_Metric_Base_2 &);
45 public:
46 
49 
51 
55  virtual ~Alg_Metric_Base_2() {}
56 
58 
62  virtual void initialize(Vector_3<double> n[], int type);
63 
64  virtual void initialize(Element_node_enumerator &ene);
65 
67  virtual double maxValue() const { return 1.0; }
68 
70  virtual double minValue() const { return 0.0; }
71 
72 protected:
73 
75 
78  double compute_size(double ref_area=1.) const;
79 
81  double compute_shape() const;
82 
84  double compute_skew() const;
85 
86 protected:
87  double alpha[4];
88  J_Matrix A[4];
89  Matrix L[4];
90  int type_;
91 };
92 
95 public:
96 
99 
101 
104  virtual void compute(double atts[]) const;
105 };
106 
109 public:
110 
112 
115  explicit Size_Metric_2(double r_area) { ref_area=r_area; }
116 
118 
121  virtual void compute(double atts[]) const;
122 
123 private:
124  double ref_area;
125 };
126 
129 public:
130 
132 
135  explicit Size_Shape_Metric_2(double r_area) { ref_area=r_area; }
136 
138 
141  virtual void compute(double atts[]) const;
142 
144  void set_ref_area(double r_area) { ref_area = r_area; }
145 
146 private:
147  double ref_area;
148 };
149 
152 public:
153 
154  // Construct a Skew_Metric_2
156 
158 
161  virtual void compute(double atts[]) const;
162 };
163 
166 public:
167 
169 
172  explicit Size_Skew_Metric_2(double r_area) { ref_area=r_area; }
173 
175 
178  virtual void compute(double atts[]) const;
179 
180 private:
181  double ref_area;
182 };
183 
185 
186 #endif
187 
188 
189 
190 
191 
192 
Size_Skew_Metric_2(double r_area)
Construct Size_Skew_Metric_2.
2D Skew Metric Class
virtual double maxValue() const
The maximum value for this metric.
An adaptor for enumerating node IDs of an element.
friend std::ostream & operator<<(std::ostream &, const Alg_Metric_Base_2 &)
double compute_shape() const
Compute the shape metric.
void set_ref_area(double r_area)
modify the reference area for this element.
virtual void compute(double atts[]) const
Calculate the shape metric value.
double compute_skew() const
Compute the skew metric.
Metric Base Class.
Definition: Metric.h:48
virtual void initialize(Vector_3< double > n[], int type)
Initialize a 2D Algebraic Metric.
virtual void compute(double atts[]) const
Calculate the metric value.
2D Size-Skew Metric Class
virtual void compute(double atts[]) const
Calculate the metric value.
2D Size-Shape Metric Class
2D Algebraic Metric Base Class
Shape_Metric_2()
Initialize a 2D Shape metric.
virtual void compute(double atts[]) const
Calculate the metric value.
const NT & n
#define MOP_END_NAMESPACE
Definition: mopbasic.h:29
Size_Shape_Metric_2(double r_area)
Construct a Size_Shape_Metric_2.
double compute_size(double ref_area=1.) const
Compute the size metric.
2D Size Metric Class
2D Shape Metric Class
#define MOP_BEGIN_NAMESPACE
Definition: mopbasic.h:28
virtual double minValue() const
The minimum value for this metric.
The Metric Base Class, from which algebraic and geometric metric clases are derived.
Size_Metric_2(double r_area)
Construct a 2D Size metric.
virtual ~Alg_Metric_Base_2()
Virtual Destructor.
Alg_Metric_Base_2()
Constructor.
virtual void compute(double atts[]) const
Calculate the shape metric value.