Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Aspect_Metric_2 Class Reference

2D Aspect Ratios Metric Class More...

#include <Geometric_Metrics_2.h>

Inheritance diagram for Aspect_Metric_2:
Collaboration diagram for Aspect_Metric_2:

Public Member Functions

 Aspect_Metric_2 ()
 Initialize an Aspect Ratio Metric. More...
 
virtual void compute (double atts[]) const
 Calculate scaled R/r and R/l. More...
 
double maxValue () const
 The maximum value for this metric. More...
 
double minValue () const
 The minimum value for this metric. More...
 
- Public Member Functions inherited from Geo_Metric_Base_2
 Geo_Metric_Base_2 ()
 Constructor. More...
 
virtual void initialize (Vector_3< double > n[], int type)
 Initialize a 2D Geometric Metric. More...
 
virtual void initialize (Element_node_enumerator &ene)
 
- Public Member Functions inherited from Metric
 Metric ()
 
virtual ~Metric ()
 

Additional Inherited Members

- Protected Member Functions inherited from Geo_Metric_Base_2
void compute_angles (double &min, double &max) const
 Compute the min and max angles. More...
 
void compute_aspects (double &R, double &r, double &l) const
 Compute the circumradius, inradius, and shortest edge length. More...
 
- Protected Attributes inherited from Geo_Metric_Base_2
Vector_3< double > v [4]
 
int type_
 

Detailed Description

2D Aspect Ratios Metric Class

Definition at line 97 of file Geometric_Metrics_2.h.

Constructor & Destructor Documentation

Aspect_Metric_2 ( )
inline

Initialize an Aspect Ratio Metric.

Definition at line 101 of file Geometric_Metrics_2.h.

101 {}

Member Function Documentation

void compute ( double  atts[]) const
virtual

Calculate scaled R/r and R/l.

Parameters
atts[]R/r placed in atts[0], R/l in atts[1]

Note that R/r and R/l are only implemented for simplical elements. This method will return -1 for both metrics if used on a quadrilateral.

Implements Metric.

Definition at line 120 of file Geometric_Metrics_2.C.

Referenced by main().

120  {
121  if (type_ == COM::Connectivity::QUAD4) {
122  atts[0] = -1;
123  atts[1] = -1;
124  }
125  else{
126  double R, r, l;
127  compute_aspects(R,r,l);
128  atts[0] = (r/R)*2.0;
129  atts[1] = (l/R)*.5773502692;
130  }
131 }
void compute_aspects(double &R, double &r, double &l) const
Compute the circumradius, inradius, and shortest edge length.

Here is the caller graph for this function:

double maxValue ( ) const
virtual

The maximum value for this metric.

Reimplemented from Geo_Metric_Base_2.

Definition at line 133 of file Geometric_Metrics_2.C.

Referenced by main().

133  {
134 return 1.0;
135 }

Here is the caller graph for this function:

double minValue ( ) const
virtual

The minimum value for this metric.

Reimplemented from Geo_Metric_Base_2.

Definition at line 137 of file Geometric_Metrics_2.C.

Referenced by main().

137  {
138 return 0.0;
139 }

Here is the caller graph for this function:


The documentation for this class was generated from the following files: