|
FEDEM Solver
R8.0
Source code of the dynamics solver
|
Module with subroutines for simulation restart. More...
Data Types | |
| interface | restartinit |
| Initializes the mechanism configuration for restart. More... | |
Functions/Subroutines | |
| subroutine | restartfromfile (sam, sys, mech, ctrl, lpu, ierr) |
| Initializes the mechanism configuration from restart file. More... | |
| subroutine | readtriaddata (triads, previousStep, ierr) |
| Reads triad results from results database for restart. More... | |
| subroutine | readsupdata (sups, previousStep, ierr) |
| Reads superelement results from results database for restart. More... | |
| subroutine | readjointdata (joints, previousStep, ierr) |
| Reads joint results from results database for restart. More... | |
| subroutine | readjointdofdata (jointType, jointId, jointDof, previousStep, ierr) |
| Reads joint DOF data for current time step. More... | |
| subroutine | readcontactelementdata (cElems, ierr) |
| Reads contact element results from results database for restart. More... | |
| subroutine | readcontroldata (ctrl, mechId, ierr) |
| Reads control system data from results database for restart. More... | |
| integer function, public | getstatesize (sam, mech, ctrl) |
| Calculates the length of the state array to restart from. More... | |
| integer function, public | gettransformationstatesize (mech) |
| Calculates the length of the transformation state array. More... | |
| subroutine | restartfromcore (sam, sys, mech, ctrl, data, ndat, lpu, istat) |
| Initializes the mechanism configuration from provided state array. More... | |
| subroutine | extracttriaddata (triads, data, ndat, idat) |
| Extracts triad results from in-core array for restart. More... | |
| subroutine | extractsuperelementdata (sups, data, ndat, idat) |
| Extracts superelement results from in-core array for restart. More... | |
| subroutine | extractjointdata (joints, data, ndat, idat) |
| Extracts joint results from in-core state array for restart. More... | |
| subroutine | extractdamperdata (dampers, data, ndat, idat) |
| Extracts damper results from state array for restart. More... | |
| subroutine | extractcontactelementdata (cElems, data, ndat, idat) |
| Extracts contact element results from state array for restart. More... | |
| subroutine | extractmotiondata (motions, data, ndat, idat) |
| Extracts prescribed motion results from state array for restart. More... | |
| subroutine | extractcontroldata (ctrl, data, ndat, idat) |
| Extracts control system data from state array for restart. More... | |
| subroutine | restartinitialize (sam, sys, mech, ctrl, fromCore, ierr) |
| Initializes the mechanism configuration for restart. More... | |
| subroutine, public | savetocore (sam, sys, mech, ctrl, data, ndat, istat) |
| Saves state-dependent data of current time step to an array in core. More... | |
| subroutine, public | savetransformationdatatocore (sys, mech, data, ndat, istat) |
| Saves the transformation data of current step to an array in core. More... | |
| subroutine | savetriaddata (triads, data, ndat, idat) |
| Saves triad results to in-core array for restart. More... | |
| subroutine | savesuperelementdata (sups, data, ndat, idat) |
| Saves superelement results to in-core array for restart. More... | |
| subroutine | savejointdata (joints, data, ndat, idat) |
| Saves joint results to in-core state array for restart. More... | |
| subroutine | savedamperdata (dampers, data, ndat, idat) |
| Saves damper results to in-core state array for restart. More... | |
| subroutine | savecontactelementdata (cElems, data, ndat, idat) |
| Saves contact element results to in-core state array for restart. More... | |
| subroutine | savemotiondata (motions, data, ndat, idat) |
| Saves prescribed motion results to in-core state array for restart. More... | |
| subroutine | savecontroldata (ctrl, data, ndat, idat) |
| Saves control system data to in-core state array for restart. More... | |
| logical function | outofrange (oper, object, id, idat, ndat) |
| Prints an error message when the in-core state array is exhausted. More... | |
Module with subroutines for simulation restart.
This module contains the subroutines that handles restart of a dynamics simulation. The state that is restarted from can either be read from a set of frs-files generated by a previous simulation of the same model, or provided through an in-core state array. The latter is typically used when the solver is executed via the solver API by some external script.
| subroutine restartmodule::extractcontactelementdata | ( | type(contactelementtype), dimension(:), intent(inout) | cElems, |
| real(dp), dimension(ndat), intent(in) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Extracts contact element results from state array for restart.
| cElems | All contact elements in the model | |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, <0: Error, ≥0: Number of values read |

| subroutine restartmodule::extractcontroldata | ( | type(controltype), intent(inout) | ctrl, |
| real(dp), dimension(ndat), intent(in) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Extracts control system data from state array for restart.
| ctrl | Control system data | |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, <0: Error, ≥0: Number of values read |

| subroutine restartmodule::extractdamperdata | ( | type(dampertype), dimension(:), intent(inout) | dampers, |
| real(dp), dimension(ndat), intent(in) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Extracts damper results from state array for restart.
| dampers | All damper elements in the model | |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, <0: Error, ≥0: Number of values read |
Only the damper velocity is extracted, and only if the damper uses deformational velocity. Because it is computed using the previous spring deflection which is not known at restart point.

| subroutine restartmodule::extractjointdata | ( | type(masterslavejointtype), dimension(:), intent(inout) | joints, |
| real(dp), dimension(ndat), intent(in) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Extracts joint results from in-core state array for restart.
| joints | All joints in the model | |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, <0: Error, ≥0: Number of values read |
The internal position matrices are then updated.

| subroutine restartmodule::extractmotiondata | ( | type(motiontype), dimension(:), intent(inout) | motions, |
| real(dp), dimension(ndat), intent(in) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Extracts prescribed motion results from state array for restart.
| [in] | motions | All prescribed motions in the model |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, <0: Error, ≥0: Number of values read |

| subroutine restartmodule::extractsuperelementdata | ( | type(supeltype), dimension(:), intent(inout) | sups, |
| real(dp), dimension(ndat), intent(in) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Extracts superelement results from in-core array for restart.
| sups | All superelements in the model | |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, <0: Error, ≥0: Number of values read |

| subroutine restartmodule::extracttriaddata | ( | type(triadtype), dimension(:), intent(inout) | triads, |
| real(dp), dimension(ndat), intent(in) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Extracts triad results from in-core array for restart.
| triads | All triads in the model | |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, <0: Error, ≥0: Number of values read |

| integer function, public restartmodule::getstatesize | ( | type(samtype), intent(in) | sam, |
| type(mechanismtype), intent(in) | mech, | ||
| type(controltype), intent(in) | ctrl | ||
| ) |
Calculates the length of the state array to restart from.
| [in] | sam | Data for managing system matrix assembly |
| [in] | mech | Mechanism components of the model |
| [in] | ctrl | Control system data |

| integer function, public restartmodule::gettransformationstatesize | ( | type(mechanismtype), intent(in) | mech | ) |
Calculates the length of the transformation state array.
| [in] | mech | Mechanism components of the model |

|
private |
Prints an error message when the in-core state array is exhausted.

| subroutine restartmodule::readcontactelementdata | ( | type(contactelementtype), dimension(:), intent(inout) | cElems, |
| integer, intent(out) | ierr | ||
| ) |
Reads contact element results from results database for restart.
| cElems | All contact elements of the model | |
| [out] | ierr | Error flag |

| subroutine restartmodule::readcontroldata | ( | type(controltype), intent(inout) | ctrl, |
| integer, intent(in) | mechId, | ||
| integer, intent(out) | ierr | ||
| ) |
Reads control system data from results database for restart.
| ctrl | Control system data | |
| [in] | mechId | Base ID of the mechanism object of the model |
| [out] | ierr | Error flag |

| subroutine restartmodule::readjointdata | ( | type(masterslavejointtype), dimension(:), intent(inout) | joints, |
| logical, intent(in) | previousStep, | ||
| integer, intent(out) | ierr | ||
| ) |
Reads joint results from results database for restart.
| joints | All joints of the model | |
| [in] | previousStep | If .true., read into the previous configuration |
| [out] | ierr | Error flag |
The internal position matrices are then updated.


| subroutine restartmodule::readjointdofdata | ( | character(len=*), intent(in) | jointType, |
| type(idtype), intent(in) | jointId, | ||
| type(jointdoftype), intent(inout) | jointDof, | ||
| logical, intent(in) | previousStep, | ||
| integer, intent(out) | ierr | ||
| ) |
Reads joint DOF data for current time step.
| [in] | jointType | Type string of the joint in question |
| [in] | jointId | ID of the joint in question |
| jointDof | The joint DOF to read response data for | |
| [in] | previousStep | If .true., read into the previous configuration |
| [out] | ierr | Error flag |

| subroutine restartmodule::readsupdata | ( | type(supeltype), dimension(:), intent(inout) | sups, |
| logical, intent(in) | previousStep, | ||
| integer, intent(out) | ierr | ||
| ) |
Reads superelement results from results database for restart.
| sups | All superelements of the model | |
| [in] | previousStep | If .true., read into the previous configuration |
| [out] | ierr | Error flag |

| subroutine restartmodule::readtriaddata | ( | type(triadtype), dimension(:), intent(inout) | triads, |
| logical, intent(in) | previousStep, | ||
| integer, intent(out) | ierr | ||
| ) |
Reads triad results from results database for restart.
| triads | All triads of the model | |
| [in] | previousStep | If .true., read into the previous configuration |
| [out] | ierr | Error flag |

| subroutine restartmodule::restartfromcore | ( | type(samtype), intent(in) | sam, |
| type(systemtype), intent(inout) | sys, | ||
| type(mechanismtype), intent(inout) | mech, | ||
| type(controltype), intent(inout) | ctrl, | ||
| real(dp), dimension(ndat), intent(in) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(in) | lpu, | ||
| integer, intent(out) | istat | ||
| ) |
Initializes the mechanism configuration from provided state array.
| [in] | sam | Data for managing system matrix assembly |
| sys | System level model data | |
| mech | Mechanism components of the model | |
| ctrl | Control system data | |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| [in] | lpu | File unit number for res-file output |
| [out] | istat | Status flag, <0: Error, ≥0: Number of values read |
|
private |
Initializes the mechanism configuration from restart file.
| [in] | sam | Data for managing system matrix assembly |
| sys | System level model data | |
| mech | Mechanism components of the model | |
| ctrl | Control system data | |
| [in] | lpu | File unit number for res-file output |
| [out] | ierr | Error flag |
|
private |
Initializes the mechanism configuration for restart.
| [in] | sam | Data for managing system matrix assembly |
| sys | System level model data | |
| mech | Mechanism components of the model | |
| [in] | ctrl | Control system data |
| [in] | fromCore | If .true., invoked from restartmodule::restartfromcore |
| [out] | ierr | Error flag |


| subroutine restartmodule::savecontactelementdata | ( | type(contactelementtype), dimension(:), intent(in) | cElems, |
| real(dp), dimension(ndat), intent(inout) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Saves contact element results to in-core state array for restart.
| [in] | cElems | All contact elements in the model |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, negative value indicates an error |

| subroutine restartmodule::savecontroldata | ( | type(controltype), intent(in) | ctrl, |
| real(dp), dimension(ndat), intent(inout) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Saves control system data to in-core state array for restart.
| [in] | ctrl | Control system data |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, negative value indicates an error |

| subroutine restartmodule::savedamperdata | ( | type(dampertype), dimension(:), intent(in) | dampers, |
| real(dp), dimension(ndat), intent(inout) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Saves damper results to in-core state array for restart.
| [in] | dampers | All damper elements in the model |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, negative value indicates an error |
Only the damper velocity needs to be stored, if the damper uses deformational velocity. Because it is computed using the previous spring deflection which is not known at restart point.

| subroutine restartmodule::savejointdata | ( | type(masterslavejointtype), dimension(:), intent(in) | joints, |
| real(dp), dimension(ndat), intent(inout) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Saves joint results to in-core state array for restart.
| [in] | joints | All joints in the model |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, negative value indicates an error |

| subroutine restartmodule::savemotiondata | ( | type(motiontype), dimension(:), intent(in) | motions, |
| real(dp), dimension(ndat), intent(inout) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Saves prescribed motion results to in-core state array for restart.
| [in] | motions | All prescribed motions in the model |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, negative value indicates an error |

| subroutine restartmodule::savesuperelementdata | ( | type(supeltype), dimension(:), intent(in) | sups, |
| real(dp), dimension(ndat), intent(inout) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Saves superelement results to in-core array for restart.
| [in] | sups | All superelements in the model |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, negative value indicates an error |

| subroutine, public restartmodule::savetocore | ( | type(samtype), intent(in) | sam, |
| type(systemtype), intent(in) | sys, | ||
| type(mechanismtype), intent(in) | mech, | ||
| type(controltype), intent(in) | ctrl, | ||
| real(dp), dimension(ndat), intent(out) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(out) | istat | ||
| ) |
Saves state-dependent data of current time step to an array in core.
| [in] | sam | Data for managing system matrix assembly |
| [in] | sys | System level model data |
| [in] | mech | Mechanism components of the model |
| [in] | ctrl | Control system data |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| [out] | istat | Status flag, <0: Error, =0: Ok, >0: The data array is this value longer than necessary |
Currently does not tires, aerodynamics, etc.


| subroutine, public restartmodule::savetransformationdatatocore | ( | type(systemtype), intent(in) | sys, |
| type(mechanismtype), intent(in) | mech, | ||
| real(dp), dimension(ndat), intent(out) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(out) | istat | ||
| ) |
Saves the transformation data of current step to an array in core.
| [in] | sys | System level model data |
| [in] | mech | Mechanism components of the model |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| [out] | istat | Status flag, <0: Error, =0: Ok, >0: The data array is this value longer than necessary |
It also saves a TypeId and BaseId for triads and superelements. The TypeId is 1 for triads and 2 for superelements (FE-parts).

| subroutine restartmodule::savetriaddata | ( | type(triadtype), dimension(:), intent(in) | triads, |
| real(dp), dimension(ndat), intent(inout) | data, | ||
| integer, intent(in) | ndat, | ||
| integer, intent(inout) | idat | ||
| ) |
Saves triad results to in-core array for restart.
| [in] | triads | All triads in the model |
| [in] | ndat | Length of the solution state array |
| [in] | data | Solution state array |
| idat | Running array index, negative value indicates an error |
