|
virtual int | globalRank () const |
| Returns the global rank of this shape. More...
|
|
virtual int | boundaryCount () const =0 |
| Returns the number of boundaries. More...
|
|
virtual BoundaryShape * | getBoundaryShape (int ibnd) const =0 |
| Returns a boundary shape object given a boundary index. More...
|
|
virtual IntVector | getBoundaryNodes (int ibnd) const =0 |
| Returns the indices of the nodes on one of the boundaries of this shape. More...
|
|
virtual Topology | getBoundaryTopology () const |
| Returns the boundary topology of this internal shape. More...
|
|
virtual void | getBoundaryCoords (const Matrix &x, int ibnd, const Matrix &c) const |
| Collects the coordinates of the nodes on a specific boundary of this shape. More...
|
|
virtual void | getShapeGradients (const Cubix &g, const Vector &w, const Matrix &c) const |
| Computes the gradients of the shape functions in the integration points of this shape. More...
|
|
virtual void | evalShapeGradients (const Matrix &g, const Vector &u, const Matrix &c) const =0 |
| Computes the gradients of the shape functions in a specific point within this shape. More...
|
|
virtual void | getNodeGradients (const Cubix &g, const Matrix &c) const |
| Computes the gradients of the shape functions in the nodes of this shape. More...
|
|
virtual void | getBoundaryGradients (const Cubix &g, int ibnd, const Matrix &c) const =0 |
| Computes the gradients of the shape functions in the integration points on a boundary of this shape. More...
|
|
virtual jem::Class * | getClass () const |
| Returns the Class instance representing the runtime class of this object. More...
|
|
virtual int | localRank () const =0 |
| Returns the local rank of this shape. More...
|
|
virtual int | nodeCount () const =0 |
| Returns the number of nodes. More...
|
|
virtual int | shapeFuncCount () const =0 |
| Returns the number of shape functions. More...
|
|
virtual int | integrationPointCount () const =0 |
| Returns the number of integration points. More...
|
|
virtual Matrix | getLocalNodeCoords () const =0 |
| Returns the coordinates of the nodes in the local coordinate system. More...
|
|
virtual Matrix | getIntegrationPoints () const =0 |
| Returns the integration points in the local coordinate system. More...
|
|
virtual void | getGlobalIntegrationPoints (const Matrix &x, const Matrix &c) const |
| Computes the integration points in the global coordinate system. More...
|
|
virtual void | getIntegrationWeights (const Vector &w, const Matrix &c) const =0 |
| Computes the integration weights in the global coordinate system. More...
|
|
virtual Matrix | getShapeFunctions () const =0 |
| Returns the shape functions evaluated in the integration points. More...
|
|
virtual void | evalShapeFunctions (const Vector &h, const Vector &u) const =0 |
| Computes the shape functions in a given point. More...
|
|
virtual void | getGlobalPoint (const Vector &x, const Vector &u, const Matrix &c) const =0 |
| Converts a local coordinate vector to a global coordinate vector. More...
|
|
virtual bool | getLocalPoint (const Vector &u, const Vector &x, double eps, const Matrix &c) const |
| Converts a global coordinate vector to a local coordinate vector. More...
|
|
virtual bool | containsLocalPoint (const Vector &u) const =0 |
| Tests whether a point lies within this shape. More...
|
|
virtual String | toString () const |
| Returns a short textual description of this object. More...
|
|
virtual long | hashValue () const |
| Returns a hash value for this object. More...
|
|
virtual bool | equals (const Ref< Object > &obj) const |
| Tests whether two objects are equal. More...
|
|
Ref< Object > | clone () const |
| Returns a copy of this object. More...
|
|
#include <jive/geom/InternalShape.h>
The abstract class InternalShape
encapsulates the geometrical properties of a regular finite element. It extends the interface defined by the Shape
class with functions that compute the gradients of the shape functions in various points within an element.
The local coordinate system of an internal shape has the same rank as the global coordinate system in which that shape `lives'. This means that the member function localRank()
and globalRank()
return the same number.
An internal shape may have multiple boundaries that are represented by instances of the BoundaryShape
class. Each boundary is identified by an index that ranges from zero to the number of boundaries minus one. The following code fragment shows how to compute the surface area of an internal element by iterating over its boundaries.
double getSurfaceArea ( const InternalShape& s,
{
BoundaryShape* b;
double a;
int i, j;
a = 0.0;
for ( i = 0; i < s.boundaryCount(); i++ )
{
b = s.getBoundaryShape ( i );
x.
ref (
Matrix( b->globalRank(), b->nodeCount() ) );
w.ref (
Vector( b->integrationPointCount() ) );
s .getBoundaryCoords ( x, i, c );
b->getIntegrationWeights ( w, x );
}
return a;
}
- See also
BoundaryShape
virtual IntVector jive::geom::InternalShape::getBoundaryNodes |
( |
int |
ibnd | ) |
const |
|
pure virtual |
Returns an array containing the indices of the nodes on the boundary with index ibnd. If nodes
denotes the returned array, then nodes.size()
equals the number of nodes on the boundary and nodes
[i] yields the index of the i-th node on that boundary. In other words, if j
equals nodes
[i], then the j-th node of this internal shape is the i-th node on the specified boundary.
For performance reasons, the returned array may share its data with one of the private members of this shape object. One should therefore not modify the contents of the array.
- Parameters
-
ibnd | - a valid boundary index. |
- Precondition
ibnd >= 0 && ibnd < this->boundaryCount()
- Returns
- The indices of the nodes on a specific boundary.
virtual Topology jive::geom::InternalShape::getBoundaryTopology |
( |
| ) |
const |
|
virtual |
Returns a jem::numeric::SparseStructure
that encodes the non-zero pattern of the boundary-node connectivity matrix of this internal shape. This matrix is a sparse, boolean matrix that indicates which boundaries are attached to which nodes. To be precise, the matrix entry at location (i,j) is non-zero if the i-th boundary is attached to the j-th node of this shape.
Let s
denote the sparse structure returned by this function. Then s.size(0)
equals the number of boundaries of this shape; s.size(1)
equals the number of nodes attached to this shape; and s.getColumnIndices(i)
yields an integer array containing the indices of the nodes attached to boundary i
. This array is identical to the array returned by this->getBoundaryNodes(i)
.
For performance reasons, the returned sparse structure may point directly to the private data structures of this shape. This means that one should not modify the contents of the sparse structure; invoke the member clone
ont the sparse structure if you do want to modify the sparse structure.
The default implementation of this member function provided by the InternalShape
class constructs a sparse structure on the fly by repeatedly calling the member function getBoundaryNodes()
.
- Returns
- An instance of the class
jem::numeric::SparseStructure
that represents boundary connectivity matrix of this shape.
Reimplemented in jive::geom::ParametricShape.
virtual void jive::geom::InternalShape::getShapeGradients |
( |
const Cubix & |
g, |
|
|
const Vector & |
w, |
|
|
const Matrix & |
c |
|
) |
| const |
|
virtual |
Fills the three-dimensional array g with the spatial derivatives of the shape functions in the integration points of this shape: g(i,j,k)
is set to the derivative with respect to the i-th coordinate of the j-th shape function in the k-th integration point. As a bonus, the vector w is filled with the global integration weights: w
[i] is set to the integration weight of the i-th integration point. The matrix c should contain the global node coordinates of this shape; c(i,j)
should be equal to the i-th coordinate of the j-th node.
Note that the derivatives are computed in the global coordinate system.
The implementation of this function provided by the InternalShape
class repeatedly calls the member function evalShapeGradients()
. Derived classes are encouraged to provide a more efficient implementation.
- Parameters
-
g | - a three-dimensional array that will be filled with the gradients of the shape functions. |
w | - a vector that will be filled with the global integration weights. |
c | - a matrix containing the global node coordinates. |
- Precondition
g.size(0) == this->globalRank() &&
g.size(1) == this->nodeCount() &&
g.size(2) == this->integrationPointCount() &&
w.size() == this->integrationPointCount() &&
c.size(0) == this->globalRank() &&
c.size(1) == this->nodeCount()
virtual void jive::geom::InternalShape::evalShapeGradients |
( |
const Matrix & |
g, |
|
|
const Vector & |
u, |
|
|
const Matrix & |
c |
|
) |
| const |
|
pure virtual |
Fills the matrix g with the spatial derivatives of the shape functions in a specific point in this shape: g(i,j)
is set to the derivative with respect of the i-th coordinate of the j-th shape function in that point. The vector u should contain the local coordinates of that point: u
[i] should be equal to the i-th local coordinate. The matrix c should contain the global node coordinates of this shape; c(i,j)
should be equal to the i-th coordinate of the j-th node.
Note that the derivatives are computed in the global coordinate system.
- Parameters
-
g | - a matrix that will be filled with the gradients of the shape functions. |
u | - a local coordinate vector. |
c | - a matrix containing the global node coordinates. |
- Precondition
g.size(0) == this->globalRank() &&
g.size(1) == this->nodeCount() &&
u.size() == this->localRank() &&
c.size(0) == this->globalRank() &&
c.size(1) == this->nodeCount()
Implemented in jive::geom::ParametricVolume, jive::geom::Parametric4DShape, jive::geom::ParametricArea, and jive::geom::ParametricLine.
virtual void jive::geom::InternalShape::getNodeGradients |
( |
const Cubix & |
g, |
|
|
const Matrix & |
c |
|
) |
| const |
|
virtual |
Fills the three-dimensional array g with the spatial derivatives of the shape functions in the nodes: g(i,j,k)
is set to the derivative with respect to the i-th coordinate of the j-th shape function in the k-th node. The matrix c should contain the global node coordinates of this shape; c(i,j)
should be equal to the i-th coordinate of the j-th node.
Note that the derivatives are computed in the global coordinate system.
The implementation of this function provided by the InternalShape
class repeatedly calls the member function evalShapeGradients()
. Derived classes are encouraged to provide a more efficient implementation.
- Parameters
-
g | - a three-dimensional array that will be filled with the gradients of the shape functions. |
c | - a matrix containing the global node coordinates. |
- Precondition
g.size(0) == this->globalRank () &&
g.size(1) == this->nodeCount () &&
g.size(2) == this->nodeCount () &&
c.size(0) == this->globalRank () &&
c.size(1) == this->nodeCount ()