DOUG 0.2
Functions/Subroutines

SpMtx_util Module Reference

Functions/Subroutines

subroutine SpMtx_findRowElems (A, rows, inds)
 Find matrix elements for the given rows.
subroutine SpMtx_findColumnElems (A, cols, inds)
 Find matrix elements for the given columns.
subroutine SpMtx_findElems (A, x_inds, inds)
 Find matrix elements for the given rows and columns (matrix minor).
subroutine GetGivenRowsElements (A, nodes, indi, indj, val)
 This is similar to KeepGivenRowIndeces() which does not change the matrix, but returns 3 arrays instead.
subroutine GetGivenElements (A, nodes, indi, indj, val)
 This is similar to KeepGiven[Row,Column]Indeces(), but it does not change the matrix, and returns 3 arrays instead.
subroutine KeepGivenRowIndeces (A, inds, keepShape)
subroutine KeepGivenColumnIndeces (A, inds, keepShape)
integer SpMtx_findElem (A, i, j)
subroutine SpMtx_setVal (A, n, i, j, val)
subroutine SpMtx_printMat (M)
subroutine SpMtx_printMat_in_arrays (n, indi, indj, val)
subroutine SpMtx_printRaw (A, transp, startnz, endnz)
subroutine SpMtx_printInfo (S)
subroutine SpMtx_writeMatrix (A)
 Writes a SpMtx to a file determined by the control word dump_matrix_file.
subroutine SpMtx_writeLogicalValues (A, vals, fname)
 Write values (triple of row,column, value) to the file.

Function/Subroutine Documentation

subroutine SpMtx_util::GetGivenElements ( Type(SpMtx),intent(in)  A,
integer,dimension(:),intent(in)  nodes,
integer,dimension(:),pointer  indi,
integer,dimension(:),pointer  indj,
real(kind=rk),dimension(:),pointer  val 
)

This is similar to KeepGiven[Row,Column]Indeces(), but it does not change the matrix, and returns 3 arrays instead.

Definition at line 158 of file SpMtx_util.f90.

References SpMtx_findElems().

subroutine SpMtx_util::GetGivenRowsElements ( Type(SpMtx),intent(in)  A,
integer,dimension(:),intent(in)  nodes,
integer,dimension(:),pointer  indi,
integer,dimension(:),pointer  indj,
real(kind=rk),dimension(:),pointer  val 
)

This is similar to KeepGivenRowIndeces() which does not change the matrix, but returns 3 arrays instead.

Definition at line 139 of file SpMtx_util.f90.

References SpMtx_findRowElems().

subroutine SpMtx_util::KeepGivenColumnIndeces ( Type(SpMtx),intent(inout)  A,
integer,dimension(:),intent(in)  inds,
logical,intent(in)  keepShape 
)

Definition at line 232 of file SpMtx_util.f90.

References not.

subroutine SpMtx_util::KeepGivenRowIndeces ( Type(SpMtx),intent(inout)  A,
integer,dimension(:),intent(in)  inds,
logical,intent(in)  keepShape 
)

Definition at line 175 of file SpMtx_util.f90.

References not.

subroutine SpMtx_util::SpMtx_findColumnElems ( type(SpMtx),intent(in)  A,
integer,dimension(:),intent(in)  cols,
integer,dimension(:),pointer  inds 
)

Find matrix elements for the given columns.

It is responsibility of the caller to free inds array.

Parameters:
colsmatrix column numbers
indsfound matrix elements

Definition at line 71 of file SpMtx_util.f90.

integer SpMtx_util::SpMtx_findElem ( type(SpMtx),intent(in)  A,
integer,intent(in)  i,
integer,intent(in)  j 
)
subroutine SpMtx_util::SpMtx_findElems ( type(SpMtx),intent(in)  A,
integer,dimension(:),intent(in)  x_inds,
integer,dimension(:),pointer  inds 
)

Find matrix elements for the given rows and columns (matrix minor).

It is responsibility of the caller to free inds array.

Parameters:
x_indsmatrix row and column numbers
indsfound matrix elements

Definition at line 105 of file SpMtx_util.f90.

Referenced by GetGivenElements().

subroutine SpMtx_util::SpMtx_findRowElems ( type(SpMtx),intent(in)  A,
integer,dimension(:),intent(in)  rows,
integer,dimension(:),pointer  inds 
)

Find matrix elements for the given rows.

It is responsibility of the caller to free inds array.

Parameters:
rowsmatrix row numbers
indsfound matrix elements

Definition at line 37 of file SpMtx_util.f90.

Referenced by GetGivenRowsElements().

subroutine SpMtx_util::SpMtx_printInfo ( type(SpMtx),intent(in)  S)
subroutine SpMtx_util::SpMtx_printMat ( type(SpMtx)  M)
subroutine SpMtx_util::SpMtx_printMat_in_arrays ( integer  n,
integer,dimension(:)  indi,
integer,dimension(:)  indj,
real(kind=rk),dimension(:)  val 
)

Definition at line 364 of file SpMtx_util.f90.

References globals::stream.

subroutine SpMtx_util::SpMtx_printRaw ( type(SpMtx),intent(in)  A,
logical,optional  transp,
integer,optional  startnz,
integer,optional  endnz 
)
subroutine SpMtx_util::SpMtx_setVal ( type(SpMtx),intent(inout)  A,
integer,intent(in)  n,
integer,intent(in)  i,
integer,intent(in)  j,
real(kind=rk),intent(in)  val 
)

Definition at line 324 of file SpMtx_util.f90.

subroutine SpMtx_util::SpMtx_writeLogicalValues ( type(SpMtx)  A,
logical,dimension(:)  vals,
character(*)  fname 
)

Write values (triple of row,column, value) to the file.

Parameters:
AMatrix
valsValues to write to file (does not have to be matrix values)
fnameOutput file name.

Definition at line 515 of file SpMtx_util.f90.

References DOUG_utils::DOUG_abort(), and DOUG_utils::FindFreeIOUnit().

subroutine SpMtx_util::SpMtx_writeMatrix ( type(SpMtx),intent(in)  A)

Writes a SpMtx to a file determined by the control word dump_matrix_file.

Only writes local matrix, so if you want the whole matrix, make sure you are running on only one node.

Parameters:
Amatrix to be dumped to file

Definition at line 488 of file SpMtx_util.f90.

References DOUG_utils::DOUG_abort(), DOUG_utils::FindFreeIOUnit(), DOUG_utils::ismaster(), globals::mctls, and not.