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

Module with subroutines/functions for automatic time stepping. More...

Functions/Subroutines

subroutine, public pushaccelstack (sam, acc, ierr)
 Pushes the given vector onto the acceleration stack. More...
 
subroutine getautostep (sam, sys, errlim, HP, H, HX, istat)
 Calculates the next time step based on local truncation errors. More...
 
real(dp) function, public getinitialtimestepsize (sys, ierr)
 Returns the length of the initial time step. More...
 
real(dp) function, public gettimestepsize (sys, sam, ctrl, errlim, ierr)
 Returns the length of the next time step. More...
 
subroutine, public deallocatetimestep ()
 Deallocates the internal buffers for automatic time stepping. More...
 

Variables

real(dp), dimension(:), pointer, save a1
 Bottom of acceleration stack. More...
 
real(dp), dimension(:), pointer, save a2
 Middle of acceleration stack. More...
 
real(dp), dimension(:), pointer, save a3
 Top of acceleration stack. More...
 
real(dp), dimension(:), allocatable, save err
 Internal work array. More...
 

Detailed Description

Module with subroutines/functions for automatic time stepping.

The auto-time stepping is based in local trunction errors calculated from the last three acceleration states. This is not much in use any longer and is only kept for historical reasons. The module also handles prescribed time step size defined by a general function (time step engine).

Function/Subroutine Documentation

◆ deallocatetimestep()

subroutine, public timestepmodule::deallocatetimestep

Deallocates the internal buffers for automatic time stepping.

Author
Knut Morten Okstad
Date
23 Jan 2017

◆ getautostep()

subroutine timestepmodule::getautostep ( type(samtype), intent(in)  sam,
type(systemtype), intent(in)  sys,
real(dp), intent(in)  errlim,
real(dp), intent(in)  HP,
real(dp), intent(in)  H,
real(dp), intent(out)  HX,
integer, intent(out)  istat 
)

Calculates the next time step based on local truncation errors.

Parameters
[in]samData for managing system matrix assembly
[in]sysSystem level model data
[in]errlimTruncation error limit
[in]HPPrevious time step size
[in]HCurrent time step size
[out]HXNext time step size
[out]istatStatus flag:
  • = 0 : The time step in unchanged
  • > 0 : The time step is increased or decreased
  • < 0 : Error
Author
Knut Morten Okstad
Date
17 Jul 2000
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getinitialtimestepsize()

real(dp) function, public timestepmodule::getinitialtimestepsize ( type(systemtype), intent(inout)  sys,
integer, intent(out)  ierr 
)

Returns the length of the initial time step.

Parameters
sysSystem level model data
[out]ierrError flag
Author
Knut Morten Okstad
Date
21 Aug 2007
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gettimestepsize()

real(dp) function, public timestepmodule::gettimestepsize ( type(systemtype), intent(inout)  sys,
type(samtype), intent(in)  sam,
type(controltype), intent(in)  ctrl,
real(dp), intent(in)  errlim,
integer, intent(inout)  ierr 
)

Returns the length of the next time step.

Parameters
sysSystem level model data
[in]samData for managing system matrix assembly
[in]ctrlControl system data
[in]errlimTruncation error limit
ierrError flag
Author
Bjorn Haugen
Date
26 Feb 2002
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pushaccelstack()

subroutine, public timestepmodule::pushaccelstack ( type(samtype), intent(in)  sam,
real(dp), dimension(:), intent(in)  acc,
integer, intent(out)  ierr 
)

Pushes the given vector onto the acceleration stack.

Parameters
[in]samData for managing system matrix assembly
[in]accAcceleration vector to be pushed
[out]ierrError flag
Author
Knut Morten Okstad
Date
17 Jul 2000
Here is the caller graph for this function:

Variable Documentation

◆ a1

real(dp), dimension(:), pointer, save timestepmodule::a1
private

Bottom of acceleration stack.

◆ a2

real(dp), dimension(:), pointer, save timestepmodule::a2
private

Middle of acceleration stack.

◆ a3

real(dp), dimension(:), pointer, save timestepmodule::a3
private

Top of acceleration stack.

◆ err

real(dp), dimension(:), allocatable, save timestepmodule::err
private

Internal work array.