00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 #ifndef SUNDANCECURVEINTEGRALCALC_HPP_
00009 #define SUNDANCECURVEINTEGRALCALC_HPP_
00010 
00011 #include "SundanceParametrizedCurve.hpp"
00012 #include "SundanceOut.hpp"
00013 #include "SundancePoint.hpp"
00014 #include "SundanceQuadratureFamily.hpp"
00015 #include "SundanceCellType.hpp"
00016 #include "SundanceMesh.hpp"
00017 
00018 namespace Sundance {
00019 
00020 
00021 class CurveIntegralCalc {
00022 public:
00023 
00024 
00025   CurveIntegralCalc();
00026 
00027   virtual ~CurveIntegralCalc() {;}
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038     static void getCurveQuadPoints(CellType  maxCellType ,
00039                                int maxCellLID ,
00040                                const Mesh& mesh ,
00041                    const ParametrizedCurve& paramCurve,
00042                    const QuadratureFamily& quad ,
00043                    Array<Point>& curvePoints ,
00044                    Array<Point>& curveDerivs ,
00045                    Array<Point>& curveNormals );
00046 
00047 
00048     static bool usePolygoneCurveQuadrature(
00049         const CellType& cellType ,
00050         const Mesh& mesh ,
00051         const ParametrizedCurve& paramCurve);
00052 
00053 
00054     static bool use3DSurfQuadrature(
00055         const CellType& cellType ,
00056         const Mesh& mesh ){
00057       if ( (mesh.cellType(mesh.spatialDim()) == BrickCell) && (cellType == BrickCell) ) { return true; }
00058       else {return false;}
00059     }
00060 
00061 private :
00062 
00063 
00064 
00065     static void getCurveQuadPoints_line(
00066                                    int  maxCellLID ,
00067                                    CellType  maxCellType ,
00068                                    const Mesh& mesh ,
00069                                    const Array<Point>& cellPoints,
00070                    const ParametrizedCurve& paramCurve,
00071                    const QuadratureFamily& quad ,
00072                    Array<Point>& curvePoints ,
00073                    Array<Point>& curveDerivs ,
00074                    Array<Point>& curveNormals );
00075 
00076 
00077     static void get3DRealCoordsOnSurf(const Point &refP ,
00078                                   const Array<Point>& cellPoints,
00079                                   const Array<int> &triangles ,
00080                                   const int nrTriag ,
00081                                   const Array<Point> edgeIntersectPoint,
00082                                   int &triagIndex ,
00083                                   Point &realPoint);
00084 
00085 
00086 
00087     static void getCurveQuadPoints_polygon(
00088                                    int  maxCellLID ,
00089                                    CellType  maxCellType ,
00090                                    const Mesh& mesh ,
00091                                    const Array<Point>& cellPoints,
00092                    const ParametrizedCurve& paramCurve,
00093                    const QuadratureFamily& quad ,
00094                    Array<Point>& curvePoints ,
00095                    Array<Point>& curveDerivs ,
00096                    Array<Point>& curveNormals );
00097 
00098 
00099 
00100     static void getSurfQuadPoints(
00101                                    int  maxCellLID ,
00102                                    CellType  maxCellType ,
00103                                    const Mesh& mesh ,
00104                                    const Array<Point>& cellPoints,
00105                    const ParametrizedCurve& paramCurve,
00106                    const QuadratureFamily& quad ,
00107                    Array<Point>& curvePoints ,
00108                    Array<Point>& curveDerivs ,
00109                    Array<Point>& curveNormals );
00110 };
00111 
00112 }
00113 
00114 #endif