SundanceCurveIntegralCalc.hpp
Go to the documentation of this file.
00001 /*
00002  * SundanceCurveIntagralCalc.hpp
00003  *
00004  *  Created on: Sep 2, 2010
00005  *      Author: benk
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 /** Class to compute the intersection/quadrature points of a cell with a curve in 2/3D */
00021 class CurveIntegralCalc {
00022 public:
00023 
00024   /** Empty Ctor*/
00025   CurveIntegralCalc();
00026 
00027   virtual ~CurveIntegralCalc() {;}
00028 
00029     /**
00030          [in]  maxCellType <br>
00031          [in]  const Array<Point>& cellPoints (the physical points of the cell) <br>
00032          [in]  paramCurve <br>
00033          [in]  Quadraturefamily , quadrature 1D for curve, or 2D for surface <br>
00034          [out] Array<Point>& curvePoints <br>
00035          [out] Array<Point>& curveDerivs  <br>
00036          [out] Array<Point>& curveNormals <br> */
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     /** this method shows if special methods for polygon can be used */
00048     static bool usePolygoneCurveQuadrature(
00049         const CellType& cellType ,
00050         const Mesh& mesh ,
00051         const ParametrizedCurve& paramCurve);
00052 
00053     /** test if we are in 3D for the Brick surface quadrature */
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     /** the simplest method which considers only the intersection points on the
00064      * facets, and inside the element we use */
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     /** projects the point from 2D surf to 3D points of the element (needed for surf integrals)*/
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     /** polygons in 1D curves, uses the information from the polygon */
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     /** special method for 3D surface quadrature similar to the one in getCurveQuadPoints_line ,
00099      * but it uses special Quadrature class, up to 4 triangles per brick cell*/
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 /* SUNDANCECURVEINTEGRALCALC_HPP_ */

Site Contact