OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::Triangle Class Reference

#include <geometry.h>

+ Inheritance diagram for oofem::Triangle:
+ Collaboration diagram for oofem::Triangle:

Public Member Functions

 Triangle (const FloatArray &iP1, const FloatArray &iP2, const FloatArray &iP3)
 
virtual ~Triangle ()
 
virtual BasicGeometryClone ()
 
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 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 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< FloatArraymVertices
 List of geometry vertices. More...
 

Detailed Description

Definition at line 221 of file geometry.h.

Constructor & Destructor Documentation

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().

virtual oofem::Triangle::~Triangle ( )
inlinevirtual

Definition at line 225 of file geometry.h.

Member Function Documentation

void oofem::Triangle::changeToAnticlockwise ( )

Definition at line 486 of file geometry.C.

References oofem::BasicGeometry::mVertices.

Referenced by oofem::Delaunay::triangulate().

virtual BasicGeometry* oofem::Triangle::Clone ( )
inlinevirtual

Implements oofem::BasicGeometry.

Definition at line 227 of file geometry.h.

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

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

virtual void oofem::Triangle::computeTangentialSignDist ( double &  oDist,
const FloatArray iPoint,
double &  oMinDistArcPos 
) const
inlinevirtual

Implements oofem::BasicGeometry.

Definition at line 230 of file geometry.h.

References OOFEM_ERROR.

double oofem::Triangle::getArea ( )
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 ( )
bool oofem::Triangle::pointIsInTriangle ( const FloatArray iP) const
void oofem::Triangle::printYourself ( )
virtual

Reimplemented from oofem::BasicGeometry.

Definition at line 459 of file geometry.C.

References oofem::BasicGeometry::mVertices.

void oofem::Triangle::refineTriangle ( std::vector< Triangle > &  oRefinedTri,
const Triangle iTri 
)
static

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:43 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011