OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::BasicGeometry Class Referenceabstract

Abstract representation of Geometry. More...

#include <geometry.h>

+ Inheritance diagram for oofem::BasicGeometry:

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 BasicGeometryClone ()=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 FloatArraygiveVertex (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< FloatArraymVertices
 List of geometry vertices. More...
 

Detailed Description

Abstract representation of Geometry.

Author
chamrova
Erik Svenning

Definition at line 81 of file geometry.h.

Constructor & Destructor Documentation

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.

oofem::BasicGeometry::~BasicGeometry ( )
virtual

Destructor.

Definition at line 63 of file geometry.C.

Member Function Documentation

void oofem::BasicGeometry::clear ( )
inline
virtual BasicGeometry* oofem::BasicGeometry::Clone ( )
pure virtual
virtual double oofem::BasicGeometry::computeDistanceTo ( const FloatArray point)
inlinevirtual

Computes normal signed distance between this object and a point.

Reimplemented in oofem::Line.

Definition at line 99 of file geometry.h.

virtual void oofem::BasicGeometry::computeIntersectionPoints ( Element element,
std::vector< FloatArray > &  oIntersectionPoints 
)
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.

double oofem::BasicGeometry::computeLineDistance ( const FloatArray iP1,
const FloatArray iP2,
const FloatArray iQ1,
const FloatArray iQ2 
)
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().

virtual void oofem::BasicGeometry::computeLocalCoordinates ( FloatArray oLocCoord,
const FloatArray iPoint 
) const
inlinevirtual

Reimplemented in oofem::PolygonLine.

Definition at line 109 of file geometry.h.

References OOFEM_ERROR.

virtual void oofem::BasicGeometry::computeNormalSignDist ( double &  oDist,
const FloatArray iPoint 
) const
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.

virtual int oofem::BasicGeometry::computeNumberOfIntersectionPoints ( Element element)
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().

virtual void oofem::BasicGeometry::computeTangentialSignDist ( double &  oDist,
const FloatArray iPoint,
double &  oMinDistArcPos 
) const
pure virtual
virtual void oofem::BasicGeometry::draw ( oofegGraphicContext gc)
inlinevirtual

Definition at line 169 of file geometry.h.

std :: string oofem::BasicGeometry::errorInfo ( const char *  func) const
inline

Definition at line 142 of file geometry.h.

virtual void oofem::BasicGeometry::giveBoundingSphere ( FloatArray oCenter,
double &  oRadius 
)
inlinevirtual

Reimplemented in oofem::PolygonLine, and oofem::Circle.

Definition at line 185 of file geometry.h.

References OOFEM_ERROR.

virtual const char* oofem::BasicGeometry::giveClassName ( ) const
inlinevirtual

Gives class name.

Reimplemented in oofem::PolygonLine, and oofem::Circle.

Definition at line 141 of file geometry.h.

virtual void oofem::BasicGeometry::giveGlobalCoordinates ( FloatArray oGlobalCoord,
const double &  iArcPos 
) const
inlinevirtual

Reimplemented in oofem::PolygonLine, and oofem::Circle.

Definition at line 111 of file geometry.h.

References OOFEM_ERROR.

virtual void oofem::BasicGeometry::giveInputRecord ( DynamicInputRecord input)
inlinevirtual

Reimplemented in oofem::PolygonLine.

Definition at line 139 of file geometry.h.

References OOFEM_ERROR.

virtual void oofem::BasicGeometry::giveSubPolygon ( std::vector< FloatArray > &  oPoints,
const double &  iXiStart,
const double &  iXiEnd 
) const
inlinevirtual

Reimplemented in oofem::PolygonLine.

Definition at line 110 of file geometry.h.

References OOFEM_ERROR.

virtual void oofem::BasicGeometry::giveTangent ( FloatArray oTangent,
const double &  iArcPosition 
) const
inlinevirtual

Computes tangential direction at given local coordinate (arcPos)

Reimplemented in oofem::PolygonLine, and oofem::Circle.

Definition at line 114 of file geometry.h.

virtual bool oofem::BasicGeometry::giveTips ( TipInfo oStartTipInfo,
TipInfo oEndTipInfo 
) const
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().

virtual IRResultType oofem::BasicGeometry::initializeFrom ( InputRecord ir)
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.

void oofem::BasicGeometry::insertVertexBack ( const FloatArray iP)
inline
void oofem::BasicGeometry::insertVertexFront ( const FloatArray iP)
inline

Definition at line 130 of file geometry.h.

Referenced by oofem::XfemStructureManager::mergeCloseCracks().

virtual bool oofem::BasicGeometry::intersects ( Element element)
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.

virtual bool oofem::BasicGeometry::isInside ( Element el)
inlinevirtual

Reimplemented in oofem::PolygonLine, and oofem::Circle.

Definition at line 146 of file geometry.h.

virtual bool oofem::BasicGeometry::isInside ( FloatArray point)
inlinevirtual

Reimplemented in oofem::PolygonLine, and oofem::Circle.

Definition at line 147 of file geometry.h.

virtual bool oofem::BasicGeometry::isOutside ( BasicGeometry bg)
inlinevirtual

Reimplemented in oofem::PolygonLine, oofem::Circle, and oofem::Line.

Definition at line 145 of file geometry.h.

virtual void oofem::BasicGeometry::printVTK ( int  iTStepIndex,
int  iIndex 
)
inlinevirtual

Reimplemented in oofem::PolygonLine.

Definition at line 103 of file geometry.h.

virtual void oofem::BasicGeometry::printYourself ( )
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)
virtual contextIOResultType oofem::BasicGeometry::restoreContext ( DataStream stream,
ContextMode  mode,
void *  obj = NULL 
)
inlinevirtual

Restores the state of receiver from output stream.

Parameters
streamContext file.
modeDetermines amount of info in stream.
objSpecial parameter for sending extra information.
Returns
contextIOResultType.
Exceptions
ContextIOERRexception if error encountered.

Definition at line 166 of file geometry.h.

References oofem::CIO_OK.

virtual contextIOResultType oofem::BasicGeometry::saveContext ( DataStream stream,
ContextMode  mode,
void *  obj = NULL 
)
inlinevirtual

Stores the state of receiver to output stream.

Parameters
streamContext stream.
modeDetermines amount of info in stream.
objSpecial parameter, used to pass optional parameters.
Returns
contextIOResultType.
Exceptions
ContextIOERRIf error encountered.

Definition at line 157 of file geometry.h.

References oofem::CIO_OK.

void oofem::BasicGeometry::setVertices ( const std::vector< FloatArray > &  iVertices)
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.

Member Data Documentation


The documentation for this class was generated from the following files:

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:33 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011