TAPs 0.7.7.3
TAPsHexBarycentricCoordsForVertexRef.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsHexBarycentricCoordsForVertexRef.hpp
00003 ******************************************************************************/
00014 // Grid layout (right-handed coordinates)
00015 //      ^ y
00016 //      |
00017 //      |
00018 //      0-----> x       x = column
00019 //     /                y = row
00020 //    /                 z = depth
00021 //   v z
00022 //       
00023 //       3---------2
00024 //      /|        /|
00025 //     / |  Pt   / |    Pt is inside the hexahedron
00026 //    7---------6  |
00027 //    |  0- - - | -1
00028 //    | /       | /
00029 //    |/        |/
00030 //    4---------5
00031 /******************************************************************************
00032 SUKITTI PUNAK   (01/08/2010)
00033 UPDATE          (09/28/2010)
00034 ******************************************************************************/
00035 #ifndef TAPs_HEX_BARY_COORDS_FOR_VERTEX_REF_HPP
00036 #define TAPs_HEX_BARY_COORDS_FOR_VERTEX_REF_HPP
00037 
00038 #include "TAPsBaseBarycentricCoordsForVertexRef.hpp"
00039 #include "../FEM/TAPsFEMHexahedron.hpp"
00040 
00041 BEGIN_NAMESPACE_TAPs
00042 //=============================================================================
00043 template <typename T, typename DATA>
00044 class HexBarycentricCoordsForVertexRef : public BaseBarycentricCoordsForVertexRef<T> {
00045 //=============================================================================
00046 public:
00047     // Member Functions -------------------------------------------------------
00049     friend std::ostream & operator<< ( std::ostream &output, HexBarycentricCoordsForVertexRef<T,DATA> const &obj )
00050     {
00051         output << obj.StrInfo();
00052         return output;
00053     }
00054     //-------------------------------------------------------------------------
00056     //HexBarycentricCoordsForVertexRef ();
00057     //-------------------------------------------------------------------------
00059     HexBarycentricCoordsForVertexRef ( 
00060         Vector3<T> & vertex,    
00061         unsigned int i, 
00062         unsigned int j, 
00063         unsigned int k, 
00064         T u,    
00065         T v,    
00066         T w     
00067     );
00068     //-------------------------------------------------------------------------
00070     HexBarycentricCoordsForVertexRef ( HexBarycentricCoordsForVertexRef<T,DATA> const & orig );
00071     //-------------------------------------------------------------------------
00073     virtual ~HexBarycentricCoordsForVertexRef ();
00074     //-------------------------------------------------------------------------
00075     HexBarycentricCoordsForVertexRef<T,DATA> & operator= ( HexBarycentricCoordsForVertexRef<T,DATA> const & orig );
00076     //-------------------------------------------------------------------------
00078     virtual std::string StrInfo () const;
00079 
00081     Vector3<unsigned int > const & RetGridLocations () const    { return m_locations; }
00083     Vector3<unsigned int> & RetGridLocations () { return m_locations; }
00085     void GetGridLocations ( unsigned int &i, unsigned int &j, unsigned int &k )
00086     { i = m_locations[0]; j = m_locations[1]; k = m_locations[2]; }
00087 
00089     FEM::Hexahedron<T> * const & RetHexahedron () const { return m_pHexahedron; }
00091     FEM::Hexahedron<T> * const & RetHexahedron () { return m_pHexahedron; }
00093     void SetPtrToHexahedron ( FEM::Hexahedron<T> * pHexa ) { m_pHexahedron = pHexa; }
00094 
00096     inline virtual void ComputeNewVertexLocation (
00097         T x0, T y0, T z0,
00098         T x1, T y1, T z1,
00099         T x2, T y2, T z2,
00100         T x3, T y3, T z3,
00101         T x4, T y4, T z4,
00102         T x5, T y5, T z5,
00103         T x6, T y6, T z6,
00104         T x7, T y7, T z7
00105     );
00106 
00108     inline virtual void ComputeNewVertexLocation ();
00109 
00112     inline virtual Vector3<T> GetNewVertexLocation () const;
00113 
00114     // Data Members -----------------------------------------------------------
00115 //=============================================================================
00116 protected:
00117     // Member Functions -------------------------------------------------------
00118     // Data Members -----------------------------------------------------------
00119     Vector3<DATA> m_locations;          
00120     FEM::Hexahedron<T> * m_pHexahedron; 
00121 //=============================================================================
00122 private:
00123     // Member Functions -------------------------------------------------------
00124     // Data Members -----------------------------------------------------------
00125 //=============================================================================
00126 }; // END CLASS HexBarycentricCoordsForVertexRef
00127 //=============================================================================
00128 END_NAMESPACE_TAPs
00129 //-----------------------------------------------------------------------------
00131 #include "TAPsHexBarycentricCoordsForVertexRef.cpp"
00132 
00134 // Include definition if TAPs_USE_EXPORT is not defined
00135 //#if !defined( TAPs_USE_EXPORT )
00136 //  #include "TAPsHexBarycentricCoordsForVertexRef.cpp"
00137 //#endif
00138 //-----------------------------------------------------------------------------
00139 #endif
00140 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00141 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines