FEDEM Solver  R8.0
Source code of the dynamics solver
Functions/Subroutines
normroutinesmodule Module Reference

Module with subroutines and functions for solution norm calculation. More...

Functions/Subroutines

subroutine calctolerance (item, sam, u, w)
 Defines the convergence tolerance to use for a given test item. More...
 
real(dp) function scalednorm (sam, vec, wFac, iPow, doExpand, ierr)
 Calculates the scaled norm of the given vector. More...
 
subroutine infinitenorms (sam, vec, findWorst, infTra, infRot, infGen, worstDOFs, doExpand, ierr)
 Calculates infinity norms of the given vector. More...
 
subroutine energynorms (sam, disp, force, findWorst, E_absSum, E_absMax, worstDOFs, worstVals, ierr)
 Calculates energy norms for given force and displacement vectors. More...
 
real(dp) function, dimension(:), pointer, private expandvector (sam, vec, doExpand, forceCopy, ierr)
 Returns a pointer to the expanded solution vector. More...
 

Detailed Description

Module with subroutines and functions for solution norm calculation.

Function/Subroutine Documentation

◆ calctolerance()

subroutine normroutinesmodule::calctolerance ( type(testitemtype), intent(inout)  item,
type(samtype), intent(in), optional  sam,
real(dp), dimension(:), intent(in), optional  u,
real(dp), dimension(:), intent(in), optional  w 
)

Defines the convergence tolerance to use for a given test item.

Parameters
itemThe test item to define convergence tolerance for
[in]samData for managing system matrix assembly
[in]uSystem vector to use with the relative tolerance relTol
[in]wWeighting factors for the DOFs of different kind

If a relative tolerance is specified (relTol > 0.0), the actual tolerance is taken as the scaled norm of the given vector u times this value, plus the absolute tolerance absTol. The vector u is typically the current velocity state.

Author
Bjorn Haugen
Date
28 Mar 2003
Author
Knut Morten Okstad
Date
28 Jan 2004

◆ energynorms()

subroutine normroutinesmodule::energynorms ( type(samtype), intent(in)  sam,
real(dp), dimension(:), intent(in)  disp,
real(dp), dimension(:), intent(in)  force,
logical, intent(in)  findWorst,
real(dp), intent(out)  E_absSum,
real(dp), intent(out)  E_absMax,
integer, dimension(:), intent(out)  worstDOFs,
real(dp), dimension(:), intent(out)  worstVals,
integer, intent(out)  ierr 
)

Calculates energy norms for given force and displacement vectors.

Parameters
[in]samData for managing system matrix assembly
[in]dispSystem displacement vector to calculate energy norms for
[in]forceSystem force vector to calculate energy norms for
[in]findWorstIf .true., record the worst DOFs in array worsDOFs
[out]E_absSumThe mean energy density among all DOFs
[out]E_absMaxThe maximum energy density among all DOFs
[out]worstDOFsArray to record the worst DOFs (highest values) in
[out]worstValsArray to record the worst DOF values in
[out]ierrError flag
Author
Bjorn Haugen
Date
28 Mar 2003
Author
Knut Morten Okstad
Date
28 Jan 2004
Here is the call graph for this function:
Here is the caller graph for this function:

◆ expandvector()

real(dp) function, dimension(:), pointer, private normroutinesmodule::expandvector ( type(samtype), intent(in)  sam,
real(dp), dimension(:), intent(in), target  vec,
logical, intent(in), optional  doExpand,
logical, intent(in), optional  forceCopy,
integer, intent(out), optional  ierr 
)
private

Returns a pointer to the expanded solution vector.

Parameters
[in]samData for managing system matrix assembly
[in]vecSystem vector to expand from equation-order to DOF-order
[in]doExpandIf not present or .false., don't do any expansion
[in]forceCopyIf .true., copy the vector if it is not expanded
[out]ierrError flag
Returns
Pointer to expanded or copied vector

The expanded/copied vector is actually stored in the internal scratch array managed by the scratcharraymodule, so use with utmost care.

See also
solextensionmodule::csexpand
Author
Bjorn Haugen
Date
13 Mar 2003
Author
Knut Morten Okstad
Date
28 Jan 2004
Here is the call graph for this function:
Here is the caller graph for this function:

◆ infinitenorms()

subroutine normroutinesmodule::infinitenorms ( type(samtype), intent(in)  sam,
real(dp), dimension(:), intent(in)  vec,
logical, intent(in)  findWorst,
real(dp), intent(out)  infTra,
real(dp), intent(out)  infRot,
real(dp), intent(out)  infGen,
integer, dimension(:), intent(out), optional  worstDOFs,
logical, intent(in), optional  doExpand,
integer, intent(out)  ierr 
)

Calculates infinity norms of the given vector.

Parameters
[in]samData for managing system matrix assembly
[in]vecSystem vector to calculate infinity norms for
[in]findWorstIf .true., record the worst DOFs in array worsDOFs
[out]infTraThe maximum translation DOF value
[out]infRotThe maximum rotation DOF value
[out]infGenThe maximum generalized DOF value
[out]worstDOFsArray to record the worst DOFs (highest values) in
[in]doExpandIf .true., vec is assumed to be equation-oriented
[out]ierrError flag
Author
Bjorn Haugen
Date
28 Mar 2003
Author
Knut Morten Okstad
Date
28 Jan 2004
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scalednorm()

real(dp) function normroutinesmodule::scalednorm ( type(samtype), intent(in)  sam,
real(dp), dimension(:), intent(in)  vec,
real(dp), dimension(:), intent(in)  wFac,
integer, intent(in), optional  iPow,
logical, intent(in), optional  doExpand,
integer, intent(out), optional  ierr 
)

Calculates the scaled norm of the given vector.

Parameters
[in]samData for managing system matrix assembly
[in]vecSystem vector to calculate the scaled norm for
[in]wFacWeighting factors for the DOFs of different kind
[in]iPowThe power of the L-norm (iPow = 2 implies L2-norm)
[in]doExpandIf .true., vec is assumed to be equation-oriented
[out]ierrError flag
Returns
The norm value
Author
Knut Morten Okstad
Date
27 Jun 2000
Author
Bjorn Haugen
Date
28 Mar 2003
Author
Knut Morten Okstad
Date
28 Jan 2004
Here is the call graph for this function:
Here is the caller graph for this function: