26#ifndef OOMPH_VECTOR_MATRIX_HEADER
27#define OOMPH_VECTOR_MATRIX_HEADER
32#include <oomph-lib-config.h>
77 template<
class VALUE_TYPE>
128 err_msg <<
"The size of the inner vectors are not consistent.\n"
131 <<
"Vector_matrix[" <<
row_i <<
"] is "
164 err_msg <<
"The size of the inner vectors are not consistent.\n"
167 <<
"Vector_matrix[" <<
row_i <<
"] is "
176 if (this->
nrow() == 0)
214 for (
unsigned i = 0;
i <
n;
i++)
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
An OomphLibError object which should be thrown when an run-time error is encountered....
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
VectorMatrix is a generalised, STL-map-based, matrix based on a Vector of Vectors.
void build_vectors(const unsigned &n, const unsigned &m)
Builds an n by m VectorMatrix with default VALUE_TYPE.
void build_vectors_and_value(const unsigned &n, const unsigned &m, const VALUE_TYPE &val)
Build an m by n VectorMatrix with VALUE_TYPE val.
Vector< Vector< VALUE_TYPE > > Vector_matrix
Here's the generalised matrix structure: A Vector of Vector to templated by VALUE_TYPE.
const Vector< VALUE_TYPE > & operator[](const size_t i) const
[] access function to the i-th inner vector const version
void assign(const size_t &n, const size_t &m, const VALUE_TYPE &val)
Any elements held in the container before the call are destroyed and replaced by newly constructed el...
virtual ~VectorMatrix()
Default virtual destructor.
const unsigned ncol() const
return the number of columns. This is the size of the first inner vectors, or returns 0 if the outer ...
void resize(const size_t &n, const size_t &m, VALUE_TYPE val=VALUE_TYPE())
Resize the existing VectorMatrix. WARNING: This invokes the resize function in std::vector,...
const unsigned nrow() const
returns the number of rows. This is the outer Vector size.
VectorMatrix(const unsigned &n, const unsigned &m, const VALUE_TYPE &val)
Constructor - constructs an n by m matrix with value val.
void clear()
Clears the outer vector. Calling Vector::clear() will invoke the destructor of all the inner Vectors.
Vector< VALUE_TYPE > & operator[](const size_t i)
[] access function to the i-th inner vector.
VectorMatrix()
Default constructor - constructs an empty matrix.
VectorMatrix(const unsigned &n, const unsigned &m)
Constructor - constructs an n by m matrix, the value is defined by the default initialisation of VALU...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).