8#ifndef OPENFPM_NUMERICS_SRC_VECTOR_VECTOR_HPP_
9#define OPENFPM_NUMERICS_SRC_VECTOR_VECTOR_HPP_
12#include "util/linalgebra_lib.hpp"
20template<
typename T,
unsigned int impl>
29#include <Eigen/Sparse>
30#define DEFAULT_VECTOR = EIGEN_BASE
32#define DEFAULT_VECTOR = 0
38template<
typename T,
unsigned int impl DEFAULT_VECTOR >
56 {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;}
65 {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;}
74 {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;}
79 {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;}
89 {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;}
97 void resize(
size_t row,
size_t row_n) {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;}
105 void insert(
size_t i, T val) {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;}
114 inline T &
insert(
size_t i) {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;
return stub;}
121 inline const T &
insert(
size_t i)
const {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;
return stub;}
130 const T &
operator()(
size_t i)
const {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;
return stub;}
139 T &
operator()(
size_t i) {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;
return stub;}
144 void scatter() {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;}
151 void fromFile(std::string file) {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;}
161 Vector<T> &
operator=(
const Vector<T> & v) {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;
return *
this;}
170 Vector<T> &
operator=(
Vector<T> && v) {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;
return *
this;}
177 int &
getVec() {std::cerr << __FILE__ <<
":" << __LINE__ <<
" Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;
return stub_i;}
181#include "Vector_eigen.hpp"
185#include "Vector_petsc.hpp"
Sparse Matrix implementation stub object when OpenFPM is compiled with no linear algebra support.
Vector(const Vector< T > &v)
stub copy constructor
void fromFile(std::string file)
fromFile
int & getVec()
stub getVec
Vector(Vector< T > &&v)
stub copy constructor
const T & insert(size_t i) const
stub insert
const T & operator()(size_t i) const
stub
void resize(size_t row, size_t row_n)
stub resize
Vector< T > & operator=(Vector< T > &&v)
stub operator=
Vector(size_t n)
stub constructor from number of rows
T & operator()(size_t i)
stub
void insert(size_t i, T val)
stub insert
Vector()
stub default constructor
Vector(size_t n, size_t n_row_local)
stub constructor
Vector< T > & operator=(const Vector< T > &v)
stub operator=
T & insert(size_t i)
stub insert
It store one row value of a vector.