FEDEM Solver  R8.0
Source code of the dynamics solver
Data Types | Functions/Subroutines | Variables
asmextensionmodule Module Reference

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...
 

Detailed Description

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.

Function/Subroutine Documentation

◆ casttoint8()

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.

Parameters
[in]samDataData for managing system matrix assembly
[out]ierrError flag
Author
Knut Morten Okstad
Date
24 May 2017
Here is the caller graph for this function:

◆ csadded()

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.

Parameters
[in]samDataData for managing system matrix assembly
[in]ielElement index
[in]nedofNumber of DOFs in element
[in]elMatThe diagonal element matrix to add
sysMatThe system matrix to add into
[out]ierrError flag
Author
Knut Morten Okstad
Date
Mar 2003
Here is the caller graph for this function:

◆ csaddelm()

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.

Parameters
[in]samDataData for managing system matrix assembly
[in]ielElement index
[in]nedofNumber of DOFs in element
[in]elMatThe element matrix to add
sysMatThe system matrix to add into
[out]ierrError flag
sysRhsSystem 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

Date
28 Oct 2002
Here is the caller graph for this function:

◆ csaddem()

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.

Parameters
[in]samDataData for managing system matrix assembly
[in]ielElement index
[in]nedofNumber of DOFs in element
[in]elMatThe element matrix to add
sysMatThe system matrix to add into
[out]ierrError flag
sysRhsSystem right-hand-side vector
[in]lpuFile unit number for debug print
[in]ipswPrint switch
Note
The argument elMat is here declared assumed-shape (KMO 21.10.02).
Author
Bjorn Haugen
Date
Sep 1998
Author
Knut Morten Okstad
Date
Mar 2003
Here is the caller graph for this function:

◆ csaddev()

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.

Parameters
[in]samDataData for managing system matrix assembly
[in]ielElement index
[in]nedofNumber of DOFs in element
[in]eVThe element vector to add
sysVThe system vector to add into
sysReacVector of reaction forces
[out]ierrError flag

This subroutine takes into account free and dependent DOFs. Contributions from fixed or prescribed DOFs are added into sysReac.

Author
Karl Erik Thoresen
Date
Dec 1998
Author
Knut Morten Okstad
Date
Oct 2005
Here is the caller graph for this function:

◆ csaddnv()

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.

Parameters
[in]samDataData for managing system matrix assembly
[in]inodNode index
[in]nodVThe nodal vector to add
sysVThe system vector to add into
sysReacVector of reaction forces
[out]ierrError flag

This subroutine takes into account free and dependent DOFs. Contributions from fixed or prescribed DOFs are added into sysReac.

Author
Knut Morten Okstad
Date
Oct 2005
Here is the caller graph for this function:

◆ csallocpointerarrays()

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.

Parameters
samDataData for managing system matrix assembly
[out]sysMatThe system matrix to initialize data structure for
[in]matrixTypeType of system matrix data structure
[in]lpuFile unit number for res-file output
[out]ierrError flag
[in]ipswPrint switch
[in]cacheSizeSparse matricx cache size
[in]needsFactorizationIf .true., this matrix will be factorized
[in]masterGSFGSF data structure of sibling system matrix

The symbolic assembly stage is also performed for the sparse matrix equation solvers.

Author
Bjorn Haugen
Date
Sep 1998
Author
Knut Morten Okstad
Date
Feb 2003
Here is the caller graph for this function:

◆ csbeginassembly()

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.

Parameters
sysMatThe system matrix to initialize element assembly for
[in]matNameMatrix name, used for storage requirement print
[in]lpuFile unit number for res-file output
[out]ierrError flag

Knut Morten Okstad

Date
8 Sep 2004
Here is the caller graph for this function:

◆ cscreateeqpartition()

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.

Parameters
[in]is2orderedLastIf .true., the status-2 DOFs are orered last
samDataData for managing system matrix assembly
[out]eqnStatusStatus flags for the equations
[out]ierrError flag

Knut Morten Okstad

Date
16 Jan 2003
Here is the caller graph for this function:

◆ csendassembly()

subroutine asmextensionmodule::csendassembly ( type(sysmatrixtype), intent(inout)  sysMat,
integer, intent(out)  ierr 
)

Finalizes the element assembly.

Parameters
sysMatThe system matrix to finalize element assembly for
[out]ierrError flag

Knut Morten Okstad

Date
8 Sep 2004
Here is the caller graph for this function:

◆ csexpandelmat()

