Jive reference manual
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
jive::geom::ParametricShape Class Reference

#include <jive/geom/ParametricShape.h>

Inheritance diagram for jive::geom::ParametricShape:
Inheritance graph

Classes

struct  PointSet
 
struct  PointSet_
 
struct  Scratch_
 

Public Types

typedef ShapeBoundary Boundary
 
- Public Types inherited from jive::geom::InternalShape
typedef jem::numeric::SparseStructure Topology
 A type representing the boundary topology of an internal shape. More...
 
typedef util::IntVector IntVector
 A type representing a one-dimensional integer array. More...
 
typedef util::Cubix Cubix
 A three-dimensional array type. More...
 
- Public Types inherited from jive::geom::Shape
typedef util::Vector Vector
 A vector type. More...
 
typedef util::Matrix Matrix
 A matrix type. More...
 

Public Member Functions

 ParametricShape ()
 
 ParametricShape (const String &name, const Matrix &ischeme, const Ref< StdShape > &xshape, const Ref< StdShape > &sshape=NIL)
 
 ParametricShape (const String &name, const Matrix &ischeme, const Boundary &boundary, const Ref< StdShape > &xshape, const Ref< StdShape > &sshape=NIL)
 
virtual void readFrom (ObjectInput &in)
 
virtual void writeTo (ObjectOutput &out) const
 
virtual idx_t localRank () const
 Returns the local rank of this shape. More...
 
virtual idx_t nodeCount () const
 Returns the number of nodes. More...
 
virtual idx_t vertexCount () const
 
virtual idx_t ipointCount () const
 
virtual idx_t shapeFuncCount () const
 Returns the number of shape functions. More...
 
virtual idx_t boundaryCount () const
 Returns the number of boundaries. More...
 
virtual String getGeometry () const
 
virtual BoundaryShapegetBoundaryShape (idx_t ibnd) const
 
virtual IdxVector getBoundaryNodes (idx_t ibnd) const
 
virtual Topology getBoundaryTopology () const
 Returns the boundary topology of this internal shape. More...
 
virtual void getBoundaryCoords (const Matrix &x, idx_t ibnd, const Matrix &c) const
 
virtual void mapBoundaryPoint (const Vector &v, idx_t ibnd, const Vector &u) const
 
Vector getLocalWeights () const
 
virtual Matrix getVertexCoords () const
 
virtual Matrix getIntegrationScheme () const
 
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
 
virtual void getGlobalPoint (const Vector &x, const Vector &u, const Matrix &c) const
 
virtual bool getLocalPoint (const Vector &u, const Vector &x, double eps, const Matrix &c) const
 
virtual bool containsLocalPoint (const Vector &u) const
 
virtual Matrix getShapeFunctions () const
 Returns the shape functions evaluated in the integration points. More...
 
virtual Matrix getVertexFunctions () const
 
virtual void evalShapeFunctions (const Vector &h, const Vector &u) const
 
virtual void evalShapeGradients (const Matrix &g, const Vector &u, const Matrix &c) const
 
virtual void getShapeGradients (const Cubix &g, const Vector &w, const Matrix &c) const
 
virtual void getVertexGradients (const Cubix &g, const Matrix &c) const
 
virtual void getBoundaryGradients (const Cubix &g, idx_t ibn, const Matrix &c) const
 
virtual void evalShapeGradGrads (const Matrix &g2, const Matrix &g, const Vector &u, const Matrix &c) const
 
virtual void getShapeGradGrads (const Cubix &g2, const Cubix &g, const Vector &w, const Matrix &c) const
 
virtual void getVertexGradGrads (const Cubix &g2, const Cubix &g, const Matrix &c) const
 
virtual void getBoundaryGradGrads (const Cubix &g2, const Cubix &g, idx_t ibn, const Matrix &c) const
 
virtual void calcGradients (const Cubix &g, const Vector *w, const Matrix &c, const PointSet &points) const
 
virtual void calcGradGrads (const Cubix &g2, const Cubix &g, const Vector *w, const Matrix &c, const PointSet &points) const
 
virtual void * getExtByID (ExtensionID extID) const
 
StdShapegetXShape () const
 
StdShapegetSShape () const
 
- Public Member Functions inherited from jive::geom::InternalShape
virtual int globalRank () const
 Returns the global rank of this shape. More...
 
