FEDEM Solver
R8.0
Source code of the dynamics solver
|
System matrix assembly extension module. More...
Data Types | |
type | sam8type |
Data type for 64-bit version of some integer arrays in sammodule::samtype. More... | |
Functions/Subroutines | |
subroutine, private | writemeqn (prefix, madof, meqn, lpu) |
Writes out the assigned equation numbers. More... | |
subroutine | casttoint8 (samData, ierr) |
Creates a 64-bit integer version of the SAM-arrays needed by SPR. More... | |
subroutine | csallocpointerarrays (samData, sysMat, matrixType, lpu, ierr, ipsw, cacheSize, needsFactorization, masterGSF) |
Initializes pointer arrays for the equation solvers. More... | |
subroutine | csrenumber (samData, sysMat, lpu, ierr) |
Performs nodal renumbering for the equation solver. More... | |
subroutine | cspreassemble (samData, sysMat, doSupelReduction, lpu, ierr, ipsw, meqnK) |
Performs pre-assembly for the given system matrix. More... | |
subroutine | cscreateeqpartition (is2orderedLast, samData, eqnStatus, ierr) |
Partitions the equation system into external and internal DOFs. More... | |
subroutine | csbeginassembly (sysMat, matName, lpu, ierr) |
Initializes the element assembly. More... | |
subroutine | csendassembly (sysMat, ierr) |
Finalizes the element assembly. More... | |
subroutine, private | csexpandelmat (elMat, expMat, mpmnpc, mmnpc, madof, iel, nedof, ierr) |
Expands an element matrix to comply with sammodule::samtype::madof. More... | |
subroutine | csaddelm (samData, iel, nedof, elMat, sysMat, ierr, sysRhs) |
Adds an element matrix into the system matrix. More... | |
subroutine | csaddem (samData, iel, nedof, elMat, sysMat, ierr, sysRhs, lpu, ipsw) |
Adds an element matrix into the system matrix. More... | |
subroutine | csadded (samData, iel, nedof, elMat, sysMat, ierr) |
Adds a diagonal element matrix into the system matrix. More... | |
subroutine | csaddev (samData, iel, nedof, eV, sysV, sysReac, ierr) |
Adds an element vector into a system vector. More... | |
subroutine | csaddnv (samData, inod, nodV, sysV, sysReac, ierr) |
Adds a nodal vector into a system vector. More... | |
subroutine | csextractelv (samData, iel, elV, sysV, nedof) |
Extracts an element vector from a system vector. More... | |
subroutine, private | csgetelmeq (MADOF, MEQN, MPMNPC, MMNPC, IPAR18, IEL, NEDOF, MEEN) |
Finds the matrix of element equation numbers for an element. More... | |
subroutine, private | cspreasssparse (samData, sparse, IERR) |
Calculates the system matrix sparsity pattern for an FE model. More... | |
Variables | |
type(sam8type), save, private | mysam |
64-bit integer version of SAM arrays More... | |
System matrix assembly extension module.
This module contains subroutines that administer the preprocessing steps of a linear system of equations, and the assembly of element matrices and associated right-hand-side vectors into system matrices and vectors. The module defines an interface between the FEDEM solver applications and the various linear algebra packages that are being used.
subroutine asmextensionmodule::casttoint8 | ( | type(samtype), intent(in), target | samData, |
integer, intent(out), optional | ierr | ||
) |
Creates a 64-bit integer version of the SAM-arrays needed by SPR.
[in] | samData | Data for managing system matrix assembly |
[out] | ierr | Error flag |
subroutine asmextensionmodule::csadded | ( | type(samtype), intent(in) | samData, |
integer, intent(in) | iel, | ||
integer, intent(in) | nedof, | ||
real(dp), dimension(:), intent(in) | elMat, | ||
type(sysmatrixtype), intent(inout) | sysMat, | ||
integer, intent(out) | ierr | ||
) |
Adds a diagonal element matrix into the system matrix.
[in] | samData | Data for managing system matrix assembly |
[in] | iel | Element index |
[in] | nedof | Number of DOFs in element |
[in] | elMat | The diagonal element matrix to add |
sysMat | The system matrix to add into | |
[out] | ierr | Error flag |
subroutine asmextensionmodule::csaddelm | ( | type(samtype), intent(in) | samData, |
integer, intent(in) | iel, | ||
integer, intent(in) | nedof, | ||
real(dp), dimension(nedof,nedof), intent(in) | elMat, | ||
type(sysmatrixtype), intent(inout) | sysMat, | ||
integer, intent(out) | ierr, | ||
real(dp), dimension(:), intent(inout), optional | sysRhs | ||
) |
Adds an element matrix into the system matrix.
[in] | samData | Data for managing system matrix assembly |
[in] | iel | Element index |
[in] | nedof | Number of DOFs in element |
[in] | elMat | The element matrix to add |
sysMat | The system matrix to add into | |
[out] | ierr | Error flag |
sysRhs | System right-hand-side vector |
This subroutine does the same as asmextensionmodule::csaddem, but uses assumed-size declaration of elMat instead. It should therefore be used if the calling subroutine declares elMat as a 2D array elMat(N,N), where N > nedof, and elMat(1:nedof,1:nedof) is passed as argument. Calling asmextensionmodule::csaddem directly will not work in this case.
Knut Morten Okstad
subroutine asmextensionmodule::csaddem | ( | type(samtype), intent(in) | samData, |
integer, intent(in) | iel, | ||
integer, intent(in) | nedof, | ||
real(dp), dimension(:,:), intent(in) | elMat, | ||
type(sysmatrixtype), intent(inout) | sysMat, | ||
integer, intent(out) | ierr, | ||
real(dp), dimension(:), intent(inout), optional, target | sysRhs, | ||
integer, intent(in), optional | lpu, | ||
integer, intent(in), optional | ipsw | ||
) |
Adds an element matrix into the system matrix.
[in] | samData | Data for managing system matrix assembly |
[in] | iel | Element index |
[in] | nedof | Number of DOFs in element |
[in] | elMat | The element matrix to add |
sysMat | The system matrix to add into | |
[out] | ierr | Error flag |
sysRhs | System right-hand-side vector | |
[in] | lpu | File unit number for debug print |
[in] | ipsw | Print switch |
subroutine asmextensionmodule::csaddev | ( | type(samtype), intent(in) | samData, |
integer, intent(in) | iel, | ||
integer, intent(in) | nedof, | ||
real(dp), dimension(:), intent(in) | eV, | ||
real(dp), dimension(:), intent(inout) | sysV, | ||
real(dp), dimension(:), intent(inout) | sysReac, | ||
integer, intent(out) | ierr | ||
) |
Adds an element vector into a system vector.
[in] | samData | Data for managing system matrix assembly |
[in] | iel | Element index |
[in] | nedof | Number of DOFs in element |
[in] | eV | The element vector to add |
sysV | The system vector to add into | |
sysReac | Vector of reaction forces | |
[out] | ierr | Error flag |
This subroutine takes into account free and dependent DOFs. Contributions from fixed or prescribed DOFs are added into sysReac.
subroutine asmextensionmodule::csaddnv | ( | type(samtype), intent(in) | samData, |
integer, intent(in) | inod, | ||
real(dp), dimension(:), intent(in) | nodV, | ||
real(dp), dimension(:), intent(inout) | sysV, | ||
real(dp), dimension(:), intent(inout) | sysReac, | ||
integer, intent(out) | ierr | ||
) |
Adds a nodal vector into a system vector.
[in] | samData | Data for managing system matrix assembly |
[in] | inod | Node index |
[in] | nodV | The nodal vector to add |
sysV | The system vector to add into | |
sysReac | Vector of reaction forces | |
[out] | ierr | Error flag |
This subroutine takes into account free and dependent DOFs. Contributions from fixed or prescribed DOFs are added into sysReac.
subroutine asmextensionmodule::csallocpointerarrays | ( | type(samtype), intent(inout), target | samData, |
type(sysmatrixtype), intent(out) | sysMat, | ||
integer, intent(in) | matrixType, | ||
integer, intent(in) | lpu, | ||
integer, intent(out) | ierr, | ||
integer, intent(in), optional | ipsw, | ||
integer, intent(in), optional | cacheSize, | ||
logical, intent(in), optional | needsFactorization, | ||
type(gsfstoragetype), optional, pointer | masterGSF | ||
) |
Initializes pointer arrays for the equation solvers.
samData | Data for managing system matrix assembly | |
[out] | sysMat | The system matrix to initialize data structure for |
[in] | matrixType | Type of system matrix data structure |
[in] | lpu | File unit number for res-file output |
[out] | ierr | Error flag |
[in] | ipsw | Print switch |
[in] | cacheSize | Sparse matricx cache size |
[in] | needsFactorization | If .true., this matrix will be factorized |
[in] | masterGSF | GSF data structure of sibling system matrix |
The symbolic assembly stage is also performed for the sparse matrix equation solvers.
subroutine asmextensionmodule::csbeginassembly | ( | type(sysmatrixtype), intent(inout) | sysMat, |
character(len=*), intent(in) | matName, | ||
integer, intent(in) | lpu, | ||
integer, intent(out) | ierr | ||
) |
Initializes the element assembly.
sysMat | The system matrix to initialize element assembly for | |
[in] | matName | Matrix name, used for storage requirement print |
[in] | lpu | File unit number for res-file output |
[out] | ierr | Error flag |
Knut Morten Okstad
subroutine asmextensionmodule::cscreateeqpartition | ( | logical, intent(in) | is2orderedLast, |
type(samtype), intent(inout) | samData, | ||
integer, dimension(:), intent(out) | eqnStatus, | ||
integer, intent(out) | ierr | ||
) |
Partitions the equation system into external and internal DOFs.
[in] | is2orderedLast | If .true., the status-2 DOFs are orered last |
samData | Data for managing system matrix assembly | |
[out] | eqnStatus | Status flags for the equations |
[out] | ierr | Error flag |
Knut Morten Okstad
subroutine asmextensionmodule::csendassembly | ( | type(sysmatrixtype), intent(inout) | sysMat, |
integer, intent(out) | ierr | ||
) |
Finalizes the element assembly.
sysMat | The system matrix to finalize element assembly for | |
[out] | ierr | Error flag |
Knut Morten Okstad
|
private |
Expands an element matrix to comply with sammodule::samtype::madof.
[in] | elMat | Element stiffness matrix as returned from element routine |
[out] | expMat | Expanded elemetn matrix |
[in] | mpmnpc | Matrix of pointers to MNPCs |
[in] | mmnpc | Matrix of nodal point correspondances |
[in] | madof | Matrix of accumulated DOFs |
[in] | iel | Element index |
[in] | nedof | Number of rows and columns in elMat |
[out] | ierr | Error flag |
The element matrix elMat is expanded such that it matches the number of DOFs per node as defined by the sam array MADOF.
Knut Morten Okstad
subroutine asmextensionmodule::csextractelv | ( | type(samtype), intent(in) | samData, |
integer, intent(in) | iel, | ||
real(dp), dimension(:), intent(out) | elV, | ||
real(dp), dimension(:), intent(in) | sysV, | ||
integer, intent(out), optional | nedof | ||
) |
Extracts an element vector from a system vector.
[in] | samData | Data for managing system matrix assembly |
[in] | iel | Element index |
[out] | elV | Extracted element vector. |
[in] | sysV | The system vector to extract from |
[out] | nedof | Total number of DOFs in element |
|
private |
Finds the matrix of element equation numbers for an element.
[in] | MADOF | Matrix of accumulated DOFs |
[in] | MEQN | Matrix of equation numbers |
[in] | MPMNPC | Matrix of pointers to MNPCs |
[in] | MMNPC | Matrix of nodal point correspondances |
[in] | IPAR18 | Value of mpar(18) |
[in] | IEL | Element index |
[out] | NEDOF | Total number of DOFs in element |
[out] | MEEN | Matrix of equation numbers associated with the element |
subroutine asmextensionmodule::cspreassemble | ( | type(samtype), intent(inout) | samData, |
type(sysmatrixtype), intent(inout) | sysMat, | ||
logical, intent(in) | doSupelReduction, | ||
integer, intent(in) | lpu, | ||
integer, intent(out) | ierr, | ||
integer, intent(in), optional | ipsw, | ||
integer, dimension(:), intent(in), optional | meqnK | ||
) |
Performs pre-assembly for the given system matrix.
samData | Data for managing system matrix assembly | |
sysMat | The system matrix to perform per-assembly for | |
[in] | doSupelReduction | If .true., we are doing superelement reduction |
[in] | lpu | File unit number for res-file output |
[out] | ierr | Error flag |
[in] | ipsw | Print switch |
[in] | meqnK | Matrix of equation numbers for system stiffness matrix |
|
private |
Calculates the system matrix sparsity pattern for an FE model.
[in] | samData | Data for managing system matrix assembly |
sparse | sparse Sparse data structure for the Pardiso equation solver | |
[out] | ierr | Error flag |
subroutine asmextensionmodule::csrenumber | ( | type(samtype), intent(inout) | samData, |
type(sysmatrixtype), intent(inout) | sysMat, | ||
integer, intent(in) | lpu, | ||
integer, intent(out) | ierr | ||
) |
Performs nodal renumbering for the equation solver.
samData | Data for managing system matrix assembly | |
sysMat | The system matrix to perform renumbering for | |
[in] | lpu | File unit number for res-file output |
[out] | ierr | Error flag |
|
private |
Writes out the assigned equation numbers.
[in] | prefix | Message prefix |
[in] | madof | Matrix of accumulated DOFs |
[in] | meqn | Matrix of equation numbers |
[in] | lpu | File unit number for res-file output |
|
private |
64-bit integer version of SAM arrays