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

This module contains a data structure for assembly of FE matrices. More...

Data Types

type  samtype
 Data structure for management of FE matrix assembly. More...
 
interface  writeobject
 Standard routine for writing an object to file. More...
 

Functions/Subroutines

subroutine nullifysam (samData)
 Nullifies all pointers to enable safe testing after allocation. More...
 
subroutine deallocatesam (samData)
 Deallocates all dynamic arrays within the SAM structure. More...
 
subroutine check (samData, lpu, ierr, checkEquations)
 Performs consistency checking of the SAM data structure. More...
 
integer function nodenumfromdofnum (sam, idof, extNum)
 Returns internal node number and local dof-number for a global dof. More...
 
integer function nodenumfromeqnum (sam, ieq, extNum)
 Returns internal node number and local dof-number for an equation. More...
 
subroutine writesamsize (sam, lpu)
 Writes out allocated storage for the SAM data structure. More...
 
subroutine, private writesam (sam, io, complexity, title)
 Standard routine for writing an object to file. More...
 
subroutine lumpedsam (orgSam, newSam, ierr)
 Duplicates the SAM object to emulate a model with 1-DOF elements. More...
 
subroutine inverteqpartition (lp1, lp2, sam, ierr)
 Forms the control arrays dofPosIn1 and/or dofPosIn2 in SAM. More...
 

Variables

integer, parameter version_p = 3
 Version tag. More...
 

Detailed Description

This module contains a data structure for assembly of FE matrices.

The names and meanings of (most of) the data members of the sammodule::samtype structure are adopted from Kolbein Bell's pionering work on the field. See his reports on the SAM library for a thorough elaboration.

Function/Subroutine Documentation

◆ check()

subroutine sammodule::check ( type(samtype), intent(in)  samData,
integer, intent(in)  lpu,
integer, intent(out)  ierr,
logical, intent(in), optional  checkEquations 
)

Performs consistency checking of the SAM data structure.

Parameters
[in]samDataThe sammodule::samtype object to check consistency of
[in]lpuFile unit number for error messages
[out]ierrError flag
[in]checkEquationsIf present and .true., also check the meqn array
Author
Bjorn Haugen
Date
24 Sep 1998
Here is the caller graph for this function:

◆ deallocatesam()

subroutine sammodule::deallocatesam ( type(samtype), intent(inout)  samData)

Deallocates all dynamic arrays within the SAM structure.

Parameters
samDataThe sammodule::samtype object to deallocate
Author
Knut Morten Okstad
Date
14 Feb 2003
Here is the caller graph for this function:

◆ inverteqpartition()

subroutine sammodule::inverteqpartition ( logical, intent(in)  lp1,
logical, intent(in)  lp2,
type(samtype), intent(inout)  sam,
integer, intent(out)  ierr 
)

Forms the control arrays dofPosIn1 and/or dofPosIn2 in SAM.

Parameters
lp1If .true., create the dofPosIn1 array
lp2If .true., create the dofPosIn2 array
samThe sammodule::samtype object to consider
[out]ierrError flag
Author
Knut Morten Okstad
Date
18 May 2020
Here is the caller graph for this function:

◆ lumpedsam()

subroutine sammodule::lumpedsam ( type(samtype), intent(in)  orgSam,
type(samtype), pointer  newSam,
integer, intent(out)  ierr 
)

Duplicates the SAM object to emulate a model with 1-DOF elements.

Parameters
[in]orgSamThe sammodule::samtype object to be duplicated
[out]newSamPointer to the new sammodule::samtype object
[out]ierrError flag (negative on allocation error)

All the arrays of the orgSam object are shared with the newSam object (that is, the array pointers points to the same physical address), except for madof which is re-initialized with 1 DOF per node.

Author
Knut Morten Okstad
Date
10 Sep 2004
Here is the caller graph for this function:

◆ nodenumfromdofnum()

integer function sammodule::nodenumfromdofnum ( type(samtype), intent(in)  sam,
integer, intent(inout)  idof,
logical, intent(in), optional  extNum 
)

Returns internal node number and local dof-number for a global dof.

Parameters
[in]samThe sammodule::samtype object to consider
idofGlobal DOF number on input, local DOF number on output
extNumIf present and .true., return external node number instead
Returns
Internal node number in range [1,nnod]
-1 if idof is out of range
Author
Bjorn Haugen
Date
29 Jun 1999
Here is the caller graph for this function:

◆ nodenumfromeqnum()

integer function sammodule::nodenumfromeqnum ( type(samtype), intent(in)  sam,
integer, intent(inout)  ieq,
logical, intent(in), optional  extNum 
)

Returns internal node number and local dof-number for an equation.

Parameters
[in]samThe sammodule::samtype object to consider
ieqEquation number on input, local DOF number on output
extNumIf present and .true., return external node number instead
Returns
Internal node number in range [1,nnod]
-1 if ieq is out of range
Author
Bjorn Haugen
Date
29 Jun 1999

◆ nullifysam()

subroutine sammodule::nullifysam ( type(samtype), intent(out)  samData)

Nullifies all pointers to enable safe testing after allocation.

Parameters
[out]samDataThe sammodule::samtype object to nullify
Author
Bjorn Haugen
Date
24 Sep 1998
Here is the caller graph for this function:

◆ writesam()

subroutine, private sammodule::writesam ( type(samtype), intent(in)  sam,
integer, intent(in)  io,
integer, intent(in), optional  complexity,
character(len=*), intent(in), optional  title 
)
private

Standard routine for writing an object to file.

Parameters
[in]samThe sammodule::samtype object to print
[in]ioFile unit number to write to
[in]complexityIf present, the value indicates the amount of print
[in]titleIf present, write as heading, otherwise 'SAM' is written
Author
Knut Morten Okstad
Date
17 Oct 2000

◆ writesamsize()

subroutine sammodule::writesamsize ( type(samtype), intent(in)  sam,
integer, intent(in)  lpu 
)

Writes out allocated storage for the SAM data structure.

Parameters
[in]samThe sammodule::samtype object to write for
[in]lpuFile unit number to print to
Author
Knut Morten Okstad
Date
7 Mar 2003

Variable Documentation

◆ version_p

integer, parameter sammodule::version_p = 3

Version tag.