OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Abstract representation of Geometry. More...
#include <geometry.h>
Public Member Functions | |
BasicGeometry () | |
Constructor. More... | |
BasicGeometry (const BasicGeometry &iBasicGeometry) | |
Copy constructor: should be implemented when a class deals with pointers. More... | |
virtual | ~BasicGeometry () |
Destructor. More... | |
virtual BasicGeometry * | Clone ()=0 |
virtual double | computeDistanceTo (const FloatArray *point) |
Computes normal signed distance between this object and a point. More... | |
virtual void | printVTK (int iTStepIndex, int iIndex) |
virtual void | computeNormalSignDist (double &oDist, const FloatArray &iPoint) const =0 |
Functions for computing signed distance in normal and tangential direction. More... | |
virtual void | computeTangentialSignDist (double &oDist, const FloatArray &iPoint, double &oMinDistArcPos) const =0 |
virtual void | computeLocalCoordinates (FloatArray &oLocCoord, const FloatArray &iPoint) const |
virtual void | giveSubPolygon (std::vector< FloatArray > &oPoints, const double &iXiStart, const double &iXiEnd) const |
virtual void | giveGlobalCoordinates (FloatArray &oGlobalCoord, const double &iArcPos) const |
virtual void | giveTangent (FloatArray &oTangent, const double &iArcPosition) const |
Computes tangential direction at given local coordinate (arcPos) More... | |
virtual bool | intersects (Element *element) |
Checks whether an element is interacted, Element reference will be later replaced by Geometry. More... | |
virtual int | computeNumberOfIntersectionPoints (Element *element) |
Gives number of intersection points of Geometry entity with an element, Element reference will be later replaced by Geometry. More... | |
virtual void | computeIntersectionPoints (Element *element, std::vector< FloatArray > &oIntersectionPoints) |
Gives intersection points between this Geometry and Element. More... | |
const FloatArray & | giveVertex (int n) const |
void | setVertices (const std::vector< FloatArray > &iVertices) |
void | removeDuplicatePoints (const double &iTolSquare) |
void | insertVertexFront (const FloatArray &iP) |
void | insertVertexBack (const FloatArray &iP) |
void | clear () |
void | translate (const FloatArray &iTrans) |
virtual IRResultType | initializeFrom (InputRecord *ir) |
Initializes the Geometry from the InputRecord. More... | |
virtual void | giveInputRecord (DynamicInputRecord &input) |
virtual const char * | giveClassName () const |
Gives class name. More... | |
std::string | errorInfo (const char *func) const |
int | giveNrVertices () const |
Returns number of Geometry vertices. More... | |
virtual bool | isOutside (BasicGeometry *bg) |
virtual bool | isInside (Element *el) |
virtual bool | isInside (FloatArray &point) |
virtual void | printYourself () |
virtual contextIOResultType | saveContext (DataStream &stream, ContextMode mode, void *obj=NULL) |
Stores the state of receiver to output stream. More... | |
virtual contextIOResultType | restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL) |
Restores the state of receiver from output stream. More... | |
virtual void | draw (oofegGraphicContext &gc) |
virtual bool | giveTips (TipInfo &oStartTipInfo, TipInfo &oEndTipInfo) const |
Returns start and end tip of the geometry, if applicable. More... | |
virtual void | giveBoundingSphere (FloatArray &oCenter, double &oRadius) |
Static Public Member Functions | |
static double | computeLineDistance (const FloatArray &iP1, const FloatArray &iP2, const FloatArray &iQ1, const FloatArray &iQ2) |
Computes the distance between two lines. More... | |
Protected Attributes | |
std::vector< FloatArray > | mVertices |
List of geometry vertices. More... | |
Abstract representation of Geometry.
Definition at line 81 of file geometry.h.
oofem::BasicGeometry::BasicGeometry | ( | ) |
Constructor.
oofem::BasicGeometry::BasicGeometry | ( | const BasicGeometry & | iBasicGeometry | ) |
Copy constructor: should be implemented when a class deals with pointers.
Definition at line 59 of file geometry.C.
|
virtual |
Destructor.
Definition at line 63 of file geometry.C.
|
inline |
Definition at line 133 of file geometry.h.
Referenced by oofem::XfemStructureManager::mergeCloseCracks(), and oofem::XfemStructureManager::removeShortCracks().
|
pure virtual |
Implemented in oofem::PointSwarm, oofem::PolygonLine, oofem::Circle, oofem::Triangle, and oofem::Line.
|
inlinevirtual |
Computes normal signed distance between this object and a point.
Reimplemented in oofem::Line.
Definition at line 99 of file geometry.h.
|
inlinevirtual |
Gives intersection points between this Geometry and Element.
Reimplemented in oofem::PolygonLine, oofem::Circle, and oofem::Line.
Definition at line 122 of file geometry.h.
|
static |
Computes the distance between two lines.
Line 1 has start point iP1 and end point iP2. Line 2 has start point iQ1 and end point iQ2.
Definition at line 88 of file geometry.C.
References oofem::FloatArray::add(), oofem::FloatArray::beDifferenceOf(), oofem::FloatMatrix::beInverseOf(), oofem::FloatArray::beProductOf(), oofem::FloatArray::computeNorm(), and oofem::FloatArray::dotProduct().
Referenced by oofem::Line::computeNumberOfIntersectionPoints().
|
inlinevirtual |
Reimplemented in oofem::PolygonLine.
Definition at line 109 of file geometry.h.
References OOFEM_ERROR.
|
pure virtual |
Functions for computing signed distance in normal and tangential direction.
Used by XFEM level set functions.
Implemented in oofem::PointSwarm, oofem::PolygonLine, oofem::Circle, oofem::Triangle, and oofem::Line.
|
inlinevirtual |
Gives number of intersection points of Geometry entity with an element, Element reference will be later replaced by Geometry.
Reimplemented in oofem::PolygonLine, oofem::Circle, oofem::Triangle, and oofem::Line.
Definition at line 120 of file geometry.h.
Referenced by oofem::Line::intersects().
|
pure virtual |
Implemented in oofem::PointSwarm, oofem::PolygonLine, oofem::Circle, oofem::Triangle, and oofem::Line.
Referenced by oofem::XfemStructuralElementInterface::giveSubtriangulationCompositeExportData(), and oofem::GnuplotExportModule::outputXFEM().
|
inlinevirtual |
Definition at line 169 of file geometry.h.
|
inline |
Definition at line 142 of file geometry.h.
|
inlinevirtual |
Reimplemented in oofem::PolygonLine, and oofem::Circle.
Definition at line 185 of file geometry.h.
References OOFEM_ERROR.
|
inlinevirtual |
Gives class name.
Reimplemented in oofem::PolygonLine, and oofem::Circle.
Definition at line 141 of file geometry.h.
|
inlinevirtual |
Reimplemented in oofem::PolygonLine, and oofem::Circle.
Definition at line 111 of file geometry.h.
References OOFEM_ERROR.
|
inlinevirtual |
Reimplemented in oofem::PolygonLine.
Definition at line 139 of file geometry.h.
References OOFEM_ERROR.
|
inline |
Returns number of Geometry vertices.
Definition at line 144 of file geometry.h.
Referenced by oofem::PolygonLine::computeIntersectionPoints(), oofem::PolygonLine::computeNormalSignDist(), oofem::PolygonLine::computeTangentialSignDist(), oofem::PolygonLine::giveBoundingSphere(), oofem::PolygonLine::giveTips(), oofem::PolygonLine::intersects(), oofem::Line::isOutside(), oofem::Circle::isOutside(), oofem::XfemStructureManager::mergeCloseCracks(), oofem::PolygonLine::printVTK(), and oofem::PatchIntegrationRule::SetUpPointsOnWedge().
|
inlinevirtual |
Reimplemented in oofem::PolygonLine.
Definition at line 110 of file geometry.h.
References OOFEM_ERROR.
|
inlinevirtual |
Computes tangential direction at given local coordinate (arcPos)
Reimplemented in oofem::PolygonLine, and oofem::Circle.
Definition at line 114 of file geometry.h.
|
inlinevirtual |
Returns start and end tip of the geometry, if applicable.
Reimplemented in oofem::PolygonLine.
Definition at line 183 of file geometry.h.
Referenced by oofem::XfemStructureManager::mergeCloseCracks().
|
inline |
Definition at line 124 of file geometry.h.
Referenced by oofem::GeometryBasedEI::computeIntersectionPoints(), oofem::Circle::computeIntersectionPoints(), oofem::PolygonLine::computeIntersectionPoints(), oofem::PolygonLine::computeNormalSignDist(), oofem::PolygonLine::computeTangentialSignDist(), oofem::PrescribedGradientBCWeak::createTractionMesh(), oofem::PolygonLine::giveBoundingSphere(), oofem::PolygonLine::giveTips(), oofem::PolygonLine::intersects(), oofem::Circle::isInside(), oofem::Triangle::isOrientedAnticlockwise(), oofem::Line::isOutside(), oofem::Circle::isOutside(), oofem::XfemStructureManager::mergeCloseCracks(), oofem::PolygonLine::printVTK(), oofem::Triangle::refineTriangle(), oofem::PatchIntegrationRule::SetUpPointsOnWedge(), and oofem::XfemElementInterface::XfemElementInterface_prepareNodesForDelaunay().
|
inlinevirtual |
Initializes the Geometry from the InputRecord.
Reimplemented in oofem::PointSwarm, oofem::PolygonLine, oofem::Circle, and oofem::Line.
Definition at line 138 of file geometry.h.
References oofem::IRRT_OK.
|
inline |
Definition at line 131 of file geometry.h.
Referenced by oofem::Line::computeTangentialSignDist(), oofem::XfemStructureManager::mergeCloseCracks(), and oofem::XfemStructureManager::removeShortCracks().
|
inline |
Definition at line 130 of file geometry.h.
Referenced by oofem::XfemStructureManager::mergeCloseCracks().
|
inlinevirtual |
Checks whether an element is interacted, Element reference will be later replaced by Geometry.
Reimplemented in oofem::PolygonLine, oofem::Circle, and oofem::Line.
Definition at line 118 of file geometry.h.
|
inlinevirtual |
Reimplemented in oofem::PolygonLine, and oofem::Circle.
Definition at line 146 of file geometry.h.
|
inlinevirtual |
Reimplemented in oofem::PolygonLine, and oofem::Circle.
Definition at line 147 of file geometry.h.
|
inlinevirtual |
Reimplemented in oofem::PolygonLine, oofem::Circle, and oofem::Line.
Definition at line 145 of file geometry.h.
|
inlinevirtual |
Reimplemented in oofem::PolygonLine.
Definition at line 103 of file geometry.h.
|
inlinevirtual |
Reimplemented in oofem::PolygonLine, oofem::Circle, and oofem::Triangle.
Definition at line 148 of file geometry.h.
void oofem::BasicGeometry::removeDuplicatePoints | ( | const double & | iTolSquare | ) |
Definition at line 67 of file geometry.C.
References mVertices.
Referenced by oofem::PolygonLine::cropPolygon(), and oofem::XfemStructureManager::mergeCloseCracks().
|
inlinevirtual |
Restores the state of receiver from output stream.
stream | Context file. |
mode | Determines amount of info in stream. |
obj | Special parameter for sending extra information. |
ContextIOERR | exception if error encountered. |
Definition at line 166 of file geometry.h.
References oofem::CIO_OK.
|
inlinevirtual |
Stores the state of receiver to output stream.
stream | Context stream. |
mode | Determines amount of info in stream. |
obj | Special parameter, used to pass optional parameters. |
ContextIOERR | If error encountered. |
Definition at line 157 of file geometry.h.
References oofem::CIO_OK.
|
inline |
Definition at line 126 of file geometry.h.
Referenced by oofem::PolygonLine::cropPolygon().
void oofem::BasicGeometry::translate | ( | const FloatArray & | iTrans | ) |
Definition at line 80 of file geometry.C.
References mVertices.
|
protected |
List of geometry vertices.
Definition at line 85 of file geometry.h.
Referenced by oofem::Triangle::changeToAnticlockwise(), oofem::Circle::Circle(), oofem::Triangle::computeBarycentrCoor(), oofem::Triangle::computeCenterOfCircumCircle(), oofem::Line::computeDistanceTo(), oofem::Line::computeInclinationAngle(), oofem::Circle::computeIntersectionPoints(), oofem::PolygonLine::computeLength(), oofem::Circle::computeNormalSignDist(), oofem::Line::computeNumberOfIntersectionPoints(), oofem::Line::computeProjection(), oofem::Line::computeTangentialDistanceToEnd(), oofem::Line::computeTangentialSignDist(), oofem::Triangle::getArea(), oofem::Triangle::getRadiusOfCircumCircle(), oofem::Circle::giveBoundingSphere(), oofem::Circle::giveGlobalCoordinates(), oofem::PolygonLine::giveGlobalCoordinates(), oofem::PolygonLine::giveInputRecord(), oofem::PolygonLine::giveNormal(), oofem::PolygonLine::giveSubPolygon(), oofem::PolygonLine::giveTangent(), oofem::Line::initializeFrom(), oofem::Circle::initializeFrom(), oofem::PolygonLine::initializeFrom(), oofem::Circle::intersects(), oofem::Circle::isOutside(), oofem::Line::isPointInside(), oofem::Line::Line(), oofem::Triangle::pointIsInTriangle(), oofem::Triangle::printYourself(), oofem::Circle::printYourself(), oofem::PolygonLine::printYourself(), removeDuplicatePoints(), oofem::Line::transformIntoPolar(), translate(), and oofem::Triangle::Triangle().