ElementGeometry.h: Geometry of an element. More...
#include <ElementGeometry.h>
Public Member Functions | |
ElementGeometry () | |
virtual | ~ElementGeometry () |
ElementGeometry (const ElementGeometry &) | |
virtual ElementGeometry * | clone () const =0 |
virtual const size_t | getNumVertices () const =0 |
virtual const std::vector < GlobalNodalIndex > & | getConnectivity () const =0 |
virtual const std::string | getPolytopeName () const =0 |
virtual size_t | getSpatialDimension () const =0 |
virtual const size_t | getParametricDimension () const =0 |
Number of dimensions in parametric configuration. | |
virtual const size_t | getEmbeddingDimension () const =0 |
Number of dimensions in the real configuration. | |
virtual void | map (const double *X, double *Y) const =0 |
map from parametric to real configuration | |
virtual void | dMap (const double *X, double *DY, double &Jac) const =0 |
Derivative of map from parametric to real configuration. | |
virtual bool | consistencyTest (const double *X, const double Pert) const =0 |
Consistency test for map and its derivative. | |
virtual size_t | getNumFaces () const =0 |
Number of faces the polytope has. | |
virtual ElementGeometry * | getFaceGeometry (size_t e) const =0 |
Creates and returns a new ElementGeometry object corresponding to face "e" in the polytope. | |
virtual const double | getInRadius () const =0 |
Computes the Inner radius of the ElementGeometry object. | |
virtual const double | getOutRadius () const =0 |
Computes the Outer radius of the ElementGeometry object. | |
virtual void | computeNormal (size_t e, std::vector< double > &vNormal) const =0 |
Compute external normal for a face. |
ElementGeometry.h: Geometry of an element.
e.g. a triangle or tetrahedron DG++
Created by Adrian Lew on 9/4/06.
Copyright (c) 2006 Adrian Lew
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ElementGeometry: Defines the geometry of the polytope over which the interpolation takes place ElementGeometry consists of:
1) A set of vertices that define a convex hull, the domain of the polytope
2) A map from a parametric, reference polytope to the real polytope. This map is one-to-one, and may have domain and range in Euclidean spaces of different dimensions. In this way it is possible to map the parametric configuration of a planar triangle into three-dimensional real space as needed for plates and shells.
3) A name for the polytope, for identification purposes whenever needed.
The idea of the class is to avoid having copies of the vertices coordinates in the object, only the connectivity.
ElementGeometry::ElementGeometry | ( | ) | [inline] |
virtual ElementGeometry::~ElementGeometry | ( | ) | [inline, virtual] |
ElementGeometry::ElementGeometry | ( | const ElementGeometry & | ) | [inline] |
virtual ElementGeometry* ElementGeometry::clone | ( | ) | const [pure virtual] |
Implemented in Segment< SPD >, Tetrahedron, and Triangle< SPD >.
virtual void ElementGeometry::computeNormal | ( | size_t | e, | |
std::vector< double > & | vNormal | |||
) | const [pure virtual] |
Compute external normal for a face.
e,: | face number for which the normal is desired | |
vNormal,: | output of the three Cartesian components of the normal vector |
Implemented in Segment< SPD >, Tetrahedron, and Triangle< SPD >.
virtual bool ElementGeometry::consistencyTest | ( | const double * | X, | |
const double | Pert | |||
) | const [pure virtual] |
Consistency test for map and its derivative.
X | parametric coordinates at which to test | |
Pert | size of the perturbation with which to compute numerical derivatives (X->X+Pert) |
Implemented in AbstractGeom< SPD >, and AbstractGeom< TET_SPD >.
virtual void ElementGeometry::dMap | ( | const double * | X, | |
double * | DY, | |||
double & | Jac | |||
) | const [pure virtual] |
Derivative of map from parametric to real configuration.
X | parametric coordinates. | |
Jac | returns absolute value of the Jacobian of the map. | |
DY | returns derivative of the map. Here DY[a*getEmbeddingDimension()+i] contains the derivative in the a-th direction of the i-th coordinate. |
Implemented in Segment< SPD >, Tetrahedron, and Triangle< SPD >.
virtual const std::vector<GlobalNodalIndex>& ElementGeometry::getConnectivity | ( | ) | const [pure virtual] |
Implemented in AbstractGeom< SPD >, and AbstractGeom< TET_SPD >.
virtual const size_t ElementGeometry::getEmbeddingDimension | ( | ) | const [pure virtual] |
Number of dimensions in the real configuration.
Implemented in Segment< SPD >, Tetrahedron, and Triangle< SPD >.
virtual ElementGeometry* ElementGeometry::getFaceGeometry | ( | size_t | e | ) | const [pure virtual] |
Creates and returns a new ElementGeometry object corresponding to face "e" in the polytope.
The object has to be destroyed with delete by the recipient.
e | face number, starting from 0 |
Returns a null pointer if "e" is out of range
Implemented in Segment< SPD >, Tetrahedron, and Triangle< SPD >.
virtual const double ElementGeometry::getInRadius | ( | ) | const [pure virtual] |
Computes the Inner radius of the ElementGeometry object.
This is defined as the radius of the largest sphere that can be fit inside the polytope.
Implemented in Segment< SPD >, Tetrahedron, and Triangle< SPD >.
virtual size_t ElementGeometry::getNumFaces | ( | ) | const [pure virtual] |
Number of faces the polytope has.
Implemented in Segment< SPD >, Tetrahedron, and Triangle< SPD >.
virtual const size_t ElementGeometry::getNumVertices | ( | ) | const [pure virtual] |
Implemented in Segment< SPD >, Tetrahedron, and Triangle< SPD >.
virtual const double ElementGeometry::getOutRadius | ( | ) | const [pure virtual] |
Computes the Outer radius of the ElementGeometry object.
This is defined as the radius of the smallest sphere that contains the object.
Implemented in Segment< SPD >, Tetrahedron, and Triangle< SPD >.
virtual const size_t ElementGeometry::getParametricDimension | ( | ) | const [pure virtual] |
Number of dimensions in parametric configuration.
Implemented in Segment< SPD >, Tetrahedron, and Triangle< SPD >.
virtual const std::string ElementGeometry::getPolytopeName | ( | ) | const [pure virtual] |
Implemented in Segment< SPD >, Tetrahedron, and Triangle< SPD >.
virtual size_t ElementGeometry::getSpatialDimension | ( | ) | const [pure virtual] |
Implemented in AbstractGeom< SPD >, and AbstractGeom< TET_SPD >.
virtual void ElementGeometry::map | ( | const double * | X, | |
double * | Y | |||
) | const [pure virtual] |
map from parametric to real configuration
X | parametric coordinates | |
Y | returned real coordinates |
Implemented in Segment< SPD >, Tetrahedron, and Triangle< SPD >.