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

Module with some generic solver utilities. More...

Functions/Subroutines

subroutine calculateiterationnorms (sam, sys, iter, ierr)
 Calculates all iteration norms defined in the system. More...
 
subroutine calculateiterationtolerances (sam, sys)
 Calculates all iteration tolerances defined in the system. More...
 
subroutine iterationaccelerator (iter, res, del, ierr)
 Accelerates the solution increment in case of line search. More...
 
subroutine savestep (sys, mech, ctrl, ierr, checkTimeStep)
 Saves response variables of current time step to file. More...
 
subroutine terminatestep (sam, sys, mech, ctrl, linearStatic, finalStep, ierr)
 Terminates a time step by doing some final calculations. More...
 
subroutine updatepreviousstate (sam, sys, mech, ierr)
 Updates the previous state variables in the mechanism objects. More...
 
subroutine restorelaststep (sam, sys, mech)
 Restores all state variables from the last converged time step. More...
 
subroutine clearvelacc (triads, joints, notify)
 Clears velocity and acceleration variables in the triads and joints. More...
 
subroutine closesolverdb (mech, anyRes, ierr)
 Closes all solver data base files before program termination. More...
 
subroutine printmassdistribution (sups, masses, tires, elms, gravity, totMass, lpu)
 Prints a summary of the mass distribution to the res-file. More...
 
subroutine printresults (time, triads, sups, iprint, lpu)
 Prints basic simulation variables to the res-file. More...
 
subroutine printconvergence (lpu, fileFormat, iStep, iter, tanUpdate, time, timeStep, del, res, convData, sam, mech)
 Prints convergence information to the res-file. More...
 

Variables

integer(ik), dimension(:), allocatable, save meqerr
 All singular equations found. More...
 
real(dp), dimension(4), save, private lastime = -1.0e99_dp
 Previous save times. More...
 

Detailed Description

Module with some generic solver utilities.

This module contains utility subroutines for the Dynamics Solver that are not related to any specific solution algorithm or mechanism part. Many of the subroutines and functions of this module are not documented. You have to configure doxygen with the option ENABLED_SECTIONS = FULL_DOC to extract detailed documentation of those subroutines and functions.

Function/Subroutine Documentation

◆ calculateiterationnorms()

subroutine solverroutinesmodule::calculateiterationnorms ( type(samtype), intent(in)  sam,
type(systemtype), intent(inout)  sys,
integer, intent(in)  iter,
integer, intent(out)  ierr 
)

Calculates all iteration norms defined in the system.

Parameters
[in]samData for managing system matrix assembly
sysSystem level model data
[in]iterIteration counter
[out]ierrError flag
Author
Bjorn Haugen
Date
12 Apr 2003
Author
Knut Morten Okstad
Date
29 Jan 2004
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculateiterationtolerances()

subroutine solverroutinesmodule::calculateiterationtolerances ( type(samtype), intent(in)  sam,
type(systemtype), intent(inout)  sys 
)

Calculates all iteration tolerances defined in the system.

Parameters
[in]samData for managing system matrix assembly
sysSystem level model data
Author
Bjorn Haugen
Date
12 Apr 2003
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearvelacc()

subroutine solverroutinesmodule::clearvelacc ( type(triadtype), dimension(:), intent(inout)  triads,
type(masterslavejointtype), dimension(:), intent(inout)  joints,
logical, intent(in)  notify 
)

Clears velocity and acceleration variables in the triads and joints.

Parameters
triadsAll triads in the model
jointsAll joints in the model
[in]notifyIf .true., give message if a non-zero variable is cleared

This subroutine will (re)set the velocity- and accelerations variables in all triads and joints to zero. It mainly is used to nullify potentially non-zero initial conditions in the case of quasi-static load incrementation, in which inertia and damping terms should be zero, such that a possible dynamic restart will be performed from a resting state. Notice that the velocity/accelerations of the generalized DOFs in super- elements do not need to be reset, since those variables are pointers into respective system vectors which are assumed to be initialized separately.

Author
Guenter Glanzer
Date
24 Aug 2022
Here is the caller graph for this function:

◆ closesolverdb()

subroutine solverroutinesmodule::closesolverdb ( type(mechanismtype), intent(inout)  mech,
logical, dimension(:), intent(out)  anyRes,
integer, intent(out)  ierr 
)

Closes all solver data base files before program termination.

Parameters
mechMechanism components of the model
[out]anyResIndicates whether the result files contain data or not
[out]ierrError flag
Author
Knut Morten Okstad
Date
30 Jan 2006
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iterationaccelerator()

subroutine solverroutinesmodule::iterationaccelerator ( integer, intent(in)  iter,
real(dp), dimension(:), intent(in)  res,
real(dp), dimension(:), intent(inout)  del,
integer, intent(out)  ierr 
)

Accelerates the solution increment in case of line search.

Parameters
[in]iterIteration counter
[in]resCurrent force residual
delCurrent solution increment
[out]ierrError flag

The solution increment is scaled if the previous and current residual vectors are "almost" tangential, as are previous and current solution vectors (kind-of line search).

Author
Bjorn Haugen
Date
29 Mar 2002
Here is the caller graph for this function:

◆ printconvergence()

