PURPOSETo write a block of data to a FMS Matrix or Vector File
CALL FMSPUT (LUFMS, NROWS, NCOLS, IROW1, JCOL1, A(NROWS,NCOLS), LDA)
- LUFMS(25) = Integer array.
FMS Matrix File Attribute List or FMS Vector File Attribute List which defines the files where the data is to be stored.
- NROWS = Integer.
The number of rows to transfer.
- NCOLS = Integer.
The number of columns to transfer.
- IROW1 = Integer.
The starting global row where you want to place the block.
- JCOL1 = Integer.
The starting global column where you want to place the block.
- DATA(NROWS,NCOLS) = Real or Complex array.
This is the array of data you want to transfer to the file, in normal FORTRAN storage.
- LDA = Integer.
The leading dimension of the DATA array. This must be at least as big as NROWS.
FMS PARAMETERSThe following FMS Parameters are especially important to this routine:
|LOWASM||First changed equation for nonlinear assembly.|
|IOKIDS||Allow children to access a file|
DESCRIPTION:This subroutine provides write access to FMS Matrix and Vector files. The array DATA(NROWS,NCOLS) is transferred directly to the file LUFMS without buffering.
You then initialize FMSPUT to receive data by making one of the following calls:
|CALL FMSPUT||LUFMS contents|
Nonsymmetric matrix file
Symmetric matrix defined by terms in the upper triangle.
||Symmetric matrix defined by terms in the lower triangle.|
For symmetric matrices, you may either define the terms in the upper OR lower triangle, but not both. If you use the first form to initialize FMSPUT with IROW1=0, FMSPUT will only transfer terms in the upper triangle and diagonal. Any term in array DATA which falls in the lower triangle is ignored. If you use the second form to initialize FMSPUT with IROW1=1, FMSPUT will only transfer terms in the lower triangle and diagonal. Any term in array DATA which falls in the upper triangle is ignored.
FMS stores data in matrix files in a direction proceeding toward the diagonal. Therefore if your DATA array is not square, one of the options for defining symmetric matrix data will be more efficient than the other. If NROWS>NCOLS, it is more efficient to populate the upper triangle. If NCOLS>NROWS, it is more efficient to populate the lower triangle.
The second step is to call FMSPUT as many times as you want to define the data. FMS does not initialize the file to zero or check if all the data on the file is defined. It is your responsibility to define all the data.
The final step is to direct FMS to release any storage. This is accomplished by making the following call:
CALL FMSPUT (LUFMS, 0, 0, NUMEQ+1, 0, 0, 0)
where the value of IROW1=NUMEQ+1 is greater than the number of equations.
At this point the data has been transferred to the FMS file. For vector files and incore matrix files, the operation is complete. For disk-based matrix files, however, the data is not standard FMS file format. This conversion will happen automatically during matrix assembly/factoring when subroutine RSDAF, RNDAF, CHDAF, CSDAF ,CNDAF is called. When calling the assemble/factor subroutine, you specify this matrix file LUFMS as an input matrix file.
You may call FMSPUT from subroutines you are running in parallel (which you started by calls to FMSPAR). This can reduce the time required to fill the matrix and vector arrays. To use this feature, you must direct FMS to open the file LUFMS for access by multiple processes. Use the FMS Parameter IOKIDS before the call which opens file LUFMS. The first and last calls to FMSPUT, which are used for setup and completion, must be called by the parent process before and after the calls to FMSPAR respectively.