Jive reference manual
List of all members | Static Public Member Functions
jive::geom::LinearTriangle Class Reference

Constructs shape objects that encapsulate the geometrical properties of linear triangle elements. More...

Inheritance diagram for jive::geom::LinearTriangle:
Inheritance graph

Static Public Member Functions

static jem::Ref< InternalShapegetShape (int ipCount=3, int bndIpCount=2)
 Returns a shape with a specified number of integration points. More...
 
static jem::Ref< InternalShapegetShape (const Matrix &intPoints, const Vector &intWeights, const Matrix &bndIntPoints, const Vector &bndIntWeights)
 Returns a shape with a specific set of integration points. More...
 
static jem::Ref< InternalShapegetShape (const Matrix &intPoints, const Vector &intWeights, const ShapeBoundary &boundary)
 Returns a shape with a specific set of boundaries. More...
 

Additional Inherited Members

- Public Types inherited from jive::geom::TypeDefs
typedef jem::util::Properties Properties
 A type representing a set of properties. More...
 
typedef util::Vector Vector
 A vector type. More...
 
typedef util::Matrix Matrix
 A matrix type. More...
 

Detailed Description

#include <jive/geom/Triangle.h>

The LinearTriangle class provides functions for constructing InternalShape objects that encapsulate the geometrical properties of triangle elements with three nodes and linear shape functions. The following figure shows how the nodes are numbered (left image) and where they are located in the local coordinate system (right image).

LinearTriangle.jpg

Note that the local node coordinates of a linear triangle are identical to the node coordinates of a standard linear triangle.

A linear triangle has three boundaries. The table below indicates which boundaries are attached to which nodes.

Boundary index

Node indices

0 0, 1
1 1, 2
2 2, 0

The normals on the boundaries point away from the interior of the triangle. The boundaries are normally represented by BoundaryShape objects that are constructed by the LinearBoundaryLine class. However, you can also specify your own set of BoundaryShape objects to be used.

Note that the LinearTriangle class has only static members; it should be used as a mini name space.

See also
QuadraticTriangle

Member Function Documentation

static jem::Ref<InternalShape> jive::geom::LinearTriangle::getShape ( int  ipCount = 3,
int  bndIpCount = 2 
)
static

Returns an InternalShape object that encapsulates the geometrical properties of a linear triangle element. The parameter ipCount specifies the number of integration points within the element, while the parameter bndIpCount specifies the number of integration points on each boundary.

This function simply executes:

return getShape (
StdTriangle::getGaussPoints ( ipCount ),
StdTriangle::getGaussWeights ( ipCount ),
StdLine::getGaussPoints ( bndIpCount ),
StdLine::getGaussWeights ( bndIpCount )
);

Note that both the actual number of integration points within the element and on the boundaries may be different from ipCount and bndIpCount; read the documentation of the StdTriangle and StdLine classes for more information.

Parameters
ipCount- the number of integration points within the element.
bndIpCount- the number of integration points on each boundary.
Returns
An InternalShape object representing a linear triangle element.
See also
StdLine, StdTriangle
static jem::Ref<InternalShape> jive::geom::LinearTriangle::getShape ( const Matrix intPoints,
const Vector intWeights,
const Matrix bndIntPoints,
const Vector bndIntWeights 
)
static

Returns an InternalShape object that represents a linear triangle element with a specific set of integration points. The matrix intPoints should contain the local coordinates of the integration points within the element: intPoints(i,j) should be equal to the i-th local coordinate of the j-th integration point. The vector intWeights should contain the integration weights in the local coordinate system: intWeights[j] should be equal to the local integration weight associated with the j-th integration point.

The matrix bndIntPoints should contain the local coordinates of the integration points on each boundary. The vector bndIntWeights should contain the corresponding integration weights, also in the local coordinate system of the boundaries (see the documentation of the LinearBoundaryLine class for more information).

Note that all the input arrays are copied by reference. You should not modify the contents of these arrays after calling this function.

You can use the StdTriangle and StdLine classes to compute the integration point coordinates and weights. Here is an example:

Ref<InternalShape> s = LinearTriangle::getShape (
StdTriangle::getGaussPoints ( 13 ),
StdTriangle::getGaussWeights ( 13 ),
StdLine::getNewtonCotesPoints ( 4 ),
StdLine::getNewtonCotesWeights ( 4 ),
);
Parameters
intPoints- a matrix containing the local coordinates of the integration points within the element.
intWeights- a vector containing the weights of the internal integration points in the local coordinate system.
bndIntPoints- a matrix containing the local coordinates of the integration points on each boundary.
bndIntWeights- a vector containing the weights of the boundary integration points in the local coordinate system of the boundaries.
Precondition
intPoints.size(0) == 2 &&
intPoints.size(1) == intWeights.size() &&
bndIntPoints.size(0) == 1 &&
bndIntPoints.size(1) == bndIntWeights.size()
Returns
An InternalShape object that encapsulates the geometrical properties of a linear triangle element.
See also
StdLine, StdTriangle
static jem::Ref<InternalShape> jive::geom::LinearTriangle::getShape ( const Matrix intPoints,
const Vector intWeights,
const ShapeBoundary boundary 
)
static

Returns an InternalShape object that represents a linear triangle element with a specific set of integration points and boundaries. The matrix intPoints should contain the local coordinates of the integration points within the element: intPoints(i,j) should be equal to the i-th local coordinate of the j-th integration point. The vector intWeights should contain the integration weights in the local coordinate system: intWeights[j] should be equal to the local integration weight associated with the j-th integration point.

The ShapeBoundary object boundary specifies the boundaries to be associated with the returned shape object.

Note that all the two input arrays and the members of the ShapeBoundary object are copied by reference. You should not modify the contents of these arrays and members after calling this function.

Parameters
intPoints- a matrix containing the local coordinates of the integration points within the element.
intWeights- a vector containing the weights of the internal integration points in the local coordinate system.
boundary- the boundaries of the shape object that is to be constructed.
Precondition
intPoints.size(0) == 2 &&
intPoints.size(1) == intWeights.size()
Returns
An InternalShape object that encapsulates the geometrical properties of a linear triangle element.