subroutine, private asmextensionmodule::csexpandelmat ( real(dp), dimension(:,:), intent(in), target  elMat,
real(dp), dimension(:,:), pointer  expMat,
integer, dimension(:), intent(in)  mpmnpc,
integer, dimension(:), intent(in)  mmnpc,
integer, dimension(:), intent(in)  madof,
integer, intent(in)  iel,
integer, intent(in)  nedof,
integer, intent(out)  ierr 
)
private

Expands an element matrix to comply with sammodule::samtype::madof.

Parameters
[in]elMatElement stiffness matrix as returned from element routine
[out]expMatExpanded elemetn matrix
[in]mpmnpcMatrix of pointers to MNPCs
[in]mmnpcMatrix of nodal point correspondances
[in]madofMatrix of accumulated DOFs
[in]ielElement index
[in]nedofNumber of rows and columns in elMat
[out]ierrError 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

Date
2 Jun 2005
Here is the caller graph for this function:

◆ csextractelv()

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.

Parameters
[in]samDataData for managing system matrix assembly
[in]ielElement index
[out]elVExtracted element vector.
[in]sysVThe system vector to extract from
[out]nedofTotal number of DOFs in element
Author
Karl Erik Thoresen
Date
Dec 1998
Here is the caller graph for this function:

◆ csgetelmeq()

subroutine, private asmextensionmodule::csgetelmeq ( integer, dimension(:), intent(in)  MADOF,
integer, dimension(:), intent(in)  MEQN,
integer, dimension(:), intent(in)  MPMNPC,
integer, dimension(:), intent(in)  MMNPC,
integer, intent(in)  IPAR18,
integer, intent(in)  IEL,
integer, intent(out)  NEDOF,
integer, dimension(:), intent(out), optional  MEEN 
)
private

Finds the matrix of element equation numbers for an element.

Parameters
[in]MADOFMatrix of accumulated DOFs
[in]MEQNMatrix of equation numbers
[in]MPMNPCMatrix of pointers to MNPCs
[in]MMNPCMatrix of nodal point correspondances
[in]IPAR18Value of mpar(18)
[in]IELElement index
[out]NEDOFTotal number of DOFs in element
[out]MEENMatrix of equation numbers associated with the element
Author
Knut Morten Okstad
Date
12 Feb 2016
Here is the caller graph for this function:

◆ cspreassemble()

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.

Parameters
samDataData for managing system matrix assembly
sysMatThe system matrix to perform per-assembly for
[in]doSupelReductionIf .true., we are doing superelement reduction
[in]lpuFile unit number for res-file output
[out]ierrError flag
[in]ipswPrint switch
[in]meqnKMatrix of equation numbers for system stiffness matrix
Author
Bjorn Haugen
Date
Sep 1998
Author
Knut Morten Okstad
Date
Jan 2003
Here is the caller graph for this function:

◆ cspreasssparse()

subroutine, private asmextensionmodule::cspreasssparse ( type(samtype), intent(in)  samData,
type(pardisostoragetype), intent(inout)  sparse,
integer, intent(out)  IERR 
)
private

Calculates the system matrix sparsity pattern for an FE model.

Parameters
[in]samDataData for managing system matrix assembly
sparsesparse Sparse data structure for the Pardiso equation solver
[out]ierrError flag
Author
Knut Morten Okstad
Date
12 Feb 2016
Here is the caller graph for this function:

◆ csrenumber()

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.

Parameters
samDataData for managing system matrix assembly
sysMatThe system matrix to perform renumbering for
[in]lpuFile unit number for res-file output
[out]ierrError flag
Author
Bjorn Haugen
Date
Sep 1998
Author
Knut Morten Okstad
Date
Jan 2003
Here is the caller graph for this function:

◆ writemeqn()

subroutine, private asmextensionmodule::writemeqn ( character(len=*), intent(in)  prefix,
integer, dimension(:), intent(in)  madof,
integer, dimension(:), intent(in)  meqn,
integer, intent(in)  lpu 
)
private

Writes out the assigned equation numbers.

Parameters
[in]prefixMessage prefix
[in]madofMatrix of accumulated DOFs
[in]meqnMatrix of equation numbers
[in]lpuFile unit number for res-file output
Author
Knut Morten Okstad
Date
28 May 2018
Here is the caller graph for this function:

Variable Documentation

◆ mysam

type(sam8type), save, private asmextensionmodule::mysam
private

64-bit integer version of SAM arrays