52 #define _IFT_Circle_Name "circle" 53 #define _IFT_Circle_radius "radius" 54 #define _IFT_Circle_center "center" 56 #define _IFT_Line_Name "line" 57 #define _IFT_Line_start "start" 58 #define _IFT_Line_end "end" 60 #define _IFT_PointSwarm_Name "pointswarm" // just temporary 61 #define _IFT_PointSwarm_nodeID "nodeid" 64 #define _IFT_PolygonLine_Name "polygonline" 65 #define _IFT_PolygonLine_points "points" 72 class DynamicInputRecord;
73 class oofegGraphicContext;
103 virtual void printVTK(
int iTStepIndex,
int iIndex) {};
107 virtual void computeNormalSignDist(
double &oDist,
const FloatArray &iPoint)
const = 0;
108 virtual void computeTangentialSignDist(
double &oDist,
const FloatArray &iPoint,
double &oMinDistArcPos)
const = 0;
110 virtual void giveSubPolygon(std :: vector< FloatArray > &oPoints,
const double &iXiStart,
const double &iXiEnd)
const {
OOFEM_ERROR(
"?"); }
114 virtual void giveTangent(
FloatArray &oTangent,
const double &iArcPosition)
const {printf(
"BasicGeometry::giveTangent() not implemented.\n");}
126 void setVertices(
const std::vector<FloatArray> &iVertices) {mVertices = iVertices;}
128 void removeDuplicatePoints(
const double &iTolSquare);
142 std :: string
errorInfo(
const char *func)
const {
return std :: string(giveClassName()) + func; }
198 virtual double computeDistanceTo(
const FloatArray *point);
203 double computeTangentialDistanceToEnd(
FloatArray *point);
205 virtual void computeTangentialSignDist(
double &oDist,
const FloatArray &iPoint,
double &oMinDistArcPos)
const;
208 virtual int computeNumberOfIntersectionPoints(
Element *element);
209 virtual void computeIntersectionPoints(
Element *element, std :: vector< FloatArray > &oIntersectionPoints);
210 double computeInclinationAngle();
211 void computeTransformationMatrix(
FloatMatrix &answer);
215 virtual bool intersects(
Element *element);
218 double giveLength()
const {
return mVertices[0].distance( mVertices[1] );}
233 void computeBarycentrCoor(
FloatArray &answer)
const;
234 double getRadiusOfCircumCircle();
235 void computeCenterOfCircumCircle(
FloatArray &answer)
const;
236 virtual void printYourself();
238 bool isOrientedAnticlockwise();
239 void changeToAnticlockwise();
246 bool pointIsInTriangle(
const FloatArray &iP)
const;
251 static void refineTriangle(std::vector<Triangle> &oRefinedTri,
const Triangle &iTri);
266 virtual void computeNormalSignDist(
double &oDist,
const FloatArray &iPoint)
const;
272 virtual void giveGlobalCoordinates(
FloatArray &oGlobalCoord,
const double &iArcPos)
const;
278 virtual bool intersects(
Element *element);
279 virtual void computeIntersectionPoints(
Element *element, std :: vector< FloatArray > &oIntersectionPoints);
280 virtual void computeIntersectionPoints(
Line *l, std :: vector< FloatArray > &oIntersectionPoints);
281 virtual int computeNumberOfIntersectionPoints(
Element *element);
283 virtual bool isInside(
Element *element);
285 virtual void printYourself();
289 virtual void giveBoundingSphere(
FloatArray &oCenter,
double &oRadius);
302 virtual void computeNormalSignDist(
double &oDist,
const FloatArray &iPoint)
const;
303 virtual void computeTangentialSignDist(
double &oDist,
const FloatArray &iPoint,
double &oMinDistArcPos)
const;
307 double computeLength()
const;
309 virtual void giveSubPolygon(std :: vector< FloatArray > &oPoints,
const double &iXiStart,
const double &iXiEnd)
const;
310 virtual void giveGlobalCoordinates(
FloatArray &oGlobalCoord,
const double &iArcPos)
const;
311 void giveNormal(
FloatArray &oNormal,
const double &iArcPosition)
const;
312 virtual void giveTangent(
FloatArray &oTangent,
const double &iArcPosition)
const;
318 #ifdef __BOOST_MODULE 319 virtual bool boundingBoxIntersects(
Element *element);
322 virtual bool intersects(
Element *element);
323 virtual void computeIntersectionPoints(
Element *element, std :: vector< FloatArray > &oIntersectionPoints);
324 virtual void computeIntersectionPoints(
Line *l, std :: vector< FloatArray > &oIntersectionPoints);
325 void computeIntersectionPoints(
const PolygonLine &iPolygonLine, std :: vector< FloatArray > &oIntersectionPoints)
const;
326 void computeIntersectionPoints(
const FloatArray &iXStart,
const FloatArray &iXEnd, std :: vector< FloatArray > &oIntersectionPoints)
const;
328 virtual int computeNumberOfIntersectionPoints(
Element *element);
330 virtual bool isInside(
Element *element);
333 #ifdef __BOOST_MODULE 334 virtual void calcBoundingBox(bPoint2 &oLC, bPoint2 &oUC);
337 virtual void printYourself();
340 virtual void printVTK(
int iTStepIndex,
int iLineIndex);
342 #ifdef __BOOST_MODULE 347 virtual bool giveTips(
TipInfo &oStartTipInfo,
TipInfo &oEndTipInfo)
const;
349 virtual void giveBoundingSphere(
FloatArray &oCenter,
double &oRadius);
355 void cropPolygon(
const double &iArcPosStart,
const double &iArcPosEnd);
virtual void giveInputRecord(DynamicInputRecord &input)
const FloatArray & giveVertex(int n) const
int giveNrVertices() const
Returns number of Geometry vertices.
void insertVertexBack(const FloatArray &iP)
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
virtual BasicGeometry * Clone()
TipInfo gathers useful information about a crack tip, like its position and tangent direction...
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
virtual void computeTangentialSignDist(double &oDist, const FloatArray &iPoint, double &oMinDistArcPos) const
Abstract base class for all finite elements.
virtual void computeLocalCoordinates(FloatArray &oLocCoord, const FloatArray &iPoint) const
virtual void printYourself()
virtual void giveGlobalCoordinates(FloatArray &oGlobalCoord, const double &iArcPos) const
virtual const char * giveClassName() const
Gives class name.
virtual BasicGeometry * Clone()
virtual void computeIntersectionPoints(Element *element, std::vector< FloatArray > &oIntersectionPoints)
Gives intersection points between this Geometry and Element.
virtual bool intersects(Element *element)
Checks whether an element is interacted, Element reference will be later replaced by Geometry...
Abstract representation of Geometry.
virtual BasicGeometry * Clone()
virtual void giveTangent(FloatArray &oTangent, const double &iArcPosition) const
Computes tangential direction at given local coordinate (arcPos)
virtual void computeTangentialSignDist(double &oDist, const FloatArray &iPoint, double &oMinDistArcPos) const
virtual void computeNormalSignDist(double &oDist, const FloatArray &iPoint) const
Functions for computing signed distance in normal and tangential direction.
virtual void computeTangentialSignDist(double &oDist, const FloatArray &iPoint, double &oMinDistArcPos) const
virtual double computeDistanceTo(const FloatArray *point)
Computes normal signed distance between this object and a point.
virtual bool isInside(Element *el)
virtual BasicGeometry * Clone()
virtual void giveBoundingSphere(FloatArray &oCenter, double &oRadius)
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes the Geometry from the InputRecord.
virtual void computeNormalSignDist(double &oDist, const FloatArray &iPoint) const
Functions for computing signed distance in normal and tangential direction.
virtual void giveTangent(FloatArray &oTangent, const double &iArcPosition) const
Computes tangential direction at given local coordinate (arcPos)
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the state of receiver from output stream.
std::vector< FloatArray > mVertices
List of geometry vertices.
void setVertices(const std::vector< FloatArray > &iVertices)
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores the state of receiver to output stream.
virtual void draw(oofegGraphicContext &gc)
virtual bool isOutside(BasicGeometry *bg)
virtual const char * giveClassName() const
Gives class name.
virtual int computeNumberOfIntersectionPoints(Element *element)
Gives number of intersection points of Geometry entity with an element, Element reference will be lat...
virtual BasicGeometry * Clone()
virtual void printVTK(int iTStepIndex, int iIndex)
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual int computeNumberOfIntersectionPoints(Element *element)
Gives number of intersection points of Geometry entity with an element, Element reference will be lat...
const double mTangSignDist
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
void insertVertexFront(const FloatArray &iP)
virtual bool giveTips(TipInfo &oStartTipInfo, TipInfo &oEndTipInfo) const
Returns start and end tip of the geometry, if applicable.
virtual void giveSubPolygon(std::vector< FloatArray > &oPoints, const double &iXiStart, const double &iXiEnd) const
double giveRadius() const
virtual const char * giveClassName() const
Gives class name.
the oofem namespace is to define a context or scope in which all oofem names are defined.
double giveLength() const
virtual void computeNormalSignDist(double &oDist, const FloatArray &iPoint) const
Computes tangential distance to a point.
std::string errorInfo(const char *func) const
virtual bool isInside(FloatArray &point)