OpenCMISS-Iron Internal API Documentation
matrix_vector.f90 File Reference

This module contains all routines dealing with (non-distributed) matrix and vectors types. More...

Go to the source code of this file.

Data Types

interface  matrix_vector::matrix_all_values_set
 
interface  matrix_vector::matrix_data_get
 
interface  matrix_vector::matrix_values_add
 
interface  matrix_vector::matrix_values_get
 
interface  matrix_vector::matrix_values_set
 
interface  matrix_vector::vector_all_values_set
 
interface  matrix_vector::vector_data_get
 
interface  matrix_vector::vector_values_get
 
interface  matrix_vector::vector_values_set
 

Modules

module  matrix_vector
 This module contains all routines dealing with (non-distributed) matrix and vectors types.
 

Functions/Subroutines

subroutine matrix_vector::matrix_all_values_set_intg (MATRIX, VALUE, ERR, ERROR,)
 Sets all values in an integer matrix to the specified value. More...
 
subroutine matrix_vector::matrix_all_values_set_sp (MATRIX, VALUE, ERR, ERROR,)
 Sets all values in a single precision matrix to the specified value. More...
 
subroutine matrix_vector::matrix_all_values_set_dp (MATRIX, VALUE, ERR, ERROR,)
 Sets all values in a double precision matrix to the specified value. More...
 
subroutine matrix_vector::matrix_all_values_set_l (MATRIX, VALUE, ERR, ERROR,)
 Sets all values in a logical matrix to the specified value. More...
 
subroutine, public matrix_vector::matrix_create_finish (MATRIX, ERR, ERROR,)
 Finishes the creation a matrix. More...
 
subroutine, public matrix_vector::matrix_create_start (MATRIX, ERR, ERROR,)
 Starts the creation a matrix. More...
 
subroutine matrix_vector::matrix_data_get_intg (MATRIX, DATA, ERR, ERROR,)
 Returns a pointer to the data of an integer matrix. Note: the values can be used for read operations but a MATRIX_VALUES_SET call must be used to change any values. The pointer should not be deallocated. More...
 
subroutine matrix_vector::matrix_data_get_sp (MATRIX, DATA, ERR, ERROR,)
 Returns a pointer to the data of a single precision matrix. Note: the values can be used for read operations but aMATRIX_VALUES_SET call must be used to change any values. The pointer should not be deallocated. More...
 
subroutine matrix_vector::matrix_data_get_dp (MATRIX, DATA, ERR, ERROR,)
 Returns a pointer to the data of a double precision matrix. Note: the values can be used for read operations but a MATRIX_VALUES_SET call must be used to change any values. The pointer should not be deallocated. More...
 
subroutine matrix_vector::matrix_data_get_l (MATRIX, DATA, ERR, ERROR,)
 Returns a pointer to the data of a logical matrix. Note: the values can be used for read operations but a MATRIX_VALUES_SET call must be used to change any values. The pointer should not be deallocated. More...
 
subroutine, public matrix_vector::matrix_datatypeget (matrix, dataType, err, error,)
 Gets the data type of a matrix. More...
 
subroutine, public matrix_vector::matrix_data_type_set (MATRIX, DATA_TYPE, ERR, ERROR,)
 Sets/changes the data type of a matrix. More...
 
subroutine, public matrix_vector::matrix_destroy (MATRIX, ERR, ERROR,)
 Destroys a matrix. More...
 
subroutine, public matrix_vector::matrix_duplicate (MATRIX, NEW_MATRIX, ERR, ERROR,)
 Duplicates the matrix and returns a pointer to the duplicated matrix in NEWMATRIX. More...
 
subroutine matrix_vector::matrix_finalise (MATRIX, ERR, ERROR,)
 Finalises a matrix and deallocates all memory. More...
 
subroutine matrix_vector::matrix_initialise (MATRIX, ERR, ERROR,)
 Initialises a matrix. More...
 
subroutine, public matrix_vector::matrix_max_columns_per_row_get (MATRIX, MAX_COLUMNS_PER_ROW, ERR, ERROR,)
 Gets the maximum number of columns in each row of a distributed matrix. More...
 
