Classes | |
class | const_iterator |
struct | Entry |
class | ExcEntryAllocationFailure |
class | ExcInvalidEntry |
class | ExcNoDiagonal |
struct | RowInfo |
Public Types | |
typedef number | value_type |
Public Member Functions | |
SparseMatrixEZ () | |
SparseMatrixEZ (const SparseMatrixEZ &) | |
SparseMatrixEZ (const unsigned int n_rows, const unsigned int n_columns, const unsigned int default_row_length=0, const unsigned int default_increment=1) | |
~SparseMatrixEZ () | |
SparseMatrixEZ< number > & | operator= (const SparseMatrixEZ< number > &) |
SparseMatrixEZ< number > & | operator= (const double d) |
void | reinit (const unsigned int n_rows, const unsigned int n_columns, unsigned int default_row_length=0, unsigned int default_increment=1, unsigned int reserve=0) |
void | clear () |
bool | empty () const |
unsigned int | m () const |
unsigned int | n () const |
void | set (const unsigned int i, const unsigned int j, const number value) |
void | add (const unsigned int i, const unsigned int j, const number value) |
template<typename number2 > | |
void | add (const std::vector< unsigned int > &indices, const FullMatrix< number2 > &full_matrix, const bool elide_zero_values=true) |
template<typename number2 > | |
void | add (const std::vector< unsigned int > &row_indices, const std::vector< unsigned int > &col_indices, const FullMatrix< number2 > &full_matrix, const bool elide_zero_values=true) |
template<typename number2 > | |
void | add (const unsigned int row, const std::vector< unsigned int > &col_indices, const std::vector< number2 > &values, const bool elide_zero_values=true) |
template<typename number2 > | |
void | add (const unsigned int row, const unsigned int n_cols, const unsigned int *col_indices, const number2 *values, const bool elide_zero_values=true, const bool col_indices_are_sorted=false) |
template<class MATRIX > | |
SparseMatrixEZ< number > & | copy_from (const MATRIX &source) |
template<class MATRIX > | |
void | add (const number factor, const MATRIX &matrix) |
number | operator() (const unsigned int i, const unsigned int j) const |
number | el (const unsigned int i, const unsigned int j) const |
template<typename somenumber > | |
void | vmult (Vector< somenumber > &dst, const Vector< somenumber > &src) const |
template<typename somenumber > | |
void | Tvmult (Vector< somenumber > &dst, const Vector< somenumber > &src) const |
template<typename somenumber > | |
void | vmult_add (Vector< somenumber > &dst, const Vector< somenumber > &src) const |
template<typename somenumber > | |
void | Tvmult_add (Vector< somenumber > &dst, const Vector< somenumber > &src) const |
number | l2_norm () const |
template<typename somenumber > | |
void | precondition_Jacobi (Vector< somenumber > &dst, const Vector< somenumber > &src, const number omega=1.) const |
template<typename somenumber > | |
void | precondition_SSOR (Vector< somenumber > &dst, const Vector< somenumber > &src, const number om=1., const std::vector< unsigned int > &pos_right_of_diagonal=std::vector< unsigned int >()) const |
template<typename somenumber > | |
void | precondition_SOR (Vector< somenumber > &dst, const Vector< somenumber > &src, const number om=1.) const |
template<typename somenumber > | |
void | precondition_TSOR (Vector< somenumber > &dst, const Vector< somenumber > &src, const number om=1.) const |
template<class MATRIXA , class MATRIXB > | |
void | conjugate_add (const MATRIXA &A, const MATRIXB &B, const bool transpose=false) |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | begin (const unsigned int r) const |
const_iterator | end (const unsigned int r) const |
void | print (std::ostream &out) const |
void | print_formatted (std::ostream &out, const unsigned int precision=3, const bool scientific=true, const unsigned int width=0, const char *zero_string=" ", const double denominator=1.) const |
void | block_write (std::ostream &out) const |
void | block_read (std::istream &in) |
unsigned int | memory_consumption () const |
template<class STREAM > | |
void | print_statistics (STREAM &s, bool full=false) |
void | compute_statistics (unsigned int &used, unsigned int &allocated, unsigned int &reserved, std::vector< unsigned int > &used_by_line, const bool compute_by_line) const |
Private Member Functions | |
const Entry * | locate (const unsigned int row, const unsigned int col) const |
Entry * | locate (const unsigned int row, const unsigned int col) |
Entry * | allocate (const unsigned int row, const unsigned int col) |
template<typename somenumber > | |
void | threaded_vmult (Vector< somenumber > &dst, const Vector< somenumber > &src, const unsigned int begin_row, const unsigned int end_row) const |
template<typename somenumber > | |
void | threaded_matrix_norm_square (const Vector< somenumber > &v, const unsigned int begin_row, const unsigned int end_row, somenumber *partial_sum) const |
template<typename somenumber > | |
void | threaded_matrix_scalar_product (const Vector< somenumber > &u, const Vector< somenumber > &v, const unsigned int begin_row, const unsigned int end_row, somenumber *partial_sum) const |
Private Attributes | |
unsigned int | n_columns |
std::vector< RowInfo > | row_info |
std::vector< Entry > | data |
unsigned int | increment |
Instead of using a pre-assembled sparsity pattern, this matrix builds the pattern on the fly. Filling the matrix may consume more time as with SparseMatrix
, since large memory movements may be involved. To help optimizing things, an expected row-length may be provided to the constructor, as well as an increment size for rows.
The storage structure: like with the usual sparse matrix, it is attempted to store only non-zero elements. these are stored in a single data array data
. They are ordered by row and inside each row by column number. Each row is described by its starting point in the data array and its length. These are stored in the row_info
array, together with additional useful information.
Due to the structure, gaps may occur between rows. Whenever a new entry must be created, an attempt is made to use the gap in its row. If the gap is full, the row must be extended and all subsequent rows must be shifted backwards. This is a very expensive operation and should be avoided as much as possible.
This is, where the optimization parameters, provided to the constructor or to the function reinit
come in. default_row_length
is the amount of entries that will be allocated for each row on initialization (the actual length of the rows is still zero). This means, that default_row_length
entries can be added to this row without shifting other rows. If less entries are added, the additional memory will be wasted.
If the space for a row is not sufficient, then it is enlarged by default_increment
entries. This way, the subsequent rows are not shifted by single entries very often.
Finally, the default_reserve
allocates extra space at the end of the data array. This space is used whenever a row must be enlarged. Since std::vector
doubles the capacity everytime it must increase it, this value should allow for all the growth needed.
Suggested settings: default_row_length
should be the length of a typical row, for instance the size of the stencil in regular parts of the grid. Then, default_increment
may be the expected amount of entries added to the row by having one hanging node. This way, a good compromise between memory consumption and speed should be achieved. default_reserve
should then be an estimate for the number of hanging nodes times default_increment
.
Letting default_increment
zero causes an exception whenever a row overflows.
If the rows are expected to be filled more or less from first to last, using a default_row_length
of zero may not be such a bad idea.
The name of this matrix is in reverence to a publication of the Internal Revenue Service of the United States of America. I hope some other aliens will appreciate it. By the way, the suffix makes sense by pronouncing it the American way.
typedef number SparseMatrixEZ< number >::value_type |
Type of matrix entries. In analogy to the STL container classes.
SparseMatrixEZ< number >::SparseMatrixEZ | ( | ) |
Constructor. Initializes an empty matrix of dimension zero times zero.
SparseMatrixEZ< number >::SparseMatrixEZ | ( | const SparseMatrixEZ< number > & | ) |
Dummy copy constructor. This is here for use in containers. It may only be called for empty objects.
If you really want to copy a whole matrix, you can do so by using the copy_from
function.
SparseMatrixEZ< number >::SparseMatrixEZ | ( | const unsigned int | n_rows, | |
const unsigned int | n_columns, | |||
const unsigned int | default_row_length = 0 , |
|||
const unsigned int | default_increment = 1 | |||
) | [explicit] |
Constructor. Generates a matrix of the given size, ready to be filled. The optional parameters default_row_length
and default_increment
allow for preallocating memory. Providing these properly is essential for an efficient assembling of the matrix.
SparseMatrixEZ< number >::~SparseMatrixEZ | ( | ) |
Destructor. Free all memory, but do not release the memory of the sparsity structure.
SparseMatrixEZ<number>& SparseMatrixEZ< number >::operator= | ( | const SparseMatrixEZ< number > & | ) |
Pseudo operator only copying empty objects.
SparseMatrixEZ<number>& SparseMatrixEZ< number >::operator= | ( | const double | d | ) |
This operator assigns a scalar to a matrix. Since this does usually not make much sense (should we set all matrix entries to this value? Only the nonzero entries of the sparsity pattern?), this operation is only allowed if the actual value to be assigned is zero. This operator only exists to allow for the obvious notation matrix=0
, which sets all elements of the matrix to zero, but keep the sparsity pattern previously used.
void SparseMatrixEZ< number >::reinit | ( | const unsigned int | n_rows, | |
const unsigned int | n_columns, | |||
unsigned int | default_row_length = 0 , |
|||
unsigned int | default_increment = 1 , |
|||
unsigned int | reserve = 0 | |||
) |
Reinitialize the sparse matrix to the dimensions provided. The matrix will have no entries at this point. The optional parameters default_row_length
, default_increment
and reserve
allow for preallocating memory. Providing these properly is essential for an efficient assembling of the matrix.
Referenced by SparseMatrixEZ< number >::copy_from().
void SparseMatrixEZ< number >::clear | ( | ) |
Release all memory and return to a state just like after having called the default constructor. It also forgets its sparsity pattern.
bool SparseMatrixEZ< number >::empty | ( | ) | const |
Return whether the object is empty. It is empty if both dimensions are zero.
unsigned int SparseMatrixEZ< number >::m | ( | ) | const [inline] |
Return the dimension of the image space. To remember: the matrix is of dimension .
References SparseMatrixEZ< number >::row_info.
Referenced by SparseMatrixEZ< number >::add(), SparseMatrixEZ< number >::allocate(), SparseMatrixEZ< number >::begin(), SparseMatrixEZ< number >::end(), SparseMatrixEZ< number >::locate(), and SparseMatrixEZ< number >::set().
unsigned int SparseMatrixEZ< number >::n | ( | ) | const [inline] |
Return the dimension of the range space. To remember: the matrix is of dimension .
References SparseMatrixEZ< number >::n_columns.
Referenced by SparseMatrixEZ< number >::add(), SparseMatrixEZ< number >::allocate(), SparseMatrixEZ< number >::locate(), and SparseMatrixEZ< number >::set().
void SparseMatrixEZ< number >::set | ( | const unsigned int | i, | |
const unsigned int | j, | |||
const number | value | |||
) | [inline] |
Set the element (i,j)
to value
. Allocates the entry, if it does not exist and value
is non-zero. If value
is not a finite number an exception is thrown.
References SparseMatrixEZ< number >::allocate(), Assert, numbers::is_finite(), SparseMatrixEZ< number >::locate(), SparseMatrixEZ< number >::m(), SparseMatrixEZ< number >::n(), and SparseMatrixEZ< number >::Entry::value.
Referenced by BlockSparseMatrixEZ< Number >::set().
void SparseMatrixEZ< number >::add | ( | const unsigned int | i, | |
const unsigned int | j, | |||
const number | value | |||
) | [inline] |
Add value
to the element (i,j)
. Allocates the entry if it does not exist. Filters out zeroes automatically. If value
is not a finite number an exception is thrown.
References SparseMatrixEZ< number >::allocate(), Assert, numbers::is_finite(), SparseMatrixEZ< number >::m(), SparseMatrixEZ< number >::n(), and SparseMatrixEZ< number >::Entry::value.
Referenced by SparseMatrixEZ< number >::add(), BlockSparseMatrixEZ< Number >::add(), and SparseMatrixEZ< number >::conjugate_add().
void SparseMatrixEZ< number >::add | ( | const std::vector< unsigned int > & | indices, | |
const FullMatrix< number2 > & | full_matrix, | |||
const bool | elide_zero_values = true | |||
) | [inline] |
Add all elements given in a FullMatrix<double> into sparse matrix locations given by indices
. In other words, this function adds the elements in full_matrix
to the respective entries in calling matrix, using the local-to-global indexing specified by indices
for both the rows and the columns of the matrix. This function assumes a quadratic sparse matrix and a quadratic full_matrix, the usual situation in FE calculations.
The optional parameter elide_zero_values
can be used to specify whether zero values should be added anyway or these should be filtered away and only non-zero data is added. The default value is true
, i.e., zero values won't be added into the matrix.
References SparseMatrixEZ< number >::add().
void SparseMatrixEZ< number >::add | ( | const std::vector< unsigned int > & | row_indices, | |
const std::vector< unsigned int > & | col_indices, | |||
const FullMatrix< number2 > & | full_matrix, | |||
const bool | elide_zero_values = true | |||
) | [inline] |
Same function as before, but now including the possibility to use rectangular full_matrices and different local-to-global indexing on rows and columns, respectively.
References SparseMatrixEZ< number >::add().
void SparseMatrixEZ< number >::add | ( | const unsigned int | row, | |
const std::vector< unsigned int > & | col_indices, | |||
const std::vector< number2 > & | values, | |||
const bool | elide_zero_values = true | |||
) | [inline] |
Set several elements in the specified row of the matrix with column indices as given by col_indices
to the respective value.
The optional parameter elide_zero_values
can be used to specify whether zero values should be added anyway or these should be filtered away and only non-zero data is added. The default value is true
, i.e., zero values won't be added into the matrix.
References SparseMatrixEZ< number >::add().
void SparseMatrixEZ< number >::add | ( | const unsigned int | row, | |
const unsigned int | n_cols, | |||
const unsigned int * | col_indices, | |||
const number2 * | values, | |||
const bool | elide_zero_values = true , |
|||
const bool | col_indices_are_sorted = false | |||
) | [inline] |
Add an array of values given by values
in the given global matrix row at columns specified by col_indices in the sparse matrix.
The optional parameter elide_zero_values
can be used to specify whether zero values should be added anyway or these should be filtered away and only non-zero data is added. The default value is true
, i.e., zero values won't be added into the matrix.
References SparseMatrixEZ< number >::add().
SparseMatrixEZ< number > & SparseMatrixEZ< number >::copy_from | ( | const MATRIX & | source | ) | [inline] |
Copy the given matrix to this one. The operation throws an error if the sparsity patterns of the two involved matrices do not point to the same object, since in this case the copy operation is cheaper. Since this operation is notheless not for free, we do not make it available through operator =
, since this may lead to unwanted usage, e.g. in copy arguments to functions, which should really be arguments by reference.
The source matrix may be a matrix of arbitrary type, as long as its data type is convertible to the data type of this matrix.
The function returns a reference to this
.
References SparseMatrixEZ< number >::reinit().
void SparseMatrixEZ< number >::add | ( | const number | factor, | |
const MATRIX & | matrix | |||
) | [inline] |
Add matrix
scaled by factor
to this matrix.
The source matrix may be a matrix of arbitrary type, as long as its data type is convertible to the data type of this matrix and it has the standard const_iterator
.
References SparseMatrixEZ< number >::add(), Assert, SparseMatrixEZ< number >::m(), and SparseMatrixEZ< number >::n().
number SparseMatrixEZ< number >::operator() | ( | const unsigned int | i, | |
const unsigned int | j | |||
) | const [inline] |
Return the value of the entry (i,j). This may be an expensive operation and you should always take care where to call this function. In order to avoid abuse, this function throws an exception if the required element does not exist in the matrix.
In case you want a function that returns zero instead (for entries that are not in the sparsity pattern of the matrix), use the el
function.
References Assert, SparseMatrixEZ< number >::locate(), and SparseMatrixEZ< number >::Entry::value.
number SparseMatrixEZ< number >::el | ( | const unsigned int | i, | |
const unsigned int | j | |||
) | const [inline] |
Return the value of the entry (i,j). Returns zero for all non-existing entries.
References SparseMatrixEZ< number >::locate(), and SparseMatrixEZ< number >::Entry::value.
void SparseMatrixEZ< number >::vmult | ( | Vector< somenumber > & | dst, | |
const Vector< somenumber > & | src | |||
) | const [inline] |
Matrix-vector multiplication: let with
being this matrix.
void SparseMatrixEZ< number >::Tvmult | ( | Vector< somenumber > & | dst, | |
const Vector< somenumber > & | src | |||
) | const [inline] |
Matrix-vector multiplication: let with
being this matrix. This function does the same as
vmult
but takes the transposed matrix.
void SparseMatrixEZ< number >::vmult_add | ( | Vector< somenumber > & | dst, | |
const Vector< somenumber > & | src | |||
) | const [inline] |
Adding Matrix-vector multiplication. Add on
with
being this matrix.
Referenced by BlockSparseMatrixEZ< Number >::vmult(), and BlockSparseMatrixEZ< Number >::vmult_add().
void SparseMatrixEZ< number >::Tvmult_add | ( | Vector< somenumber > & | dst, | |
const Vector< somenumber > & | src | |||
) | const [inline] |
Adding Matrix-vector multiplication. Add to
with
being this matrix. This function does the same as
vmult_add
but takes the transposed matrix.
Referenced by BlockSparseMatrixEZ< Number >::Tvmult(), and BlockSparseMatrixEZ< Number >::Tvmult_add().
number SparseMatrixEZ< number >::l2_norm | ( | ) | const |
Frobenius-norm of the matrix.
void SparseMatrixEZ< number >::precondition_Jacobi | ( | Vector< somenumber > & | dst, | |
const Vector< somenumber > & | src, | |||
const number | omega = 1. | |||
) | const [inline] |
Apply the Jacobi preconditioner, which multiplies every element of the src
vector by the inverse of the respective diagonal element and multiplies the result with the damping factor omega
.
void SparseMatrixEZ< number >::precondition_SSOR | ( | Vector< somenumber > & | dst, | |
const Vector< somenumber > & | src, | |||
const number | om = 1. , |
|||
const std::vector< unsigned int > & | pos_right_of_diagonal = std::vector< unsigned int >() | |||
) | const [inline] |
Apply SSOR preconditioning to src
.
void SparseMatrixEZ< number >::precondition_SOR | ( | Vector< somenumber > & | dst, | |
const Vector< somenumber > & | src, | |||
const number | om = 1. | |||
) | const [inline] |
Apply SOR preconditioning matrix to src
. The result of this method is .
void SparseMatrixEZ< number >::precondition_TSOR | ( | Vector< somenumber > & | dst, | |
const Vector< somenumber > & | src, | |||
const number | om = 1. | |||
) | const [inline] |
Apply transpose SOR preconditioning matrix to src
. The result of this method is .
void SparseMatrixEZ< number >::conjugate_add | ( | const MATRIXA & | A, | |
const MATRIXB & | B, | |||
const bool | transpose = false | |||
) | [inline] |
Add the matrix A
conjugated by B
, that is, to this object. If the parameter
transpose
is true, compute .
This function requires that B
has a const_iterator
traversing all matrix entries and that A
has a function el(i,j)
for access to a specific entry.
References SparseMatrixEZ< number >::add().
SparseMatrixEZ< number >::const_iterator SparseMatrixEZ< number >::begin | ( | ) | const [inline] |
STL-like iterator with the first existing entry.
SparseMatrixEZ< number >::const_iterator SparseMatrixEZ< number >::end | ( | ) | const [inline] |
Final iterator.
References SparseMatrixEZ< number >::m().
Referenced by SparseMatrixEZ< number >::allocate(), and SparseMatrixEZ< number >::locate().
SparseMatrixEZ< number >::const_iterator SparseMatrixEZ< number >::begin | ( | const unsigned int | r | ) | const [inline] |
STL-like iterator with the first entry of row r
. If this row is empty, the result is end(r)
, which does NOT point into row r
..
References Assert, and SparseMatrixEZ< number >::m().
SparseMatrixEZ< number >::const_iterator SparseMatrixEZ< number >::end | ( | const unsigned int | r | ) | const [inline] |
Final iterator of row r
. The result may be different from end()
!
References Assert, and SparseMatrixEZ< number >::m().
void SparseMatrixEZ< number >::print | ( | std::ostream & | out | ) | const |
Print the matrix to the given stream, using the format (line,col) value
, i.e. one nonzero entry of the matrix per line.
void SparseMatrixEZ< number >::print_formatted | ( | std::ostream & | out, | |
const unsigned int | precision = 3 , |
|||
const bool | scientific = true , |
|||
const unsigned int | width = 0 , |
|||
const char * | zero_string = " " , |
|||
const double | denominator = 1. | |||
) | const |
Print the matrix in the usual format, i.e. as a matrix and not as a list of nonzero elements. For better readability, elements not in the matrix are displayed as empty space, while matrix elements which are explicitly set to zero are displayed as such.
The parameters allow for a flexible setting of the output format: precision
and scientific
are used to determine the number format, where scientific
= false
means fixed point notation. A zero entry for width
makes the function compute a width, but it may be changed to a positive value, if output is crude.
Additionally, a character for an empty value may be specified.
Finally, the whole matrix can be multiplied with a common denominator to produce more readable output, even integers.
This function may produce large amounts of output if applied to a large matrix!
void SparseMatrixEZ< number >::block_write | ( | std::ostream & | out | ) | const |
Write the data of this object in binary mode to a file.
Note that this binary format is platform dependent.
void SparseMatrixEZ< number >::block_read | ( | std::istream & | in | ) |
Read data that has previously been written by block_write
.
The object is resized on this operation, and all previous contents are lost.
A primitive form of error checking is performed which will recognize the bluntest attempts to interpret some data as a vector stored bitwise to a file, but not more.
unsigned int SparseMatrixEZ< number >::memory_consumption | ( | ) | const |
Determine an estimate for the memory consumption (in bytes) of this object.
void SparseMatrixEZ< number >::print_statistics | ( | STREAM & | s, | |
bool | full = false | |||
) | [inline] |
Print statistics. If full
is true
, prints a histogram of all existing row lengths and allocated row lengths. Otherwise, just the relation of allocated and used entries is shown.
References SparseMatrixEZ< number >::compute_statistics().
void SparseMatrixEZ< number >::compute_statistics | ( | unsigned int & | used, | |
unsigned int & | allocated, | |||
unsigned int & | reserved, | |||
std::vector< unsigned int > & | used_by_line, | |||
const bool | compute_by_line | |||
) | const |
Compute numbers of entries.
In the first three arguments, this function returns the number of entries used, allocated and reserved by this matrix.
If the final argument is true, the number of entries in each line is printed as well.
Referenced by SparseMatrixEZ< number >::print_statistics(), and BlockSparseMatrixEZ< Number >::print_statistics().
const SparseMatrixEZ< number >::Entry * SparseMatrixEZ< number >::locate | ( | const unsigned int | row, | |
const unsigned int | col | |||
) | const [inline, private] |
Find an entry and return a const pointer. Return a zero-pointer if the entry does not exist.
References SparseMatrixEZ< number >::locate().
Referenced by SparseMatrixEZ< number >::el(), SparseMatrixEZ< number >::locate(), SparseMatrixEZ< number >::operator()(), and SparseMatrixEZ< number >::set().
SparseMatrixEZ< number >::Entry * SparseMatrixEZ< number >::locate | ( | const unsigned int | row, | |
const unsigned int | col | |||
) | [inline, private] |
Find an entry and return a writable pointer. Return a zero-pointer if the entry does not exist.
References Assert, SparseMatrixEZ< number >::Entry::column, SparseMatrixEZ< number >::data, SparseMatrixEZ< number >::end(), SparseMatrixEZ< number >::Entry::invalid, SparseMatrixEZ< number >::RowInfo::length, SparseMatrixEZ< number >::m(), SparseMatrixEZ< number >::n(), SparseMatrixEZ< number >::row_info, and SparseMatrixEZ< number >::RowInfo::start.
SparseMatrixEZ< number >::Entry * SparseMatrixEZ< number >::allocate | ( | const unsigned int | row, | |
const unsigned int | col | |||
) | [inline, private] |
Find an entry or generate it.
References Assert, SparseMatrixEZ< number >::Entry::column, SparseMatrixEZ< number >::data, SparseMatrixEZ< number >::RowInfo::diagonal, SparseMatrixEZ< number >::end(), SparseMatrixEZ< number >::increment, SparseMatrixEZ< number >::Entry::invalid, SparseMatrixEZ< number >::RowInfo::invalid_diagonal, SparseMatrixEZ< number >::RowInfo::length, SparseMatrixEZ< number >::m(), SparseMatrixEZ< number >::n(), SparseMatrixEZ< number >::row_info, SparseMatrixEZ< number >::RowInfo::start, swap(), and SparseMatrixEZ< number >::Entry::value.
Referenced by SparseMatrixEZ< number >::add(), and SparseMatrixEZ< number >::set().
void SparseMatrixEZ< number >::threaded_vmult | ( | Vector< somenumber > & | dst, | |
const Vector< somenumber > & | src, | |||
const unsigned int | begin_row, | |||
const unsigned int | end_row | |||
) | const [inline, private] |
Version of vmult
which only performs its actions on the region defined by [begin_row,end_row)
. This function is called by vmult
in the case of enabled multithreading.
void SparseMatrixEZ< number >::threaded_matrix_norm_square | ( | const Vector< somenumber > & | v, | |
const unsigned int | begin_row, | |||
const unsigned int | end_row, | |||
somenumber * | partial_sum | |||
) | const [inline, private] |
Version of matrix_norm_square
which only performs its actions on the region defined by [begin_row,end_row)
. This function is called by matrix_norm_square
in the case of enabled multithreading.
void SparseMatrixEZ< number >::threaded_matrix_scalar_product | ( | const Vector< somenumber > & | u, | |
const Vector< somenumber > & | v, | |||
const unsigned int | begin_row, | |||
const unsigned int | end_row, | |||
somenumber * | partial_sum | |||
) | const [inline, private] |
Version of matrix_scalar_product
which only performs its actions on the region defined by [begin_row,end_row)
. This function is called by matrix_scalar_product
in the case of enabled multithreading.
unsigned int SparseMatrixEZ< number >::n_columns [private] |
Number of columns. This is used to check vector dimensions only.
Referenced by SparseMatrixEZ< number >::n().
std::vector<RowInfo> SparseMatrixEZ< number >::row_info [private] |
Info structure for each row.
Referenced by SparseMatrixEZ< number >::allocate(), SparseMatrixEZ< number >::locate(), and SparseMatrixEZ< number >::m().
std::vector<Entry> SparseMatrixEZ< number >::data [private] |
Data storage.
Referenced by SparseMatrixEZ< number >::allocate(), and SparseMatrixEZ< number >::locate().
unsigned int SparseMatrixEZ< number >::increment [private] |
Increment when a row grows.
Referenced by SparseMatrixEZ< number >::allocate().