OGS
|
Lis vector wrapper class.
Definition at line 28 of file LisVector.h.
#include <LisVector.h>
Public Types | |
using | IndexType = LIS_INT |
Public Member Functions | |
LisVector (std::size_t length) | |
LisVector (std::size_t length, double *data) | |
LisVector (LisVector const &src) | |
copy constructor More... | |
virtual | ~LisVector () |
std::size_t | size () const |
return a vector length More... | |
std::size_t | getRangeBegin () const |
return a start index of the active data range More... | |
std::size_t | getRangeEnd () const |
return an end index of the active data range More... | |
void | setZero () |
double | operator[] (IndexType rowId) const |
access entry More... | |
double | get (IndexType rowId) const |
get entry More... | |
void | set (IndexType rowId, double v) |
set entry More... | |
void | add (IndexType rowId, double v) |
add entry More... | |
void | write (const std::string &filename) const |
printout this equation for debugging More... | |
LIS_VECTOR & | getRawVector () |
return a raw Lis vector object More... | |
template<class T_SUBVEC > | |
void | add (const std::vector< IndexType > &pos, const T_SUBVEC &sub_vec) |
void | copyValues (std::vector< double > &u) const |
Copy vector values. More... | |
Private Attributes | |
LIS_VECTOR | vec_ |
using MathLib::LisVector::IndexType = LIS_INT |
Definition at line 31 of file LisVector.h.
|
explicit |
Constructor for initialization of the number of rows
length | number of rows |
Definition at line 21 of file LisVector.cpp.
References vec_.
MathLib::LisVector::LisVector | ( | std::size_t | length, |
double * | data | ||
) |
Constructor using the given raw data
length | the length of the vector |
data | the raw data |
Definition at line 27 of file LisVector.cpp.
References vec_.
MathLib::LisVector::LisVector | ( | LisVector const & | src | ) |
|
virtual |
Definition at line 41 of file LisVector.cpp.
References vec_.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
return a start index of the active data range
Definition at line 57 of file LisVector.h.
|
inline |
return an end index of the active data range
Definition at line 59 of file LisVector.h.
References size().
|
inline |
return a raw Lis vector object
Definition at line 90 of file LisVector.h.
References vec_.
Referenced by MathLib::LisLinearSolver::solve().
|
inline |
|
inline |
|
inline |
std::size_t MathLib::LisVector::size | ( | ) | const |
return a vector length
Definition at line 46 of file LisVector.cpp.
References MathLib::checkLisError(), and vec_.
Referenced by copyValues(), getRangeEnd(), and MathLib::EigenLisLinearSolver::solve().
void MathLib::LisVector::write | ( | const std::string & | filename | ) | const |
|
private |
Definition at line 110 of file LisVector.h.
Referenced by LisVector(), ~LisVector(), add(), copyValues(), get(), getRawVector(), set(), setZero(), size(), and write().