subroutine, public matrix_vector::matrix_number_non_zeros_set (MATRIX, NUMBER_NON_ZEROS, ERR, ERROR,)
 Sets/changes the number of non zeros for a matrix. More...
 
subroutine, public matrix_vector::matrix_number_non_zeros_get (MATRIX, NUMBER_NON_ZEROS, ERR, ERROR,)
 Gets the number of non zeros for a matrix. More...
 
subroutine, public matrix_vector::matrix_linklist_set (MATRIX, LIST, ERR, ERROR,)
 Gets the maximum number of columns in each row of a distributed matrix. More...
 
subroutine, public matrix_vector::matrix_linklist_get (MATRIX, LIST, ERR, ERROR,)
 
subroutine, public matrix_vector::matrix_max_size_set (MATRIX, MAX_M, MAX_N, ERR, ERROR,)
 Sets/changes the maximum size of a matrix. More...
 
subroutine, public matrix_vector::matrix_output (ID, MATRIX, ERR, ERROR,)
 Sets/changes the size of a matrix. More...
 
subroutine, public matrix_vector::matrix_size_set (MATRIX, M, N, ERR, ERROR,)
 Sets/changes the size of a matrix. More...
 
subroutine, public matrix_vector::matrix_storage_location_find (MATRIX, I, J, LOCATION, ERR, ERROR,)
 Returns the storage location in the data array of a matrix that correponds to location I,J. If the location does not exist the routine returns zero. More...
 
subroutine matrix_vector::matrix_storage_locations_get (MATRIX, ROW_INDICES, COLUMN_INDICES, ERR, ERROR,)
 Gets the storage locations (sparsity pattern) of a matrix. More...
 
subroutine, public matrix_vector::matrix_storage_locations_set (MATRIX, ROW_INDICES, COLUMN_INDICES, ERR, ERROR,)
 Sets the storage locations (sparsity pattern) in a matrix to that specified by the row and column indices. More...
 
subroutine, public matrix_vector::matrix_storage_type_get (MATRIX, STORAGE_TYPE, ERR, ERROR,)
 Gets the storage type for a matrix. More...
 
subroutine, public matrix_vector::matrix_storage_type_set (MATRIX, STORAGE_TYPE, ERR, ERROR,)
 Sets/changes the storage type for a matrix. More...
 
