#include <ElmTtools.h>
Public Methods | |
| ToolsElmT3n2D () | |
| ToolsElmT3n2D (GridFE *grid) | |
| ~ToolsElmT3n2D () | |
| void | attach (GridFE *grid) |
| void | refill (int elm_no) |
| bool | checkGrid () |
| bool | checkGrid (int e) |
| GridFE& | grid () |
| int | getElmNo () |
| real | x1 () |
| real | y1 () |
| real | x2 () |
| real | y2 () |
| real | x3 () |
| real | y3 () |
| real | det () |
| real | dN1x () |
| real | dN1y () |
| real | dN2x () |
| real | dN2y () |
| real | dN3x () |
| real | dN3y () |
| int | n1 () |
| int | n2 () |
| int | n3 () |
| real | area () |
| real | maxAngle () |
| real | minAngle () |
| real | angle (int i) |
| real | angle1 () |
| real | angle2 () |
| real | angle3 () |
| real | inRadius () |
| real | circumRadius () |
| Ptv(real) | inCenter () |
| void | inCenter (real &cx, real &cy) |
| Ptv(real) | circumCenter () |
| void | circumCenter (real &cx, real &cy) |
| Ptv(real) | centroid () |
| void | centroid (real &cx, real &cy) |
| real | centroidx () |
| real | centroidy () |
| real | midpt1x () |
| real | midpt1y () |
| real | midpt2x () |
| real | midpt2y () |
| real | midpt3x () |
| real | midpt3y () |
| Ptv(real) | normal (int i) |
| Ptv(real) | normal1 () |
| Ptv(real) | normal2 () |
| Ptv(real) | normal3 () |
| void | normal1 (real &nx, real &ny) |
| void | normal2 (real &nx, real &ny) |
| void | normal3 (real &nx, real &ny) |
| real | h () |
| real | maxLength () |
| real | minLength () |
| real | edgeLength (int i) |
| real | l1 () |
| real | l2 () |
| real | l3 () |
| real | l1sq () |
| real | l2sq () |
| real | l3sq () |
| real | circumference () |
| real | xmax () |
| real | xmin () |
| real | ymax () |
| real | ymin () |
| real | a11 () |
| real | a12 () |
| real | a21 () |
| real | a13 () |
| real | a31 () |
| real | a22 () |
| real | a23 () |
| real | a32 () |
| real | a33 () |
| Ptv(real) | localCoordinates (real x, real y) |
| real | barycentric1 (real x, real y) |
| real | barycentric2 (real x, real y) |
| real | barycentric3 (real x, real y) |
| void | barycentric (real x, real y, NUMT &phi1, NUMT &phi2, NUMT &phi3) |
| bool | inSide (real x, real y) |
| bool | outSide (real x, real y) |
| bool | onTriangle (real x, real y) |
| real | qualityMeasure (int i) |
| real | etahH () |
| real | etaincirc () |
| real | etaMaxAngle () |
| real | etapltmg () |
| void | testComputations () |
| bool | ok () const |
| void | print (Os os) const |
| bool | areQuadNodesAtMidPoints () |
| void | quadShape (real r, real s, real t, real &psi1, real &psi2, real &psi3, real &psi4, real &psi5, real &psi6) |
| void | dNq123 (real r, real s, real t, real &psi1x, real &psi1y, real &psi2x, real &psi2y, real &psi3x, real &psi3y) |
| void | dNq456 (real r, real s, real t, real &psi4x, real &psi4y, real &psi5x, real &psi5y, real &psi6x, real &psi6y) |
| COPY_CONSTRUCTOR (ToolsElmT3n2D) | |
| ASSIGNMENT_OPERATOR (ToolsElmT3n2D) | |
NAME: ToolsElmT3n2D - finite element for ElmT3n2D for efficient programming
DESCRIPTION:
The purpose of this class is to collect all the computations involving the geometry of a triangle in one place. A major consideration is efficiency. This motivates the use of inlining where possible, and in some cases a delibarete omission of functionality that would be too much of a bootleneck.
Applications of this class include programming of finite element assembly, mesh generation, interpolation and more. The class is mainly meant for elements of type "ElmT3n2D". However, if there are nodes at midpoints of edges it may also be used for "ElmT6n2D" computations.
|
|
There is one empty constructor and one where the grid can be attached. The function "checkGrid" is used to examine if all elements of the attached grid are of correct type. Prior to using the member functions in this class, data for the element in question must be loaded by a call to "refill". |
|
|
See documentation of one of the overloaded constructor. |
|
|
|
|
|
|
|
|
|
|
|
returns the product of gradients "a11"=("dN1","dN1"), where (,) is the discrete scalar product. In general, the function "a"ij (for i,j=1,2,3) computes the product "a"ij = ("dN"i,"dN"j). These products are often occurring in finite element assembly. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
returns the value of angle number "i" for the loaded element (measured in radians). |
|
|
returns the value of angle number 1 for the loaded element(measured in radians). The functions "angle2" and "angle3" return the values for the angles 2 and 3. |
|
|
|
|
|
|
|
|
returns true if the extra nodes in the "ElmT6n2D" element are located at the midpoints of the edges, otherwise returning false. (This function is intended for "ElmT6n2D" elements). |
|
|
returns the area of the triangle. |
|
|
|
|
|
returns the barycentric coordinates for a given point, this is the same as the value of the basis functions at the point. |
|
|
|
|
|
|
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
returns the centroid of the triangle (the gravity point). There is one version using a "Ptv" object, as well as one using scalars. The functions "centroidx" and "centroidy" return the "x" and "y"-coordinates of the centroid, respectively. |
|
|
|
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
checks that (a) a grid is attached, and (b) the grid contains only "ElmT3n2D" elements. |
|
|
See documentation of one of the overloaded functions. |
|
|
returns the center of the circumscribed circle. There is one version using a "Ptv" object, as well as one using scalars. |
|
|
returns the radius of the circumscribed circle. |
|
|
|
|
|
returns the value in "x"-direction for the gradient of the linear shape function "N1" associated with node 1. Corresponding treatment of nodes 2 and 3 is delivered by the functions "dN2x" and "dN3x". |
|
|
returns the value in "y"-direction for the gradient of the linear shape function "N1" associated with node 1. Corresponding treatment of nodes 2 and 3 is delivered by the functions "dN2y" and "dN3y". |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
computes and returns the values of the three gradient functions associated with nodes 1,2,3 at a given barycentric position. (This function is intended for "ElmT6n2D" elements, and requires the extra nodes to located at the midpoints of the edges). |
|
|
computes and returns the values of the three extra gradient functions associated with nodes 4,5,6 at a given barycentric position. (This function is intended for "ElmT6n2D" elements, and requires the extra nodes to located at the midpoints of the edges). |
|
|
returns the Jacobi determinant (twice the area of triangle). |
|
|
returns the length of edge number "i". |
|
|
returns a measure based on the maximum angle. |
|
|
returns the ratio between the small length scale "h" and the diameter. |
|
|
returns the ratio between the radii of inscribed and circumscribed circles. |
|
|
returns the quality measure used in the software package "PLTMG". |
|
|
returns the current element number. |
|
|
returns access to the grid from which the element is read. |
|
|
returns small length scale of the triangle defined as "h" = 2*"area"/"diameter", where "diameter" is the longest edge of the triangle. A geometrical interpretation is that "h" is the height of the normal to the longest edge. |
|
|
See documentation of one of the overloaded functions. |
|
|
returns the center of the inscribed circle. There is one version using a "Ptv" object, as well as one using scalars. |
|
|
returns the radius of the inscribed circle. |
|
|
returns true if the point is inside the triangle, otherwise it returns false (not yet implemented). |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
given a point, compute its local coordinates. |
|
|
returns the maximum angle for the loaded element (measured in radians). Notice that if edge 1 is the longest edge then angle3 is the largest angle. See the figure above for the numbering convention. |
|
|
returns the length of the longest edge. |
|
|
returns the "x"-value of the midpoint on edge number 1. See the figure above for numbering convention. The functions "midpt2x" and "midpt3x" work similarly for egdes 2 and 3. |
|
|
returns the "y"-value of the midpoint on edge number 1. See the figure above for numbering convention. The functions "midpt2y" and "midpt3y" work similarly for egdes 2 and 3. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
returns the minimum angle for the loaded element (measured in radians). |
|
|
returns the length of the shortest edge. |
|
|
returns the global grid node number for the first vertex (node 1). The functions "n2" and "n3" treat nodes 2 and 3 correspondingly. |
|
|
|
|
|
|
|
|
returns the outer unit normal for edge number "i". |
|
|
See documentation of one of the overloaded functions. |
|
|
returns the outer unit normal for edge number 1. There is one version using a "Ptv" object, as well as one using scalars. The functions "normal2" and "normal3" work similarly for edges 2 and 3. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
returns true if a grid attached, otherwise it returns false. |
|
|
returns true if the point is on the triangle boundary, otherwise it returns false (not yet implemented). |
|
|
returns true if the point outside the triangle, otherwise it returns false (not yet implemented). |
|
|
not yet implemented. |
|
|
computes and returns the values of the six basis functions at a given barycentric position (This function is intended for "ElmT6n2D" elements, and requires the extra nodes to located at the midpoints of the edges). |
|
|
returns some some quality measures for triangles. The result is normalized such that the output is 1.0 for an equilateral triangle and tends towards 0.0 for a triangle of degenerate shape. The argument "i" can be 1 (see "etahH"), 2 (see "etaincirc"), 3 (see "etaMaxAngle"), or 4 (see "etapltmg"). |
|
|
loads the data for triangle number "elm_no" from the grid and compute gradients. |
|
|
test that the implementation is correct by writing a report on the properties of the loaded element. |
|
|
returns the "x"-coordinate of the first triangle node. The functions "x2" and "x3" do the same thing for the two other nodes. (Recall the counter-clockwise direction). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
returns the "y"-coordinate of the first triangle node. The functions "y2" and "y3" do the same thing for the two other nodes. (Recall the counter-clockwise direction). |
|
|
|
|
|
|
|
|
|
|
|
|