subroutine solverroutinesmodule::printconvergence ( integer, intent(in)  lpu,
integer, intent(in)  fileFormat,
integer(i8), intent(in)  iStep,
integer, intent(in)  iter,
logical, intent(in)  tanUpdate,
real(dp), intent(in)  time,
real(dp), intent(in)  timeStep,
real(dp), dimension(:), intent(in)  del,
real(dp), dimension(:), intent(in)  res,
type(testsettype), intent(in)  convData,
type(samtype), intent(in)  sam,
type(mechanismtype), intent(in)  mech 
)

Prints convergence information to the res-file.

Parameters
[in]lpuFile unit number for res-file output
[in]fileFormatFile format option, < 0 : old format (R4.0-compatible), = 0 : new format > 0 : new format and write heading first
[in]iStepTime increment counter
[in]iterIteration counter
[in]tanUpdateIf .true., a new tangent is computed in this iteration
[in]timeCurrent simulation time
[in]timeStepTime increment size
[in]resForce residual
[in]delSolution increment
[in]convDataIteration norm tolerances and values
[in]samData for managing system matrix assembly
[in]mechMechanism components of the model
Author
Knut Morten Okstad
Date
29 Jan 2004
Here is the call graph for this function:
Here is the caller graph for this function:

◆ printmassdistribution()

subroutine solverroutinesmodule::printmassdistribution ( type(supeltype), dimension(:), intent(in)  sups,
type(masstype), dimension(:), intent(inout)  masses,
type(tiretype), dimension(:), intent(in)  tires,
type(userdefeltype), dimension(:), intent(in)  elms,
real(dp), dimension(:), intent(in)  gravity,
real(dp), intent(out)  totMass,
integer, intent(in)  lpu 
)

Prints a summary of the mass distribution to the res-file.

Parameters
[in]supsAll superelements in the model
massesAll point masses in the model
[in]tiresAll tires in the model
[in]elmsAll user-defined elements in the model
[in]gravityGravitation vector
[out]totMassTotal mass of the model
[in]lpuFile unit number for res-file output
Author
Knut Morten Okstad
Date
17 Apr 2002
Here is the call graph for this function:
Here is the caller graph for this function:

◆ printresults()

subroutine solverroutinesmodule::printresults ( real(dp), intent(in)  time,
type(triadtype), dimension(:), intent(in)  triads,
type(supeltype), dimension(:), intent(in)  sups,
integer, intent(in)  iprint,
integer, intent(in)  lpu 
)

Prints basic simulation variables to the res-file.

Parameters
[in]timeCurrent simulation time
[in]triadsAll triads in the model
[in]supsAll superelements in the model
[in]iprintPrint switch; the higher value the more print is produced
[in]lpuFile unit number for res-file output
Author
Knut Morten Okstad
Date
18 Jun 2001
Here is the caller graph for this function:

◆ restorelaststep()

subroutine solverroutinesmodule::restorelaststep ( type(samtype), intent(in)  sam,
type(systemtype), intent(inout)  sys,
type(mechanismtype), intent(inout)  mech 
)

Restores all state variables from the last converged time step.

Parameters
[in]samData for managing system matrix assembly
sysSystem level model data
mechMechanism components of the model
Author
Knut Morten Okstad
Date
Nov 2008
Here is the caller graph for this function:

◆ savestep()

subroutine solverroutinesmodule::savestep ( type(systemtype), intent(in)  sys,
type(mechanismtype), intent(inout)  mech,
type(controltype), intent(in)  ctrl,
integer, intent(out)  ierr,
logical, intent(in), optional  checkTimeStep 
)

Saves response variables of current time step to file.

Parameters
[in]sysSystem level model data
mechMechanism components of the model
[in]ctrlControl system data
[out]ierrError flag
[in]checkTimeStepIf present and .false., save the secondary variables for each time step (ignoring the -saveinc2 option).
Author
Knut Morten Okstad
Date
4 Jun 2002
Here is the call graph for this function:
Here is the caller graph for this function:

◆ terminatestep()

subroutine solverroutinesmodule::terminatestep ( type(samtype), intent(in)  sam,
type(systemtype), intent(inout)  sys,
type(mechanismtype), intent(inout)  mech,
type(controltype), intent(in)  ctrl,
logical, intent(in)  linearStatic,
logical, intent(in)  finalStep,
integer, intent(out)  ierr 
)

Terminates a time step by doing some final calculations.

Parameters
[in]samData for managing system matrix assembly
sysSystem level model data
mechMechanism components of the model
[in]ctrlControl system data
[in]linearStaticIf .true., we are doing a linear static analysis
[in]finalStepIf .true., we have finished the final time step
[out]ierrError flag

This subroutine performs some final calculations on the converged solution state, updates the previous state variables, etc.

Author
Knut Morten Okstad
Date
Sep 2000
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatepreviousstate()

subroutine solverroutinesmodule::updatepreviousstate ( type(samtype), intent(in)  sam,
type(systemtype), intent(inout)  sys,
type(mechanismtype), intent(inout)  mech,
integer, intent(out)  ierr 
)

Updates the previous state variables in the mechanism objects.

Parameters
[in]samData for managing system matrix assembly
sysSystem level model data
mechMechanism components of the model
[out]ierrError flag
Author
Knut Morten Okstad
Date
11 Aug 2023
Here is the caller graph for this function:

Variable Documentation

◆ lastime

real(dp), dimension(4), save, private solverroutinesmodule::lastime = -1.0e99_dp
private

Previous save times.

◆ meqerr

integer(ik), dimension(:), allocatable, save solverroutinesmodule::meqerr

All singular equations found.