OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
#include <geometry.h>
Public Member Functions | |
Triangle (const FloatArray &iP1, const FloatArray &iP2, const FloatArray &iP3) | |
virtual | ~Triangle () |
virtual BasicGeometry * | Clone () |
virtual void | computeNormalSignDist (double &oDist, const FloatArray &iPoint) const |
Functions for computing signed distance in normal and tangential direction. More... | |
virtual void | computeTangentialSignDist (double &oDist, const FloatArray &iPoint, double &oMinDistArcPos) const |
double | getArea () |
void | computeBarycentrCoor (FloatArray &answer) const |
double | getRadiusOfCircumCircle () |
void | computeCenterOfCircumCircle (FloatArray &answer) const |
virtual void | printYourself () |
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... | |
bool | isOrientedAnticlockwise () |
void | changeToAnticlockwise () |
bool | pointIsInTriangle (const FloatArray &iP) const |
Checks if the projection of the the point iP onto the triangle plane is inside the triangle. More... | |
Public Member Functions inherited from oofem::BasicGeometry | |
BasicGeometry () | |
Constructor. More... | |
BasicGeometry (const BasicGeometry &iBasicGeometry) | |
Copy constructor: should be implemented when a class deals with pointers. More... | |
virtual | ~BasicGeometry () |
Destructor. More... | |
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 | 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 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 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 void | refineTriangle (std::vector< Triangle > &oRefinedTri, const Triangle &iTri) |
Split a triangle in four. More... | |
Static Public Member Functions inherited from oofem::BasicGeometry | |
static double | computeLineDistance (const FloatArray &iP1, const FloatArray &iP2, const FloatArray &iQ1, const FloatArray &iQ2) |
Computes the distance between two lines. More... | |
Additional Inherited Members | |
Protected Attributes inherited from oofem::BasicGeometry | |
std::vector< FloatArray > | mVertices |
List of geometry vertices. More... | |
Definition at line 221 of file geometry.h.
oofem::Triangle::Triangle | ( | const FloatArray & | iP1, |
const FloatArray & | iP2, | ||
const FloatArray & | iP3 | ||
) |
Definition at line 409 of file geometry.C.
References oofem::BasicGeometry::mVertices.
Referenced by refineTriangle().
|
inlinevirtual |
Definition at line 225 of file geometry.h.
void oofem::Triangle::changeToAnticlockwise | ( | ) |
Definition at line 486 of file geometry.C.
References oofem::BasicGeometry::mVertices.
Referenced by oofem::Delaunay::triangulate().
|
inlinevirtual |
Implements oofem::BasicGeometry.
Definition at line 227 of file geometry.h.
void oofem::Triangle::computeBarycentrCoor | ( | FloatArray & | answer | ) | const |
Definition at line 430 of file geometry.C.
References oofem::FloatArray::at(), oofem::BasicGeometry::mVertices, and oofem::FloatArray::resize().
Referenced by computeCenterOfCircumCircle().
void oofem::Triangle::computeCenterOfCircumCircle | ( | FloatArray & | answer | ) | const |
Definition at line 447 of file geometry.C.
References oofem::FloatArray::at(), computeBarycentrCoor(), oofem::FloatArray::giveSize(), oofem::BasicGeometry::mVertices, and oofem::FloatArray::resize().
Referenced by oofem::Delaunay::isInsideCC().
|
inlinevirtual |
Functions for computing signed distance in normal and tangential direction.
Used by XFEM level set functions.
Implements oofem::BasicGeometry.
Definition at line 229 of file geometry.h.
References OOFEM_ERROR.
|
inlinevirtual |
Gives number of intersection points of Geometry entity with an element, Element reference will be later replaced by Geometry.
Reimplemented from oofem::BasicGeometry.
Definition at line 237 of file geometry.h.
|
inlinevirtual |
double oofem::Triangle::getArea | ( | ) |
Definition at line 416 of file geometry.C.
References oofem::BasicGeometry::mVertices.
Referenced by getRadiusOfCircumCircle(), and oofem::PatchIntegrationRule::SetUpPointsOnWedge().
double oofem::Triangle::getRadiusOfCircumCircle | ( | ) |
Definition at line 423 of file geometry.C.
References getArea(), and oofem::BasicGeometry::mVertices.
Referenced by oofem::Delaunay::isInsideCC().
bool oofem::Triangle::isOrientedAnticlockwise | ( | ) |
Definition at line 469 of file geometry.C.
References oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::FloatMatrix::giveDeterminant(), and oofem::BasicGeometry::giveVertex().
Referenced by oofem::Delaunay::triangulate().
bool oofem::Triangle::pointIsInTriangle | ( | const FloatArray & | iP | ) | const |
Checks if the projection of the the point iP onto the triangle plane is inside the triangle.
Definition at line 491 of file geometry.C.
References oofem::FloatArray::add(), oofem::FloatArray::beDifferenceOf(), oofem::FloatArray::beVectorProductOf(), oofem::FloatArray::computeSquaredNorm(), oofem::FloatArray::dotProduct(), oofem::FloatArray::giveSize(), oofem::BasicGeometry::mVertices, N, and oofem::FloatArray::normalize().
Referenced by oofem::XfemStructuralElementInterface::computeIPAverageInTriangle().
|
virtual |
Reimplemented from oofem::BasicGeometry.
Definition at line 459 of file geometry.C.
References oofem::BasicGeometry::mVertices.
|
static |
Split a triangle in four.
Definition at line 634 of file geometry.C.
References oofem::FloatArray::add(), oofem::FloatArray::beScaled(), oofem::BasicGeometry::giveVertex(), and Triangle().
Referenced by oofem::XfemStructuralElementInterface::XfemElementInterface_updateIntegrationRule().