00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00038 #ifndef INTREPID_POINTTOOLS_HPP
00039 #define INTREPID_POINTTOOLS_HPP
00040
00041 #include "Shards_CellTopology.hpp"
00042 #include "Teuchos_TestForException.hpp"
00043 #include "Intrepid_Polylib.hpp"
00044 #include "Intrepid_FieldContainer.hpp"
00045 #include "Intrepid_CellTools.hpp"
00046 #include <stdexcept>
00047
00048 namespace Intrepid {
00049
00182 class PointTools {
00183 public:
00201 static int getLatticeSize( const shards::CellTopology& cellType ,
00202 const int order ,
00203 const int offset = 0 );
00204
00221 template<class Scalar, class ArrayType>
00222 static void getLattice( ArrayType &pts ,
00223 const shards::CellTopology& cellType ,
00224 const int order ,
00225 const int offset = 0 ,
00226 const EPointType pointType = POINTTYPE_EQUISPACED );
00227
00228 private:
00244 template<class Scalar, class ArrayTypeOut, class ArrayTypeIn1, class ArrayTypeIn2>
00245 static void cartToBaryTriangle( ArrayTypeOut & baryValues ,
00246 const ArrayTypeIn1 & cartValues ,
00247 const ArrayTypeIn2 & vertices );
00248
00249
00266 template<class Scalar, class ArrayTypeOut, class ArrayTypeIn1, class ArrayTypeIn2>
00267 static void baryToCartTriangle( ArrayTypeOut & cartValues ,
00268 const ArrayTypeIn1 & baryValues ,
00269 const ArrayTypeIn2 & vertices );
00270
00271
00288 template<class Scalar, class ArrayTypeOut, class ArrayTypeIn1, class ArrayTypeIn2>
00289 static void cartToBaryTetrahedron( ArrayTypeOut & baryValues ,
00290 const ArrayTypeIn1 & cartValues ,
00291 const ArrayTypeIn2 & vertices );
00292
00309 template<class Scalar, class ArrayTypeOut, class ArrayTypeIn1, class ArrayTypeIn2>
00310 static void baryToCartTetrahedron( ArrayTypeOut & cartValues ,
00311 const ArrayTypeIn1 & baryValues ,
00312 const ArrayTypeIn2 & vertices );
00313
00314
00330 template<class Scalar, class ArrayType>
00331 static void getEquispacedLattice( const shards::CellTopology& cellType ,
00332 ArrayType &points ,
00333 const int order ,
00334 const int offset = 0 );
00335
00336
00352 template<class Scalar, class ArrayType>
00353 static void getWarpBlendLattice( const shards::CellTopology& cellType ,
00354 ArrayType &points ,
00355 const int order ,
00356 const int offset = 0);
00357
00358
00373 template<class Scalar, class ArrayType>
00374 static void getEquispacedLatticeLine( ArrayType &points ,
00375 const int order ,
00376 const int offset = 0 );
00377
00392 template<class Scalar, class ArrayType>
00393 static void getEquispacedLatticeTriangle( ArrayType &points ,
00394 const int order ,
00395 const int offset = 0 );
00396
00411 template<class Scalar, class ArrayType>
00412 static void getEquispacedLatticeTetrahedron( ArrayType &points ,
00413 const int order ,
00414 const int offset = 0 );
00415
00430 template<class Scalar, class ArrayType>
00431 static void getWarpBlendLatticeLine( ArrayType &points ,
00432 const int order ,
00433 const int offset = 0 );
00434
00441 template<class Scalar, class ArrayType>
00442 static void warpFactor( const int order ,
00443 const ArrayType &xnodes ,
00444 const ArrayType &xout ,
00445 ArrayType &warp );
00446
00461 template<class Scalar, class ArrayType>
00462 static void getWarpBlendLatticeTriangle(ArrayType &points ,
00463 const int order ,
00464 const int offset = 0 );
00465
00479 template<class Scalar, class ArrayType>
00480 static void getWarpBlendLatticeTetrahedron( ArrayType &points ,
00481 const int order ,
00482 const int offset = 0 );
00483
00484
00495 template<class Scalar, class ArrayType>
00496 static void warpShiftFace3D( const int order ,
00497 const Scalar pval ,
00498 const ArrayType &L1,
00499 const ArrayType &L2,
00500 const ArrayType &L3,
00501 const ArrayType &L4,
00502 ArrayType &dxy);
00503
00513 template<class Scalar, class ArrayType>
00514 static void evalshift( const int order ,
00515 const Scalar pval ,
00516 const ArrayType &L1 ,
00517 const ArrayType &L2 ,
00518 const ArrayType &L3 ,
00519 ArrayType &dxy );
00520
00527 template<class Scalar, class ArrayType>
00528 static void evalwarp( ArrayType &warp ,
00529 const int order ,
00530 const ArrayType &xnodes ,
00531 const ArrayType &xout );
00532
00533
00534 };
00535
00536 }
00537
00538
00539 #include <Intrepid_PointToolsDef.hpp>
00540
00541 #endif