subroutine matrix_vector::matrix_values_add_intg (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Adds values to an integer matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=MATRIX(I,J)+VALUE. More...
 
subroutine matrix_vector::matrix_values_add_intg1 (MATRIX, ROW_INDEX, COLUMN_INDEX, VALUE, ERR, ERROR,)
 Adds a value to an integer matrix at the location specified by the row and column index i.e., MATRIX(I,J)=MATRIX(I,J)+VALUE. More...
 
subroutine matrix_vector::matrix_values_add_intg2 (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Adds a matrix of values to an integer matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=MATRIX(I,J)+VALUE. More...
 
subroutine matrix_vector::matrix_values_add_sp (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Adds values to a single precision real matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=MATRIX(I,J)+VALUE. More...
 
subroutine matrix_vector::matrix_values_add_sp1 (MATRIX, ROW_INDEX, COLUMN_INDEX, VALUE, ERR, ERROR,)
 Adds a value to a single precision real matrix at the location specified by the row and column index i.e., MATRIX(I,J)=MATRIX(I,J)+VALUE. More...
 
subroutine matrix_vector::matrix_values_add_sp2 (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Adds a matrix of values to a single precision real matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=MATRIX(I,J)+VALUE. More...
 
subroutine matrix_vector::matrix_values_add_dp (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Adds values to a double precision real matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=MATRIX(I,J)+VALUE. More...
 
subroutine matrix_vector::matrix_values_add_dp1 (MATRIX, ROW_INDEX, COLUMN_INDEX, VALUE, ERR, ERROR,)
 Adds a value to a double precision real matrix at the location specified by the row and column index i.e., MATRIX(I,J)=MATRIX(I,J)+VALUE. More...
 
subroutine matrix_vector::matrix_values_add_dp2 (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Adds a matrix of values to a double precision real matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=MATRIX(I,J)+VALUE. More...
 
subroutine matrix_vector::matrix_values_add_l (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Adds values to a logical matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=MATRIX(I,J).OR.VALUE. More...
 
subroutine matrix_vector::matrix_values_add_l1 (MATRIX, ROW_INDEX, COLUMN_INDEX, VALUE, ERR, ERROR,)
 Adds a value to a logical matrix at the location specified by the row and column index i.e., MATRIX(I,J)=MATRIX(I,J).OR.VALUE. More...
 
subroutine matrix_vector::matrix_values_add_l2 (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Adds a matrix of values to a logical matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=MATRIX(I,J).OR.VALUE. More...
 
subroutine matrix_vector::matrix_values_get_intg (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Gets the values in an integer matrix at the location specified by the row and column indices i.e., VALUE=MATRIX(I,J) More...
 
subroutine matrix_vector::matrix_values_get_intg1 (MATRIX, ROW_INDEX, COLUMN_INDEX, VALUE, ERR, ERROR,)
 Gets a value in an integer matrix at the location specified by the row and column index i.e., VALUE=MATRIX(I,J) More...
 
subroutine matrix_vector::matrix_values_get_intg2 (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Gets the matrix of values in an integer matrix at the location specified by the row and column indices i.e., VALUE=MATRIX(I,J) More...
 
subroutine matrix_vector::matrix_values_get_sp (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Gets values in a single precision real matrix at the location specified by the row and column indices i.e., VALUE=MATRIX(I,J) More...
 
subroutine matrix_vector::matrix_values_get_sp1 (MATRIX, ROW_INDEX, COLUMN_INDEX, VALUE, ERR, ERROR,)
 Gets a value in a single precision real matrix at the location specified by the row and column index i.e., VALUE=MATRIX(I,J) More...
 
subroutine matrix_vector::matrix_values_get_sp2 (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Gets a matrix of values in a single precision real matrix at the location specified by the row and column indices i.e., VALUE=MATRIX(I,J) More...
 
subroutine matrix_vector::matrix_values_get_dp (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Gets values in a double precision real matrix at the location specified by the row and column indices i.e., VALUE=MATRIX(I,J) More...
 
subroutine matrix_vector::matrix_values_get_dp1 (MATRIX, ROW_INDEX, COLUMN_INDEX, VALUE, ERR, ERROR,)
 Gets a value in a double precision real matrix at the location specified by the row and column index i.e., VALUE=MATRIX(I,J) More...
 
subroutine matrix_vector::matrix_values_get_dp2 (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Gets a matrix of values in a double precision real matrix at the location specified by the row and column indices i.e., VALUE=MATRIX(I,J) More...
 
subroutine matrix_vector::matrix_values_get_l (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Gets values in a logical matrix at the location specified by the row and column indices i.e., VALUE=MATRIX(I,J) More...
 
subroutine matrix_vector::matrix_values_get_l1 (MATRIX, ROW_INDEX, COLUMN_INDEX, VALUE, ERR, ERROR,)
 Gets a value in a logical matrix at the location specified by the row and column index i.e., VALUE=MATRIX(I,J) More...
 
subroutine matrix_vector::matrix_values_get_l2 (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Gets a matrix of values in a logical matrix at the location specified by the row and column indices i.e., VALUE=MATRIX(I,J) More...
 
subroutine matrix_vector::matrix_values_set_intg (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Sets the values in an integer matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=VALUE. More...
 
subroutine matrix_vector::matrix_values_set_intg1 (MATRIX, ROW_INDEX, COLUMN_INDEX, VALUE, ERR, ERROR,)
 Sets a value in an integer matrix at the location specified by the row and column index i.e., MATRIX(I,J)=VALUE. More...
 
subroutine matrix_vector::matrix_values_set_intg2 (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Sets the matrix of values in an integer matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=VALUE. More...
 
subroutine matrix_vector::matrix_values_set_sp (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Sets the values in a single precision real matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=VALUE. More...
 
subroutine matrix_vector::matrix_values_set_sp1 (MATRIX, ROW_INDEX, COLUMN_INDEX, VALUE, ERR, ERROR,)
 Sets the value in a single precision real matrix at the location specified by the row and column index i.e., MATRIX(I,J)=VALUE. More...
 
subroutine matrix_vector::matrix_values_set_sp2 (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Sets the matrix of values in a single precision real matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=VALUE. More...
 
subroutine matrix_vector::matrix_values_set_dp (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Sets the values in a double precision real matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=VALUE. More...
 
subroutine matrix_vector::matrix_values_set_dp1 (MATRIX, ROW_INDEX, COLUMN_INDEX, VALUE, ERR, ERROR,)
 Sets a value in a double precision real matrix at the location specified by the row and column index i.e., MATRIX(I,J)=VALUE. More...
 
subroutine matrix_vector::matrix_values_set_dp2 (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Sets the matrix of values in a double precision real matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=VALUE. More...
 
subroutine matrix_vector::matrix_values_set_l (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Sets the values in a logical matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=VALUE. More...
 
subroutine matrix_vector::matrix_values_set_l1 (MATRIX, ROW_INDEX, COLUMN_INDEX, VALUE, ERR, ERROR,)
 Sets a value in a logical matrix at the location specified by the row and column index i.e., MATRIX(I,J)=VALUE. More...
 
subroutine matrix_vector::matrix_values_set_l2 (MATRIX, ROW_INDICES, COLUMN_INDICES, VALUES, ERR, ERROR,)
 Sets the matrix of values in a logical matrix at the location specified by the row and column indices i.e., MATRIX(I,J)=VALUE. More...
 
subroutine matrix_vector::vector_all_values_set_intg (VECTOR, VALUE, ERR, ERROR,)
 Sets all values in an integer vector to the specified value. More...
 
subroutine matrix_vector::vector_all_values_set_sp (VECTOR, VALUE, ERR, ERROR,)
 Sets all values in a single precision vector to the specified value. More...
 
subroutine matrix_vector::vector_all_values_set_dp (VECTOR, VALUE, ERR, ERROR,)
 Sets all values in a double precision vector to the specified value. More...
 
subroutine matrix_vector::vector_all_values_set_l (VECTOR, VALUE, ERR, ERROR,)
 Sets all values in a logical vector to the specified value. More...
 
subroutine, public matrix_vector::vector_create_finish (VECTOR, ERR, ERROR,)
 Finihses the creation of a vector. More...
 
subroutine, public matrix_vector::vector_create_start (VECTOR, ERR, ERROR,)
 Starts the creation a vector. More...
 
subroutine matrix_vector::vector_data_get_intg (VECTOR, DATA, ERR, ERROR,)
 Returns a pointer to the data of an integer vector. Note: the values can be used for read operations but a VECTOR_VALUES_SET call must be used to change any values. The pointer should not be deallocated. More...
 
subroutine matrix_vector::vector_data_get_sp (VECTOR, DATA, ERR, ERROR,)
 Returns a pointer to the data of a single precision vector. Note: the values can be used for read operations but a VECTOR_VALUES_SET call must be used to change any values. The pointer should not be deallocated. More...
 
subroutine matrix_vector::vector_data_get_dp (VECTOR, DATA, ERR, ERROR,)
 Returns a pointer to the data of a double precision vector. Note: the values can be used for read operations but a VECTOR_VALUES_SET call must be used to change any values. The pointer should not be deallocated. More...
 
subroutine matrix_vector::vector_data_get_l (VECTOR, DATA, ERR, ERROR,)
 Returns a pointer to the data of a logical vector. Note: the values can be used for read operations but a VECTOR_VALUES_SET call must be used to change any values. The pointer should not be deallocated. More...
 
subroutine, public matrix_vector::vector_datatypeget (vector, dataType, err, error,)
 Gets the data type of a vector. More...
 
subroutine, public matrix_vector::vector_data_type_set (VECTOR, DATA_TYPE, ERR, ERROR,)
 Sets/changes the data type of a vector. More...
 
subroutine, public matrix_vector::vector_destroy (VECTOR, ERR, ERROR,)
 Destroys a vector. More...
 
subroutine, public matrix_vector::vector_duplicate (VECTOR, NEW_VECTOR, ERR, ERROR,)
 Duplicates a vector structure and returns a pointer to the new vector in NEW_VECTOR. More...
 
subroutine matrix_vector::vector_finalise (VECTOR, ERR, ERROR,)
 Finalises a vector and deallocates all memory. More...
 
subroutine matrix_vector::vector_initialise (VECTOR, ERR, ERROR,)
 Initialises a vector. More...
 
subroutine, public matrix_vector::vector_size_set (VECTOR, N, ERR, ERROR,)
 Sets/changes the size of a vector. More...
 
subroutine matrix_vector::vector_values_get_intg (VECTOR, INDICES, VALUES, ERR, ERROR,)
 Gets the values in an integer vector at the indices specified. More...
 
subroutine matrix_vector::vector_values_get_intg1 (VECTOR, INDEX, VALUE, ERR, ERROR,)
 Gets a value in an integer vector at the location specified by the index. More...
 
subroutine matrix_vector::vector_values_get_sp (VECTOR, INDICES, VALUES, ERR, ERROR,)
 Gets the values in a single precision real vector at the indices specified. More...
 
subroutine matrix_vector::vector_values_get_sp1 (VECTOR, INDEX, VALUE, ERR, ERROR,)
 Gets a value in a single precision vector at the location specified by the index. More...
 
subroutine matrix_vector::vector_values_get_dp (VECTOR, INDICES, VALUES, ERR, ERROR,)
 Gets the values in a double precision real vector at the indices specified. More...
 
subroutine matrix_vector::vector_values_get_dp1 (VECTOR, INDEX, VALUE, ERR, ERROR,)
 Gets a value in a double precision vector at the location specified by the index. More...
 
subroutine matrix_vector::vector_values_get_l (VECTOR, INDICES, VALUES, ERR, ERROR,)
 Gets the values in a logical real vector at the indices specified. More...
 
subroutine matrix_vector::vector_values_get_l1 (VECTOR, INDEX, VALUE, ERR, ERROR,)
 Gets a value in a logical vector at the location specified by the index. More...
 
subroutine matrix_vector::vector_values_set_intg (VECTOR, INDICES, VALUES, ERR, ERROR,)
 Sets the values in an integer vector at the specified indices. More...
 
subroutine matrix_vector::vector_values_set_intg1 (VECTOR, INDEX, VALUE, ERR, ERROR,)
 Sets a value in an integer vector at the specified index. More...
 
subroutine matrix_vector::vector_values_set_sp (VECTOR, INDICES, VALUES, ERR, ERROR,)
 Sets the values in a single precision vector at the specified indices. More...
 
subroutine matrix_vector::vector_values_set_sp1 (VECTOR, INDEX, VALUE, ERR, ERROR,)
 Sets a value in a single precision vector at the specified index. More...
 
subroutine matrix_vector::vector_values_set_dp (VECTOR, INDICES, VALUES, ERR, ERROR,)
 Sets the values in a double precision vector at the specified indices. More...
 
subroutine matrix_vector::vector_values_set_dp1 (VECTOR, INDEX, VALUE, ERR, ERROR,)
 Sets a value in a double precision vector at the specified index. More...
 
subroutine matrix_vector::vector_values_set_l (VECTOR, INDICES, VALUES, ERR, ERROR,)
 Sets the values in a logical vector at the specified indices. More...
 
subroutine matrix_vector::vector_values_set_l1 (VECTOR, INDEX, VALUE, ERR, ERROR,)
 Sets a value in a logical vector at the specified index. More...
 

Variables

integer(intg), parameter, public matrix_vector::matrix_vector_intg_type =INTEGER_TYPE
 Integer matrix-vector data type. More...
 
integer(intg), parameter, public matrix_vector::matrix_vector_sp_type =SINGLE_REAL_TYPE
 Single precision real matrix-vector data type. More...
 
integer(intg), parameter, public matrix_vector::matrix_vector_dp_type =DOUBLE_REAL_TYPE
 Double precision real matrix-vector data type. More...
 
integer(intg), parameter, public matrix_vector::matrix_vector_l_type =LOGICAL_TYPE
 Logical matrix-vector data type. More...
 
integer(intg), parameter, public matrix_vector::matrix_block_storage_type =0
 Matrix block storage type. More...
 
integer(intg), parameter, public matrix_vector::matrix_diagonal_storage_type =1
 Matrix diagonal storage type. More...
 
integer(intg), parameter, public matrix_vector::matrix_column_major_storage_type =2
 Matrix column major storage type. More...
 
integer(intg), parameter, public matrix_vector::matrix_row_major_storage_type =3
 Matrix row major storage type. More...
 
integer(intg), parameter, public matrix_vector::matrix_compressed_row_storage_type =4
 Matrix compressed row storage type. More...
 
integer(intg), parameter, public matrix_vector::matrix_compressed_column_storage_type =5
 Matrix compressed column storage type. More...
 
integer(intg), parameter, public matrix_vector::matrix_row_column_storage_type =6
 Matrix row-column storage type. More...
 
integer(intg), parameter matrix_vector::bisectiontolinearsearchthreshold =10
 Threshold for transition from bisection to linear search. More...
 
integer(intg), save matrix_vector::matrix_vector_id =1
 

Detailed Description

This module contains all routines dealing with (non-distributed) matrix and vectors types.

Author
Chris Bradley

LICENSE

Version: MPL 1.1/GPL 2.0/LGPL 2.1

The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is OpenCMISS

The Initial Developer of the Original Code is University of Auckland, Auckland, New Zealand, the University of Oxford, Oxford, United Kingdom and King's College, London, United Kingdom. Portions created by the University of Auckland, the University of Oxford and King's College, London are Copyright (C) 2007-2010 by the University of Auckland, the University of Oxford and King's College, London. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL.

MATRIX STORAGE STRUCTURES

The matrix storage structures used are governed by the STORAGE parameter associated with the array. If STORAGE is MATRIX_BLOCK_STORAGE_TYPE the matrix is not sparse and the the non-sparse matrix dimension M is used to calculate the matrix storage locations. If storage is MATRIX_DIAGONAL_STORAGE_TYPE then only the matrix diagonal is stored. If storage is MATRIX_COLUMN_MAJOR_STORAGE_TYPE the matrix is not sparse and the non-sparse matrix dimension MAX_M (>=M) is used to calcualte the matrix storage locations. If storage is MATRIX_ROW_MAJOR_STORAGE_TYPE the matrix is not sparse and the non-sparse matrix dimension MAX_N (>=N) is used to calcualte the matrix storage locations. If STORAGE is MATRIX_COMPRESSED_ROW_STORAGE_TYPE the matrix has compressed row storage/sparsity (see below) and the sparsity structure arrays ROW_INDICES and COLUMN_INDICES are used for the storage location calculation. If STORAGE is MATRIX_COMPRESSED_COLUMN_STORAGE_TYPE the matrix has compressed column storage/sparsity (see below) and the sparsity structure arrays ROW_INDICES and COLUMN_INDICES are used for the storage location calculation. If STORAGE is MATRIX_ROW_COLUMN_STORAGE_TYPE the matrix has row column storage/sparsity (see below) and the sparsity structure arrays ROW_INDICES and COLUMN_INDICES are used for the storage location calculation.

COMPRESSED-ROW STORAGE:

  The storage structure scheme is based on storing a MxN matrix as a one dimensional array of length SIZE
  (=NUMBER_NON_ZEROS) (where NUMBER_NON_ZEROS=sxMxN, s is the sparsity of the array) that stores only the non-zero
  elements of the matrix. Two additional arrays ROW_INDICES and COLUMN_INDICES store the positions of the non-zero
  elements. ROW_INDICES is of length M+1 and COLUMN is of length NUMBER_NON_ZEROS. ROW_INDICES(i) stores the position
  in COLUMN_INDICES of  the start of row i. The M+1 position of ROW_INDICES stores the size of COLUMN_INDICES+1 i.e.,
  NUMBER_NON_ZEROS+1. The number of non-zero elements in row i can be found from ROW_INDICES(i+1)-ROW_INDICES(i).
  COLUMN_INDICES(nz) gives the column number for non-zero element nz. See also COMPRESSED-COLUMN storage.

  Example of the compressed-row storage scheme on a NxN matrix (N=6). Here the sparsity is 8/36 or 22%
      GX  1 2 3 4 5 6        
         ____________        DATA(nz)                        
       1| 0 A 0 B 0 0          A B C D E F G H  
       2| 0 0 C 0 0 0          
       3| 0 0 0 0 D E        ROW_INDICES(i)
       4| F 0 0 0 0 0          1 3 4 6 7 8 9
       5| 0 0 G 0 0 0        COLUMN_INDICES(i)  
       6| 0 0 0 0 0 H          2 4 3 5 6 1 3 6

COMPRESSED-COLUMN STORAGE:

  The storage structure scheme is based on storing a MxN matrix as a one dimensional array of length SIZE
  (=NUMBER_NON_ZEROS) (where NUMBER_NON_ZEROS=sxMxN, s is the sparsity of the array) that stores only the non-zero
  elements of the matrix. Two additional arrays ROW_INDICES and COLUMN_INDICES store the positions of the non-zero
  elements. ROW_INDICES is of length NUMBER_NON_ZEROS and COLUMN is of length N+1. COLUMN_INDICES(j) stores the position
  in ROW_INDICES of  the start of column j. The N+1 position of COLUMN_INDICES stores the size of ROW_INDICES+1 i.e.,
  NUMBER_NON_ZEROS+1. The number of non-zero elements in column j can be found from COLUMN_INDICES(j+1)-COLUMN_INDICES(j).
  ROW_INDICES(nz) gives the row number for non-zero element nz. See also COMPRESSED-ROW storage.

  Example of compressed-column storage scheme on a NxN matrix (N=6). Here the sparsity is 8/36 or 22%
      GX  1 2 3 4 5 6        
         ____________        DATA(nz)                        
       1| 0 A 0 B 0 0          F A C G B D E H  
       2| 0 0 C 0 0 0          
       3| 0 0 0 0 D E        ROW_INDICES(i)
       4| F 0 0 0 0 0          4 1 2 5 1 3 3 6
       5| 0 0 G 0 0 0        COLUMN_INDICES(i)  
       6| 0 0 0 0 0 H          1 2 3 5 6 7 9

ROW-COLUMN STORAGE:

  The storage structure scheme is based on storing a MxN matrix as a one dimensional array of length SIZE
  (=NUMBER_NON_ZEROS) (where NUMBER_NON_ZEROS=sxMxN, s is the sparsity of the array) that stores only the non-zero
  elements of the matrix. Two additional arrays ROW_INDICES and COLUMN_INDICES store the positions of the non-zero
  elements. Both ROW_INDICES and COLUMN_INDICES are of length NUMBER_NON_ZEROS. ROW_INDICES(nz) gives the row number for
  non-zero element nz and COLUMN_INDICES(nz) gives the column number for non-zero element nz.

  Example of row-column storage scheme on a NxN matrix (N=6). Here the sparsity is 8/36 or 22%
      GX  1 2 3 4 5 6        
         ____________        DATA(nz)                        
       1| 0 A 0 B 0 0          A B C D E F G H  
       2| 0 0 C 0 0 0          
       3| 0 0 0 0 D E        ROW_INDICES(i)
       4| F 0 0 0 0 0          1 1 2 3 3 4 5 6 
       5| 0 0 G 0 0 0        COLUMN_INDICES(i)  
       6| 0 0 0 0 0 H          2 4 3 5 6 1 3 6

Definition in file matrix_vector.f90.