Commit 858741a6 authored by incardon's avatar incardon

Fixing documentation + coverity error

parent 4cbdaaa7
......@@ -80,7 +80,9 @@ public:
}
// Default constructor
triplet() {};
triplet()
:row_(0),col_(0),val_(0)
{};
};
/*! \brief Sparse Matrix implementation, that map over Eigen
......
......@@ -234,7 +234,7 @@ public:
//! constructor from an epxression exp1 and a vector vd
vector_dist_expression_op(const exp1 & o1, const vector_type & vd)
:o1(o1), vd(vd)
:o1(o1),val(0),vd(vd)
{}
//! sum reduction require initialization where we calculate the reduction
......
......@@ -777,6 +777,7 @@ class petsc_solver<double>
solError err;
err.err_norm = norm / col;
err.err_inf = norm_inf;
err.its = 0;
return err;
}
......@@ -792,7 +793,7 @@ public:
}
petsc_solver()
:maxits(300)
:maxits(300),tmp(0)
{
initKSP();
......
......@@ -29,21 +29,29 @@
template<typename T>
class rval<T,EIGEN_RVAL>
{
// row
//! row
long int r;
// value
//! value
T val;
public:
// Get the row
/*! \brief Return the row index
*
* \return a reference to the row index
*
*/
long int & row()
{
return r;
}
// Get the value
/*! \brief Return the value
*
* \return a reference to the row value
*
*/
T & value()
{
return val;
......@@ -52,7 +60,9 @@ public:
/*! \brief Default constructor
*
*/
rval() {}
rval()
:r(0)
{}
/*! \brief Constructor from row, colum and value
*
......@@ -70,19 +80,22 @@ public:
template<typename T>
class Vector<T, EIGEN_BASE>
{
//! Eigen vector
mutable Eigen::Matrix<T, Eigen::Dynamic, 1> v;
// row value vector
//! row val vector
mutable openfpm::vector<rval<T,EIGEN_RVAL>> row_val;
//! row val vector received
mutable openfpm::vector<rval<T,EIGEN_RVAL>> row_val_recv;
// global to local map
//! global to local map
mutable std::unordered_map<size_t,size_t> map;
// invalid
//! invalid
T invalid;
// Processors from where we gather
//! Processors from where we gather
mutable openfpm::vector<size_t> prc;
//size of each chunk
......@@ -141,6 +154,7 @@ public:
*
*/
Vector(const Vector<T> & v)
:invalid(0)
{
this->operator=(v);
}
......@@ -151,6 +165,7 @@ public:
*
*/
Vector(const Vector<T> && v)
:invalid(0)
{
this->operator=(v);
}
......
......@@ -152,6 +152,7 @@ public:
*
*/
Vector(Vector<T,PETSC_BASE> && v)
:n_row(0),n_row_local(0),invalid(0)
{
this->operator=(v);
}
......@@ -173,7 +174,7 @@ public:
*
*/
Vector(size_t n, size_t n_row_local)
:n_row_local(n_row_local)
:n_row_local(n_row_local),invalid(0),v(NULL)
{
// Create the vector
PETSC_SAFE_CALL(VecCreate(PETSC_COMM_WORLD,&v));
......@@ -185,7 +186,7 @@ public:
*
*/
Vector()
:n_row(0),n_row_local(0)
:n_row(0),n_row_local(0),invalid(0)
{
// Create the vector
PETSC_SAFE_CALL(VecCreate(PETSC_COMM_WORLD,&v));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment