FEDEM Solver  R8.0
Source code of the dynamics solver
Data Types | Modules | Functions/Subroutines | Variables
diskMatrixModule.f90 File Reference

General rectangular matrix with disk storage. More...

Data Types

type  diskmatrixmodule::diskmatrixtype
 Data type representing a rectangular matrix with disk storage. More...
 

Modules

module  diskmatrixmodule
 Module for general rectangular matrices with disk storage,.
 

Functions/Subroutines

integer function diskmatrixmodule::dmgetswapsize (n1, n2, autoRamSizeRatio)
 Returns requested size of one swap section from command-line option. More...
 
subroutine diskmatrixmodule::dmnullify (this)
 Initializes a disk matrix object. More...
 
subroutine diskmatrixmodule::dmwrite (this, lpu, name)
 Writes out the content of a disk matrix. More...
 
subroutine diskmatrixmodule::dmopen (this, fileName, fileChkSum, nRows, nCols, status, err, nColSwap, swapSize, wantTag)
 Opens a disk matrix file for Read/Write or ReadOnly operations. More...
 
integer function adjustswapsize (nTot, nSwap)
 Adjusts the number of matrix columns in a swap section. More...
 
subroutine diskmatrixmodule::dmsetreadonly (this, err, isReadOnly)
 Toggles between Read/Write and ReadOnly. More...
 
integer(i8) function diskmatrixmodule::dmsize (this, iDim)
 Returns the size of the given disk matrix. More...
 
subroutine diskmatrixmodule::dmclose (this, err)
 Closes the disk matrix file and releases the associated swap array. More...
 
subroutine, private diskmatrixmodule::dmgetaddress (this, rInd, cInd, section, index, err)
 Gets swap section number and local array index for matrix element. More...
 
subroutine, private diskmatrixmodule::dmswap (this, newSection, err)
 Writes current section to disk and reads a new one into core. More...
 
subroutine, private diskmatrixmodule::dmsingledoublecast (this, ielSwap, nelSwap, toSingle)
 Casts the in-core matrix elements to/from single precision. More...
 
subroutine diskmatrixmodule::dmsetvalue (this, value, rInd, cInd, err)
 Assigns a value to a matrix element. More...
 
real(dp) function diskmatrixmodule::dmgetvalue (this, rInd, cInd, err)
 Returns the value of a matrix element. More...
 
real(dp) function, dimension(:,:), pointer diskmatrixmodule::dmgetswapsecptr (this, cInd, err)
 Returns a pointer to a matrix containing a swap section. More...
 
real(dp) function, dimension(:), pointer diskmatrixmodule::dmgetcolptr (this, cInd, err)
 Returns a pointer to column cInd of the given disk matrix. More...
 
subroutine diskmatrixmodule::dmgetcol (this, cInd, col, err)
 Gets a column of the given disk matrix. More...
 
subroutine diskmatrixmodule::dmgetrow (this, rInd, row, err)
 Gets a row of the given disk matrix. More...
 
subroutine diskmatrixmodule::dmmattimesvec (this, xVec, yVec, err, doInitialize)
 Multiplies a disk matrix with a given vector. More...
 
subroutine diskmatrixmodule::dmmattranstimesvec (this, xVec, yVec, err)
 Multiplies the transpose of a disk matrix with a given vector. More...
 
subroutine diskmatrixmodule::dmfindabsmaxrowvalues (this, maxRowVal, err)
 Finds the absolute maximum value for each row in a disk matrix. More...
 

Variables

integer, parameter diskmatrixmodule::dmold_p = 0
 ReadOnly matrix. More...
 
integer, parameter diskmatrixmodule::dmnsp_p = 1
 Write matrix in single precision. More...
 
integer, parameter diskmatrixmodule::dmndp_p = 2
 Write matrix in double precision. More...
 

Detailed Description

General rectangular matrix with disk storage.

Function/Subroutine Documentation

◆ adjustswapsize()

integer function dmopen::adjustswapsize ( integer, intent(in)  nTot,
integer, intent(in)  nSwap 
)

Adjusts the number of matrix columns in a swap section.

Parameters
[in]nTotTotal number of matrix columns
[in]nSwapNumber of swap sections
Returns
Number of columns in all swap sections, except for the last one

The number of columns is set such that the total number of columns in the matrix is nearly divisable by the number of swap columns, and such that the last swap section is as close in size as possisble to the other sections.