I have a sparse linear network problem, which I try to solve (2Dim). The dimension in maximum is going to be less than 100 000, so iterative
methods are not an alternative.
I have selacted to use the following CSR-format (in Fortran) for the sparse matrix:
CSR-format in use is:
type csr
integer, allocatable, dimension(:) :: ia ! pointer to each row
integer, allocatable, dimension(:) :: ja ! colum numbers
real, allocatable, dimension(:) :: val ! values
end type
The right hand matrix A= x*b is to be constructed with the following type of data (size is large.)
The data is describing connections between network buses:
branch ( 1, 3)
branch ( 5, 1)
branch ( 5, 3)
branch ( 6, 3)
branch ( 1,3)
branch (5, 2)
etc.
I have following the questions:
The target is to have a subroutine to handle this kind of input data, and consructing the output matrix A (in CSR-format), without doing
non-necessary search ( for every element in the row) to find the correct place to put the element in.
Also the duplicate branches must be regonized (to add the corresponding branch data (not shown here).
1) how to fill this type of matrix (in CSR-format) without doing any search for the correct place of every network element in a matrix row?
2) How to detect the parallel brances in a simple way?
Branches can be sorted before this task, but still there exist the problem to find the paraller branchess (in a fast way)?
wbr. JB
|