Jive reference manual
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
jive::geom::ParametricBoundary Class Referenceabstract

#include <jive/geom/ParametricBoundary.h>

Inheritance diagram for jive::geom::ParametricBoundary:
Inheritance graph

Classes

struct  PointSet
 
struct  PointSet_
 
struct  Scratch_
 

Public Member Functions

 ParametricBoundary ()
 
 ParametricBoundary (const String &name, const Matrix &ischeme, 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 String getGeometry () 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 getGlobalPoint (const Vector &x, const Vector &u, const Matrix &c) const
 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
 Tests whether a point lies within this shape. More...
 
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
 Computes the shape functions in a given point. More...
 
virtual void getNormals (const Matrix &q, const Vector &w, const Matrix &c) const
 Computes the normal vectors in the integration points. More...
 
virtual void getVertexNormals (const Matrix &q, const Matrix &c) const
 
virtual void calcNormals (const Matrix &q, const Vector *w, const Matrix &c, const PointSet &points) const =0
 
virtual void * getExtByID (ExtensionID extID) const
 
StdShapegetXShape () const
 
StdShapegetSShape () const
 
- Public Member Functions inherited from jive::geom::BoundaryShape
virtual int globalRank () const
 Returns the global rank of this shape. More...
 
virtual void getNodeNormals (const Matrix &q, const Matrix &c) const =0
 Computes the normal vectors in the nodes of this shape. More...
 
virtual void evalNormal (const Vector &q, const Vector &u, const Matrix &c) const =0
 Computes the normal vector in a given point. 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...
 
- 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...
 

Protected Member Functions

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

Protected Attributes

Ref< StdShapexshape_
 
Ref< StdShapesshape_
 
Vector center_
 
Matrix ischeme_
 
Vector iweights_
 
idx_t rank_
 
idx_t ipCount_
 
idx_t nodeCount_
 
idx_t funcCount_
 
idx_t vertexCount_
 
PointSet_ ipoints_
 
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 double NR_DELTA_
 
static const int U_NONE_
 
static const int U_FUNCS_
 
static const int U_GRADS_
 
static const int U_XFUNCS_
 
static const int U_XGRADS_
 
static const int U_SFUNCS_
 
static const int U_SGRADS_
 

Additional Inherited Members

- Public Types inherited from jive::geom::BoundaryShape
typedef Shape Super
 
- Public Types inherited from jive::geom::Shape
typedef util::Vector Vector
 A vector type. More...
 
typedef util::Matrix Matrix
 A matrix type. More...
 
- Static Public Member Functions inherited from jive::geom::BoundaryShape
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...
 

Constructor & Destructor Documentation

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

Member Function Documentation

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

Implements jem::io::Serializable.

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

Implements jem::io::Serializable.

virtual idx_t jive::geom::ParametricBoundary::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::ParametricBoundary::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::ParametricBoundary::vertexCount ( ) const
virtual
virtual idx_t jive::geom::ParametricBoundary::ipointCount ( ) const
virtual
virtual idx_t jive::geom::ParametricBoundary::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 String jive::geom::ParametricBoundary::getGeometry ( ) const
virtual
Vector jive::geom::ParametricBoundary::getLocalWeights ( ) const
virtual Matrix jive::geom::ParametricBoundary::getVertexCoords ( ) const
virtual
virtual Matrix jive::geom::ParametricBoundary::getIntegrationScheme ( ) const
virtual
virtual void jive::geom::ParametricBoundary::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::ParametricEdge, and jive::geom::ParametricSurface.

virtual void jive::geom::ParametricBoundary::getGlobalPoint ( const Vector x,
const Vector u,
const Matrix c 
) const
virtual

Fills the vector x with the global coordinates of a specific point within this shape: x[i] is set to the i-th global coordinate. 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: c(i,j) should be equal to the i-th global coordinate of the j-th node.

Parameters
x- a vector that will be set to the global coordinates of the specified point.
u- a vector containing the local coordinates of that point.
c- a matrix containing the global node coordinates.
Precondition
x.size() == this->globalRank() &&
u.size() == this->localRank() &&
c.size(0) == this->globalRank() &&
c.size(1) == this->nodeCount() &&
this->containsLocalPoint ( u )

Implements jive::geom::Shape.

Reimplemented in jive::geom::ParametricEdge, and jive::geom::ParametricSurface.

virtual bool jive::geom::ParametricBoundary::getLocalPoint ( const Vector u,
const Vector x,
double  eps,
const Matrix c 
) const
virtual

This function tries to convert a global coordinate vector to a local coordinate vector. It returns true if the conversion succeeds and the global coordinate vector points to a location `near' this shape. Otherwise it returns false.

If the return value equals true, the vector u will contain the local coordinate vector: u[i] will be set to the i-th local coordinate. The vector x should contain the global coordinate vector to be converted: x[i] should be equal to the i-th global coordinate. The double eps specifies the maximum allowed distance – in the global coordinate system – between this shape and the location pointed to by the vector x. The matrix c should contain the global node coordinates: c(i,j) should be equal to the i-th coordinate of the j-th node.

Note that a shape class does not have to support this function. In fact, the default implementation of this function simply throws a jem::IllegalOperationException.

Parameters
u- a vector that will be filled with the local coordinates of the point specified by the global coordinate vector x.
x- a global coordinate vector.
eps- the maximum allowed distance between the specified point and this shape.
c- a matrix containing the global node coordinates.
Precondition
u.size() == this->localRank() &&
x.size() == this->globalRank() &&
eps > 0.0 &&
c.size(0) == this->globalRank() &&
c.size(1) == this->nodeCount()
Returns
true if the conversion succeeds, and false otherwise.

Reimplemented from jive::geom::Shape.

Reimplemented in jive::geom::ParametricEdge, and jive::geom::ParametricSurface.

virtual bool jive::geom::ParametricBoundary::containsLocalPoint ( const Vector u) const
virtual

Returns true if the point specified by the local coordinate vector u lies within this shape, and false otherwise.

Parameters
u- a local coordinate vector.
Precondition
u.size() == this->localRank()
Returns
true if the specified point lies within this shape, and false otherwise.

Implements jive::geom::Shape.

virtual Matrix jive::geom::ParametricBoundary::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::ParametricBoundary::getVertexFunctions ( ) const
virtual
virtual void jive::geom::ParametricBoundary::evalShapeFunctions ( const Vector h,
const Vector u 
) const
virtual

Fills the vector h with the values of the shape functions in a specific point within this shape: h[i] is set to the i-th shape function in that point. The vector u should contain the local coordinates of the point: u[i] should be equal to the i-th local coordinate.

Parameters
h- a vector that will be filled with the values of the shape functions in a specific point within this shape.
u- a vector containing the local coordinates of the specified point.
Precondition
h.size() == this->shapeFuncCount() &&
u.size() == this->localRank() && this->containsLocalPoint ( u )

Implements jive::geom::Shape.

virtual void jive::geom::ParametricBoundary::getNormals ( const Matrix q,
const Vector w,
const Matrix c 
) const
virtual

Fills the matrix q with the normal vectors in the integration points of this boundary shape: q(i,j) is set to the i-th component of the normal vector in the j-th integration point. As a bonus, the vector w is filled with the integration weights in the global coordinate system: w[i] is set to the integration weight associated with the i-th integration point. The matrix c should contain the global node coordinates: c(i,j) should be equal to the i-th global coordinate of the j-th node.

Parameters
q- a matrix that will be filled with the normal vectors in the integration points.
w- a vector that will be filled with the global integration points.
c- a matrix containing the global node coordinates.
Precondition
q.size(0) == this->globalRank() &&
q.size(1) == this->integrationPointCount() &&
w.size() == this->integrationPointCount() &&
c.size(0) == this->globalRank() &&
c.size(1) == this->nodeCount()

Implements jive::geom::BoundaryShape.

virtual void jive::geom::ParametricBoundary::getVertexNormals ( const Matrix q,
const Matrix c 
) const
virtual
virtual void jive::geom::ParametricBoundary::calcNormals ( const Matrix q,
const Vector w,
const Matrix c,
const PointSet points 
) const
pure virtual
virtual void* jive::geom::ParametricBoundary::getExtByID ( ExtensionID  extID) const
virtual
StdShape* jive::geom::ParametricBoundary::getXShape ( ) const
StdShape* jive::geom::ParametricBoundary::getSShape ( ) const
void jive::geom::ParametricBoundary::updateFuncs_ ( const PointSet_ points) const
protected
void jive::geom::ParametricBoundary::updateGrads_ ( const PointSet_ points) const
protected

Member Data Documentation

const int jive::geom::ParametricBoundary::MAX_NR_ITER_
staticprotected
const double jive::geom::ParametricBoundary::NR_ALPHA_
staticprotected
const double jive::geom::ParametricBoundary::NR_BETA_
staticprotected
const double jive::geom::ParametricBoundary::NR_DELTA_
staticprotected
const int jive::geom::ParametricBoundary::U_NONE_
staticprotected
const int jive::geom::ParametricBoundary::U_FUNCS_
staticprotected
const int jive::geom::ParametricBoundary::U_GRADS_
staticprotected
const int jive::geom::ParametricBoundary::U_XFUNCS_
staticprotected
const int jive::geom::ParametricBoundary::U_XGRADS_
staticprotected
const int jive::geom::ParametricBoundary::U_SFUNCS_
staticprotected
const int jive::geom::ParametricBoundary::U_SGRADS_
staticprotected
Ref<StdShape> jive::geom::ParametricBoundary::xshape_
protected
Ref<StdShape> jive::geom::ParametricBoundary::sshape_
protected
Vector jive::geom::ParametricBoundary::center_
protected
Matrix jive::geom::ParametricBoundary::ischeme_
protected
Vector jive::geom::ParametricBoundary::iweights_
protected
idx_t jive::geom::ParametricBoundary::rank_
protected
idx_t jive::geom::ParametricBoundary::ipCount_
protected
idx_t jive::geom::ParametricBoundary::nodeCount_
protected
idx_t jive::geom::ParametricBoundary::funcCount_
protected
idx_t jive::geom::ParametricBoundary::vertexCount_
protected
PointSet_ jive::geom::ParametricBoundary::ipoints_
protected
PointSet_ jive::geom::ParametricBoundary::vertices_
protected
Scratch_ jive::geom::ParametricBoundary::scratch_
protected