virtual BoundaryShapegetBoundaryShape (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 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::ClassgetClass () const
 Returns the Class instance representing the runtime class of this object. More...
 
- Public Member Functions inherited from jive::geom::Shape
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 getIntegrationWeights (const Vector &w, const Matrix &c) const =0
 Computes the integration weights in the global coordinate system. 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...
 
- Public Member Functions inherited from jem::Object
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< Objectclone () const
 Returns a copy of this object. More...
 
- Public Member Functions inherited from jive::geom::Grad2Extension
virtual void evalShapeGradGrads (const Matrix &g2, const Matrix &g, const Vector &u, const Matrix &c) const =0
 
virtual void getShapeGradGrads (const Cubix &g2, const Cubix &g, const Vector &w, const Matrix &c) const =0
 
virtual void getVertexGradGrads (const Cubix &g2, const Cubix &g, const Matrix &c) const =0
 
virtual void getBoundaryGradGrads (const Cubix &g2, const Cubix &g, idx_t ibnd, const Matrix &c) const =0
 

Protected Member Functions

virtual ~ParametricShape ()
 
void updateFuncs_ (const PointSet_ &points) const
 
void updateGrads_ (const PointSet_ &points) const
 
void updateGrads2_ (const PointSet_ &points) const
 
- Protected Member Functions inherited from jive::geom::InternalShape
virtual ~InternalShape ()
 
- Protected Member Functions inherited from jem::Collectable
 Collectable ()
 Creates an empty Collectable. More...
 
 ~Collectable ()
 Frees resources. More...
 
- Protected Member Functions inherited from jive::geom::Grad2Extension
virtual ~Grad2Extension ()
 
- Protected Member Functions inherited from jem::Interface
virtual ~Interface ()
 Empty destructor. More...
 
- Protected Member Functions inherited from jem::io::Serializable
virtual ~Serializable ()
 
virtual void emitVtableFunc_ ()
 

Protected Attributes

Ref< StdShapexshape_
 
Ref< StdShapesshape_
 
Vector center_
 
Matrix ischeme_
 
Vector iweights_
 
Boundary boundary_
 
idx_t rank_
 
idx_t rank2_
 
idx_t ipCount_
 
idx_t nodeCount_
 
idx_t funcCount_
 
idx_t vertexCount_
 
PointSet_ ipoints_
 
jem::Array< PointSet_bpoints_
 
PointSet_ vertices_
 
Scratch_ scratch_
 

Static Protected Attributes

static const int MAX_NR_ITER_
 
static const double NR_ALPHA_
 
static const double NR_BETA_
 
static const int U_NONE_
 
static const int U_FUNCS_
 
static const int U_GRADS_
 
static const int U_GRADS2_
 
static const int U_XFUNCS_
 
static const int U_XGRADS_
 
static const int U_XGRADS2_
 
static const int U_SFUNCS_
 
static const int U_SGRADS_
 
static const int U_SGRADS2_
 

Additional Inherited Members

- Static Public Member Functions inherited from jive::geom::InternalShape
static jem::ClassgetType ()
 Returns a pointer to a Class object representing this class. More...
 
- Static Public Member Functions inherited from jive::geom::Shape
static jem::ClassgetType ()
 Returns a pointer to a Class object representing this class. More...
 
- Static Public Member Functions inherited from jem::Object
static ClassgetType ()
 Returns the Class instance representing the Object class. More...
 
- Static Public Attributes inherited from jive::geom::Grad2Extension
static const jem::byte ID [1]
 

Member Typedef Documentation

Constructor & Destructor Documentation

jive::geom::ParametricShape::ParametricShape ( )
jive::geom::ParametricShape::ParametricShape ( const String name,
const Matrix ischeme,
const Ref< StdShape > &  xshape,
const Ref< StdShape > &  sshape = NIL 
)
jive::geom::ParametricShape::ParametricShape ( const String name,
const Matrix ischeme,
const Boundary boundary,
const Ref< StdShape > &  xshape,
const Ref< StdShape > &  sshape = NIL 
)
virtual jive::geom::ParametricShape::~ParametricShape ( )
protectedvirtual

Member Function Documentation

virtual void jive::geom::ParametricShape::readFrom ( ObjectInput in)
virtual

Implements jem::io::Serializable.

virtual void jive::geom::ParametricShape::writeTo ( ObjectOutput out) const
virtual

Implements jem::io::Serializable.

virtual idx_t jive::geom::ParametricShape::localRank ( ) const
virtual

Returns the rank (number of dimensions) of the local coordinate defined by this shape.

Returns
The local rank of this shape.

Implements jive::geom::Shape.

virtual idx_t jive::geom::ParametricShape::nodeCount ( ) const
virtual

Returns the number of nodes attached to this shape.

Returns
The number of nodes.

Implements jive::geom::Shape.

virtual idx_t jive::geom::ParametricShape::vertexCount ( ) const
virtual
virtual idx_t jive::geom::ParametricShape::ipointCount ( ) const
virtual
virtual idx_t jive::geom::ParametricShape::shapeFuncCount ( ) const
virtual

Returns the number of shape functions encapsulated by this shape. Note that the number of shape functions and the number of nodes may differ.

Returns
The number of shape functions.

Implements jive::geom::Shape.

virtual idx_t jive::geom::ParametricShape::boundaryCount ( ) const
virtual

Returns the number of boundaries of this internal shape.

Returns
The number of boundaries of this shape.

Implements jive::geom::InternalShape.

virtual String jive::geom::ParametricShape::getGeometry ( ) const
virtual
virtual BoundaryShape* jive::geom::ParametricShape::getBoundaryShape ( idx_t  ibnd) const
virtual
virtual IdxVector jive::geom::ParametricShape::getBoundaryNodes ( idx_t  ibnd) const
virtual
virtual Topology jive::geom::ParametricShape::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 from jive::geom::InternalShape.

virtual void jive::geom::ParametricShape::getBoundaryCoords ( const Matrix x,
idx_t  ibnd,
const Matrix c 
) const
virtual
virtual void jive::geom::ParametricShape::mapBoundaryPoint ( const Vector v,
idx_t  ibnd,
const Vector u 
) const
virtual
Vector jive::geom::ParametricShape::getLocalWeights ( ) const
virtual Matrix jive::geom::ParametricShape::getVertexCoords ( ) const
virtual
virtual Matrix jive::geom::ParametricShape::getIntegrationScheme ( ) const
virtual
virtual void jive::geom::ParametricShape::getGlobalIntegrationPoints ( const Matrix x,
const Matrix c 
) const
virtual

Fills the matrix x with the global coordinates of the integration points encapsulated by this shape: x(i,j) is set to the i-th coordinate of the j-th integration point. The matrix c should contain the global coordinates of the nodes attached to this shape: c(i,j) should be equal to the i-th coordinate of the j-th node.

The default implementation of this function is given by:

int i;
for ( i = 0; i < u.size(1); i++ )
{
this->getGlobalPoint ( x(slice(ALL),i), u(slice(ALL),i), c );
}
Parameters
x- a matrix that will be filled with the global coordinates of the integration points.
c- a matrix containing the global node coordinates.
Precondition
x.size(0) == this->globalRank() &&
x.size(1) == this->integrationPointCount() &&
c.size(0) == this->globalRank() &&
c.size(1) == this->nodeCount()

Reimplemented from jive::geom::Shape.

Reimplemented in jive::geom::ParametricVolume, jive::geom::Parametric4DShape, jive::geom::ParametricArea, and jive::geom::ParametricLine.

virtual void jive::geom::ParametricShape::getIntegrationWeights ( const Vector w,
const Matrix c 
) const
virtual
virtual void jive::geom::ParametricShape::getGlobalPoint ( const Vector x,
const Vector u,
const Matrix c 
) const
virtual
virtual bool jive::geom::ParametricShape::getLocalPoint ( const Vector u,
const Vector x,
double  eps,
const Matrix c 
) const
virtual
virtual bool jive::geom::ParametricShape::containsLocalPoint ( const Vector u) const
virtual
virtual Matrix jive::geom::ParametricShape::getShapeFunctions ( ) const
virtual

Returns a matrix containing the values of the shape functions in the integration points of this shape. If the returned matrix is denoted by h, then h(i,j) equals the value of the i-th shape function in the j-th integration point.

The contents of the returned matrix should not be modified because it may share its data with one of the private members of this shape.

Returns
A matrix containing the values of the shape functions in the integration points.

Implements jive::geom::Shape.

virtual Matrix jive::geom::ParametricShape::getVertexFunctions ( ) const
virtual
virtual void jive::geom::ParametricShape::evalShapeFunctions ( const Vector h,
const Vector u 
) const
virtual
virtual void jive::geom::ParametricShape::evalShapeGradients ( const Matrix g,
const Vector u,
const Matrix c 
) const
virtual
virtual void jive::geom::ParametricShape::getShapeGradients ( const Cubix g,
const Vector w,
const Matrix c 
) const
virtual
virtual void jive::geom::ParametricShape::getVertexGradients ( const Cubix g,
const Matrix c 
) const
virtual
virtual void jive::geom::ParametricShape::getBoundaryGradients ( const Cubix g,
idx_t  ibn,
const Matrix c 
) const
virtual
virtual void jive::geom::ParametricShape::evalShapeGradGrads ( const Matrix g2,
const Matrix g,
const Vector u,
const Matrix c 
) const
virtual
virtual void jive::geom::ParametricShape::getShapeGradGrads ( const Cubix g2,
const Cubix g,
const Vector w,
const Matrix c 
) const
virtual
virtual void jive::geom::ParametricShape::getVertexGradGrads ( const Cubix g2,
const Cubix g,
const Matrix c 
) const
virtual
virtual void jive::geom::ParametricShape::getBoundaryGradGrads ( const Cubix g2,
const Cubix g,
idx_t  ibn,
const Matrix c 
) const
virtual
virtual void jive::geom::ParametricShape::calcGradients ( const Cubix g,
const Vector w,
const Matrix c,
const PointSet points 
) const
virtual
virtual void jive::geom::ParametricShape::calcGradGrads ( const Cubix g2,
const Cubix g,
const Vector w,
const Matrix c,
const PointSet points 
) const
virtual
virtual void* jive::geom::ParametricShape::getExtByID ( ExtensionID  extID) const
virtual
StdShape* jive::geom::ParametricShape::getXShape ( ) const
StdShape* jive::geom::ParametricShape::getSShape ( ) const
void jive::geom::ParametricShape::updateFuncs_ ( const PointSet_ points) const
protected
void jive::geom::ParametricShape::updateGrads_ ( const PointSet_ points) const
protected
void jive::geom::ParametricShape::updateGrads2_ ( const PointSet_ points) const
protected

Member Data Documentation

const int jive::geom::ParametricShape::MAX_NR_ITER_
staticprotected
const double jive::geom::ParametricShape::NR_ALPHA_
staticprotected
const double jive::geom::ParametricShape::NR_BETA_
staticprotected
const int jive::geom::ParametricShape::U_NONE_
staticprotected
const int jive::geom::ParametricShape::U_FUNCS_
staticprotected
const int jive::geom::ParametricShape::U_GRADS_
staticprotected
const int jive::geom::ParametricShape::U_GRADS2_
staticprotected
const int jive::geom::ParametricShape::U_XFUNCS_
staticprotected
const int jive::geom::ParametricShape::U_XGRADS_
staticprotected
const int jive::geom::ParametricShape::U_XGRADS2_
staticprotected
const int jive::geom::ParametricShape::U_SFUNCS_
staticprotected
const int jive::geom::ParametricShape::U_SGRADS_
staticprotected
const int jive::geom::ParametricShape::U_SGRADS2_
staticprotected
Ref<StdShape> jive::geom::ParametricShape::xshape_
protected
Ref<StdShape> jive::geom::ParametricShape::sshape_
protected
Vector jive::geom::ParametricShape::center_
protected
Matrix jive::geom::ParametricShape::ischeme_
protected
Vector jive::geom::ParametricShape::iweights_
protected
Boundary jive::geom::ParametricShape::boundary_
protected
idx_t jive::geom::ParametricShape::rank_
protected
idx_t jive::geom::ParametricShape::rank2_
protected
idx_t jive::geom::ParametricShape::ipCount_
protected
idx_t jive::geom::ParametricShape::nodeCount_
protected
idx_t jive::geom::ParametricShape::funcCount_
protected
idx_t jive::geom::ParametricShape::vertexCount_
protected
PointSet_ jive::geom::ParametricShape::ipoints_
protected
jem::Array<PointSet_> jive::geom::ParametricShape::bpoints_
protected
PointSet_ jive::geom::ParametricShape::vertices_
protected
Scratch_ jive::geom::ParametricShape::scratch_
protected