DOUG 0.2
Data Types | Functions/Subroutines | Variables

SpMtx_class Module Reference

Data Types

type  SpMtx
 the central structire -- spase matrix: More...

Functions/Subroutines

type(SpMtxSpMtx_New ()
 Basic constructor.
type(SpMtxSpMtx_newInit (nnz, nblocks, nrows, ncols, symmstruct, symmnumeric, indi, indj, val, arrange_type, M_bound)
subroutine SpMtx_setMtxInnerBound (A, bound)
subroutine SpMtx_Resize (A, N)
 Resize matrix to N nonzeroes.
subroutine ReadInSparseAssembled (A, filename)
subroutine ReadInSparseAssembledHeader (filename, fHandler, n, nnz)
 Opens a file and reads first line of matrix in sparse form.
subroutine ReadInSparseAssembledHeader_TextBinary (filename, fHandler, n, nnz, binary)
 Opens a file and reads first line of matrix in sparse form.
subroutine ReadInSparseAssembledBulk (fHandler, A)
 Reads bulk of matrix in sparse form of already open file.
subroutine ReadInSparseAssembledBulk_TextBinary (fHandler, A, binary)
 Reads bulk of matrix in sparse form of already open file.
subroutine CloseSparseAssembledFile (fHandler)
 Reads bulk of matrix in sparse form of already open file.
subroutine SpMtx_Destroy (M)
Type(SpMtxSpMtx_Copy (IM)
 Function for coping sparse matrix.
type(SpMtxLaplSpMtx_New (N, special)
type(SpMtxorder_laplace_m (N)

Variables

integer, parameter D_SpMtx_ARRNG_NO = 0
integer, parameter D_SpMtx_ARRNG_ROWS = 1
integer, parameter D_SpMtx_ARRNG_COLS = 2
integer, parameter D_SpMtx_SHAPE_UNDEF = -1
integer, parameter D_SpMtx_SHAPE_SQUARE = 1
integer, parameter D_SpMtx_SHAPE_MOREROWS = 2
integer, parameter D_SpMtx_SHAPE_MORECOLS = 3
logical D_SpMtx_STRUCTURE_SYMM = .true.
integer, parameter D_SpMtx_SCALE_UNDEF = -1
integer, parameter D_SpMtx_SCALE_NO = 0
integer, parameter D_SpMtx_SCALE_DIAG = 1
integer, parameter D_SpMtx_SCALE_DIAG_FILTERED = 2
integer, parameter D_SpMtx_FORMAT_TEXT = 0
integer, parameter D_SpMtx_FORMAT_BINARY = 1
integer, parameter D_SpMtx_FORMAT_XDR = 2

Function/Subroutine Documentation

subroutine SpMtx_class::CloseSparseAssembledFile ( integer,intent(in)  fHandler)

Reads bulk of matrix in sparse form of already open file.

Definition at line 624 of file SpMtx_class.F90.

References D_SpMtx_FORMAT_BINARY, D_SpMtx_FORMAT_TEXT, D_SpMtx_FORMAT_XDR, DOUG_utils::DOUG_abort(), and globals::mctls.

Referenced by ReadInSparseAssembled().

type(SpMtx) SpMtx_class::LaplSpMtx_New ( integer,intent(in)  N,
logical,intent(in),optional  special 
)
----------------------------------------------------------
Laplace Matrix Constructor
    Arguments:
           N - block size of laplace matrix
     special - each element are uniqe or NOT (default)
    Result: Sparse Matrix (Laplace Matrix)
----------------------------------------------------------

Definition at line 709 of file SpMtx_class.F90.

References SpMtx_newInit().

Referenced by MatrixGen().

type(SpMtx) SpMtx_class::order_laplace_m ( integer,intent(in)  N)
----------------------------------------------------------
Another Laplace Matrix Constructor
    Arguments:
           N - block size of laplace matrix
     special - each element are uniqe or NOT (default)
    Result: Sparse Matrix (Laplace Matrix)
----------------------------------------------------------

Definition at line 797 of file SpMtx_class.F90.

References SpMtx_newInit().

subroutine SpMtx_class::ReadInSparseAssembled ( type(SpMtx),intent(inout)  A,
character*(*),intent(in)  filename 
)
 Reading in matix in assembled format from textfile:
 number_of_unknowns nnz
 i_1 j_1 val_1
 i_2 j_2 val_2
 . . . . . . . 
 i_nnz j_nnz val_nnz

Definition at line 410 of file SpMtx_class.F90.

References CloseSparseAssembledFile(), or(), ReadInSparseAssembledBulk(), ReadInSparseAssembledHeader(), globals::sctls, SpMtx_newInit(), and globals::stream.

Referenced by Distribution_assm_mod::parallelDistributeAssembledInput().

subroutine SpMtx_class::ReadInSparseAssembledBulk ( integer,intent(in)  fHandler,
type(SpMtx),intent(inout)  A 
)

Reads bulk of matrix in sparse form of already open file.

Definition at line 540 of file SpMtx_class.F90.

References D_SpMtx_FORMAT_BINARY, D_SpMtx_FORMAT_TEXT, D_SpMtx_FORMAT_XDR, DOUG_utils::DOUG_abort(), globals::mctls, and ReadInSparseAssembledBulk_TextBinary().

Referenced by ReadInSparseAssembled().

subroutine SpMtx_class::ReadInSparseAssembledBulk_TextBinary ( integer,intent(in)  fHandler,
type(SpMtx),intent(inout)  A,
logical,intent(in)  binary 
)

Reads bulk of matrix in sparse form of already open file.

Definition at line 563 of file SpMtx_class.F90.

References DOUG_utils::DOUG_abort(), and RealKind::rk.

Referenced by ReadInSparseAssembledBulk().

subroutine SpMtx_class::ReadInSparseAssembledHeader ( character*(*),intent(in)  filename,
integer,intent(out)  fHandler,
integer,intent(out)  n,
integer,intent(out)  nnz 
)

Opens a file and reads first line of matrix in sparse form.

Definition at line 458 of file SpMtx_class.F90.

References D_SpMtx_FORMAT_BINARY, D_SpMtx_FORMAT_TEXT, D_SpMtx_FORMAT_XDR, DOUG_utils::DOUG_abort(), globals::mctls, and ReadInSparseAssembledHeader_TextBinary().

Referenced by ReadInSparseAssembled().

subroutine SpMtx_class::ReadInSparseAssembledHeader_TextBinary ( character*(*),intent(in)  filename,
integer,intent(out)  fHandler,
integer,intent(out)  n,
integer,intent(out)  nnz,
logical,intent(in)  binary 
)

Opens a file and reads first line of matrix in sparse form.

Definition at line 483 of file SpMtx_class.F90.

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

Referenced by ReadInSparseAssembledHeader().

Type(SpMtx) SpMtx_class::SpMtx_Copy ( Type(SpMtx),intent(in)  IM)

Function for coping sparse matrix.

Definition at line 680 of file SpMtx_class.F90.

References SpMtx_newInit().

Referenced by CoarseMtx_mod::CoarseMtxBuild(), and SpMtx_arrangement::SpMtx_SymmTest().

subroutine SpMtx_class::SpMtx_Destroy ( type(SpMtx),intent(inout)  M)
----------------------------------------------------------
Sparse Matrix destructor
    Arguments:
      Matrix - Sparse Matrix
----------------------------------------------------------

Definition at line 654 of file SpMtx_class.F90.

References D_SpMtx_ARRNG_NO.

Referenced by CoarseMtx_mod::CoarseMtxBuild(), genmat::genmat(), getsize::getsize(), CoarseMtx_mod::IntRestBuild(), and SpMtx_arrangement::SpMtx_SymmTest().

type(SpMtx) SpMtx_class::SpMtx_New ( )

Basic constructor.

Definition at line 152 of file SpMtx_class.F90.

References D_SpMtx_ARRNG_NO, and D_SpMtx_SHAPE_UNDEF.

Referenced by Distribution_base_mod::Distribution_New(), and SpMtx_newInit().

type(SpMtx) SpMtx_class::SpMtx_newInit ( integer,intent(in)  nnz,
integer,intent(in),optional  nblocks,
integer,intent(in),optional  nrows,
integer,intent(in),optional  ncols,
logical,intent(in),optional  symmstruct,
logical,intent(in),optional  symmnumeric,
integer,dimension(:),intent(in),optional  indi,
integer,dimension(:),intent(in),optional  indj,
float(kind=rk),dimension(:),intent(in),optional  val,
integer,intent(in),optional  arrange_type,
integer,dimension(:),intent(in),optional  M_bound 
)
subroutine SpMtx_class::SpMtx_Resize ( type(SpMtx),intent(inout)  A,
integer,intent(in)  N 
)

Resize matrix to N nonzeroes.

Definition at line 369 of file SpMtx_class.F90.

subroutine SpMtx_class::SpMtx_setMtxInnerBound ( type(SpMtx),intent(inout)  A,
integer,intent(in)  bound 
)
-----------------------------------------------
 Sets the value of the bound between inner and
 interface nodes in the matrix
  --------- ----------
 | interf. | interf./ |
 |         | inner    |
  ---------+----------
 | inner/  |^         |
 | interf. | inner    |
 |         |          |
  --------- ----------
 bound = nnz interf. +
         nnz inner/interf. +
         nnz interf./inner + 1
 So, 'bound' points to the first element in the
 inner subpart of sparse matrix.
-----------------------------------------------

Definition at line 360 of file SpMtx_class.F90.

Referenced by ElemMtxs_assemble::ElemMtxsAssembleContext_extractSpMtx().


Variable Documentation

integer,parameter SpMtx_class::D_SpMtx_ARRNG_COLS = 2
integer,parameter SpMtx_class::D_SpMtx_ARRNG_NO = 0
integer,parameter SpMtx_class::D_SpMtx_ARRNG_ROWS = 1
integer,parameter SpMtx_class::D_SpMtx_FORMAT_BINARY = 1
integer,parameter SpMtx_class::D_SpMtx_FORMAT_TEXT = 0
integer,parameter SpMtx_class::D_SpMtx_FORMAT_XDR = 2
integer,parameter SpMtx_class::D_SpMtx_SCALE_DIAG = 1

Definition at line 60 of file SpMtx_class.F90.

Referenced by SpMtx_arrangement::SpMtx_unscale().

integer,parameter SpMtx_class::D_SpMtx_SCALE_NO = 0
integer,parameter SpMtx_class::D_SpMtx_SCALE_UNDEF = -1
integer,parameter SpMtx_class::D_SpMtx_SHAPE_MORECOLS = 3

Definition at line 51 of file SpMtx_class.F90.

Referenced by SpMtx_newInit(), and SpMtx_util::SpMtx_printInfo().

integer,parameter SpMtx_class::D_SpMtx_SHAPE_MOREROWS = 2

Definition at line 50 of file SpMtx_class.F90.

Referenced by SpMtx_newInit(), and SpMtx_util::SpMtx_printInfo().

integer,parameter SpMtx_class::D_SpMtx_SHAPE_SQUARE = 1

Definition at line 49 of file SpMtx_class.F90.

Referenced by SpMtx_newInit(), and SpMtx_util::SpMtx_printInfo().

integer,parameter SpMtx_class::D_SpMtx_SHAPE_UNDEF = -1

Definition at line 48 of file SpMtx_class.F90.

Referenced by SpMtx_New(), and SpMtx_util::SpMtx_printInfo().

Definition at line 54 of file SpMtx_class.F90.