TAPs 0.7.7.3
TAPsSparseVector_Matrix3x3.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsSparseVector_Matrix3x3.hpp
00003 ******************************************************************************/
00007 /******************************************************************************
00008 SUKITTI PUNAK   (12/22/2009)
00009 UPDATE          (04/10/2009)
00010 ******************************************************************************/
00011 #ifndef TAPs_SPARSE_VECTOR_MATRIX3X3_HPP
00012 #define TAPs_SPARSE_VECTOR_MATRIX3X3_HPP
00013 
00014 #include "../Core/TAPsStdLib.hpp"
00015 #include "TAPsSparseVector_Matrix3x3_ElementData.hpp"
00016 
00017 BEGIN_NAMESPACE_TAPs
00018 //=============================================================================
00019 template <typename T>
00020 class SparseVector_Matrix3x3 {
00021 //=============================================================================
00022 public:
00023     // Member Functions -------------------------------------------------------
00025     friend std::ostream & operator<< ( std::ostream &output, SparseVector_Matrix3x3<T> const &obj )
00026     {
00027         output << obj.StrInfo();
00028         return output;
00029     }
00030     //-------------------------------------------------------------------------
00032     SparseVector_Matrix3x3 ( unsigned int size = 0 );
00034     SparseVector_Matrix3x3 ( SparseVector_Matrix3x3<T> const &orig );
00036     virtual ~SparseVector_Matrix3x3 ();
00037     //-------------------------------------------------------------------------
00039     virtual std::string StrInfo () const;
00040     //-------------------------------------------------------------------------
00042     inline SparseVector_Matrix3x3<T> & operator= ( SparseVector_Matrix3x3<T> const &orig );
00043 
00047     inline void SetTo ( SparseVector_Matrix3x3<T> const &orig );
00048 
00049     //-------------------------------------------------------------------------
00050     // Operations
00051 
00054     inline Vector3<T> Mul (
00055         std::vector< Vector3<T> > const &V  // input: a dense vector
00056     ) const;
00057 
00060     //inline Vector3<T> MulForFEM_wFixedNodes (
00061     //  std::vector< Vector3<T> > const &V, // input: a dense vector
00062     //  std::vector< bool > const &Skip     //!< input: list of skipped rows
00063     //) const;
00064 
00069     inline void MulForSparseSymmetricMatrix ( 
00070         unsigned int r,                 // input: the row of the sparse matrix that this vector is
00071         std::vector< Vector3<T> > const &I, // input: a dense vector
00072         std::vector< Vector3<T> >       &O  // output: a dense vector
00073     ) const;
00074 
00076     inline bool Insert ( unsigned int index, Matrix3x3<T> const &M );
00077 
00081     inline void UpdateAdd ( unsigned int index, Matrix3x3<T> const &M );
00082 
00084     inline bool Remove ( unsigned int index );
00085 
00087     inline bool SetData ( unsigned int index, Matrix3x3<T> const &M );
00088 
00091     inline Matrix3x3<T> * ReturnMatrix3x3 ( unsigned int index );
00092 
00095     inline Matrix3x3<T> const * ReturnMatrix3x3 ( unsigned int index ) const;
00096 
00098     inline unsigned int NumOfElements () const;
00099 
00101     inline std::list< SparseVector_Matrix3x3_ElementData<T> > const &   RefToElements () const;
00103     inline std::list< SparseVector_Matrix3x3_ElementData<T> > &         RefToElements ();
00104 
00105     // Data Members -----------------------------------------------------------
00106 //=============================================================================
00107 protected:
00108     // Member Functions -------------------------------------------------------
00109     // Data Members -----------------------------------------------------------
00110     std::list< SparseVector_Matrix3x3_ElementData<T> >  m_List;     
00111 //=============================================================================
00112 private:
00113     // Member Functions -------------------------------------------------------
00114     // Data Members -----------------------------------------------------------
00115 //=============================================================================
00116 
00117 //=============================================================================
00118 }; // END CLASS SparseVector_Matrix3x3
00119 //=============================================================================
00120 END_NAMESPACE_TAPs
00121 //-----------------------------------------------------------------------------
00123 #include "TAPsSparseVector_Matrix3x3.cpp"
00124 
00126 // Include definition if TAPs_USE_EXPORT is not defined
00127 //#if !defined( TAPs_USE_EXPORT )
00128 //  #include "TAPsSparseVector_Matrix3x3.cpp"
00129 //#endif
00130 //-----------------------------------------------------------------------------
00131 #endif
00132 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00133 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines