00001 #ifndef _MY_VecDouble_ 00002 #define _MY_VecDouble_ 00003 00004 #include "globals.h" 00005 #include <lac/sparse_matrix.h> 00006 #include <ostream> 00007 #include "matrix.h" 00008 class ArrayOfVecDouble; 00009 class VecIncBC; 00038 class VecDouble : public Vector<double> 00039 { 00040 friend class ArrayOfVecDouble; 00041 friend class VecIncBC; 00042 private: 00043 00044 protected: 00045 00046 bool m_owner; 00047 public: 00048 VecDouble(); 00049 VecDouble(const VecDouble& v); 00050 VecDouble(unsigned n); 00051 VecDouble(const Point<3> &p); 00052 VecDouble(const Point<2> &p); 00053 VecDouble(const Point<1> &p); 00054 VecDouble(const std::vector<double> &p); 00055 00056 00057 bool is_owner(){return m_owner;} 00058 void swap(VecDouble &v); 00059 void reinit(const unsigned int N,const bool fast=false); 00060 virtual void reinit(const VecDouble &V,const bool fast = false); 00061 VecDouble& operator=(const VecDouble &v); 00062 VecDouble& operator=(const Vector<double> &v); 00063 VecDouble& operator=(const BlockVector<double> &v); 00064 void operator=(double dd); 00065 void copyRow(unsigned row,Matrix &M); 00066 void getMinMaxValues(double *min,double *max) const; 00067 00068 void set(double d1,double d2); 00069 void setRef(double *p,unsigned size); 00070 void setRef(Vector<double> &v); 00071 00072 virtual ~VecDouble(); 00073 00074 00075 void term_mult(const VecDouble &v1,const VecDouble &v2); 00076 }; 00077 00078 std::ostream& operator<< (std::ostream & out,const VecDouble &v); 00079 00080 #endif