#include <arrayofvecdouble.h>
Public Member Functions | |
ArrayOfVecDouble () | |
ArrayOfVecDouble (const std::vector< dealii::Point< 3 > > &dealpts) | |
ArrayOfVecDouble (const std::vector< dealii::Point< 2 > > &dealpts) | |
void | reinit (unsigned size, unsigned vector_size) |
void | getVecValues (unsigned i, VecDoubleRef *v) |
void | copyVecValues (unsigned i, VecDouble *v) const |
VecDouble | operator[] (Index i) const |
void | getComponent (VecDouble &v, unsigned cmp) |
operator Matrix & () | |
operator const Matrix & () const | |
double & | operator() (Index i, Index j) |
unsigned | size () const |
unsigned | vecs_size () const |
~ArrayOfVecDouble () | |
void | operator= (const std::vector< dealii::Point< 3 > > &dealpts) |
void | print () |
Private Attributes | |
Matrix | m_M |
Definition at line 10 of file arrayofvecdouble.h.
ArrayOfVecDouble::ArrayOfVecDouble | ( | ) | [inline] |
Definition at line 17 of file arrayofvecdouble.h.
ArrayOfVecDouble::ArrayOfVecDouble | ( | const std::vector< dealii::Point< 3 > > & | dealpts | ) | [inline] |
Definition at line 21 of file arrayofvecdouble.h.
00022 { 00023 this->operator=(dealpts); 00024 00025 }
ArrayOfVecDouble::ArrayOfVecDouble | ( | const std::vector< dealii::Point< 2 > > & | dealpts | ) | [inline] |
Definition at line 27 of file arrayofvecdouble.h.
00028 { 00029 if (dealpts.size()==0) 00030 { 00031 reinit(0,0); 00032 return; 00033 } 00034 reinit(dealpts.size(),2); 00035 for (unsigned i=0;i<dealpts.size();i++) 00036 { 00037 operator()(i,0)=dealpts[i][0]; 00038 operator()(i,1)=dealpts[i][1]; 00039 } 00040 00041 00042 }
ArrayOfVecDouble::~ArrayOfVecDouble | ( | ) | [inline] |
Definition at line 66 of file arrayofvecdouble.h.
void ArrayOfVecDouble::copyVecValues | ( | unsigned | i, | |
VecDouble * | v | |||
) | const |
Definition at line 22 of file arrayofvecdouble.cpp.
void ArrayOfVecDouble::getComponent | ( | VecDouble & | v, | |
unsigned | cmp | |||
) |
Given a fixed component it returns a VecDouble with the same size of the array of vectors containing for each index i the component cmp of the vector in the position ith of the ArrayOfVecDouble
v | To contain the component cmp of each vector in the ArrayOfVecDouble | |
cmp | The component |
Definition at line 49 of file arrayofvecdouble.cpp.
void ArrayOfVecDouble::getVecValues | ( | unsigned | i, | |
VecDoubleRef * | v | |||
) |
Get a VecDouble stored in this array.
i | Index in the array | |
v | The vector pointer to the vector that will reference the vector of doubles in the position i of the array Pre: Vector v must not be the owner of its own memory and has a size equal to the size of the VecDoubles in the array. |
Definition at line 15 of file arrayofvecdouble.cpp.
ArrayOfVecDouble::operator const Matrix & | ( | ) | const [inline] |
Definition at line 62 of file arrayofvecdouble.h.
00062 {return m_M;}
ArrayOfVecDouble::operator Matrix & | ( | ) | [inline] |
Definition at line 61 of file arrayofvecdouble.h.
00061 {return m_M;}
Definition at line 63 of file arrayofvecdouble.h.
00063 {return m_M(i,j);}
void ArrayOfVecDouble::operator= | ( | const std::vector< dealii::Point< 3 > > & | dealpts | ) | [inline] |
Definition at line 68 of file arrayofvecdouble.h.
00069 { 00070 if (dealpts.size()==0) 00071 { 00072 reinit(0,0); 00073 return; 00074 } 00075 reinit(dealpts.size(),3); 00076 for (unsigned i=0;i<dealpts.size();i++) 00077 { 00078 operator()(i,0)=dealpts[i][0]; 00079 operator()(i,1)=dealpts[i][1]; 00080 operator()(i,2)=dealpts[i][2]; 00081 } 00082 }
Definition at line 32 of file arrayofvecdouble.cpp.
00033 { 00034 VecDoubleRef ref(vecs_size()); 00035 const_cast<ArrayOfVecDouble*>(this)->getVecValues(i,&ref); 00036 return ref; 00037 }
void ArrayOfVecDouble::print | ( | ) | [inline] |
Definition at line 83 of file arrayofvecdouble.h.
00084 { 00085 m_M.print_formatted(std::cout); 00086 00087 }
void ArrayOfVecDouble::reinit | ( | unsigned | size, | |
unsigned | vector_size | |||
) | [inline] |
Definition at line 46 of file arrayofvecdouble.h.
unsigned ArrayOfVecDouble::size | ( | ) | const [inline] |
Definition at line 64 of file arrayofvecdouble.h.
00064 {return m_M.m();}
unsigned ArrayOfVecDouble::vecs_size | ( | ) | const [inline] |
Definition at line 65 of file arrayofvecdouble.h.
00065 {return m_M.n();}
Matrix ArrayOfVecDouble::m_M [private] |
Definition at line 13 of file arrayofvecdouble.h.