CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
checktime.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine checktime (itpamp, namta, tinc, ttime, amta, tmin, inext, itp, istep, tper)
 

Function/Subroutine Documentation

◆ checktime()

subroutine checktime ( integer  itpamp,
integer, dimension(3,*)  namta,
real*8  tinc,
real*8  ttime,
real*8, dimension(2,*)  amta,
real*8  tmin,
integer  inext,
integer  itp,
integer  istep,
real*8  tper 
)
21 !
22 ! checks whether tmin does not exceed the first time point,
23 ! in case a time points amplitude is active
24 !
25  implicit none
26 !
27  integer namta(3,*),itpamp,id,inew,inext,istart,iend,itp,istep
28 !
29  real*8 amta(2,*),tinc,ttime,tmin,reftime,tper
30 !
31  if(itpamp.gt.0) then
32 !
33 ! identifying the location in the time points amplitude
34 ! of the starting time of the step
35 !
36 ! for time points amplitudes based on total time the inext
37 ! value from the previous step should be used starting with the
38 ! second step
39 !
40  if((namta(3,itpamp).ge.0).or.(inext.eq.0)) then
41  if(namta(3,itpamp).lt.0) then
42  reftime=ttime
43  else
44  reftime=0
45  endif
46  istart=namta(1,itpamp)
47  iend=namta(2,itpamp)
48  call identamta(amta,reftime,istart,iend,id)
49  if(id.lt.istart) then
50  inext=istart
51  else
52  inext=id+1
53  endif
54  endif
55 !
56 ! identifying the location in the time points amplitude
57 ! of the starting point increased by tinc
58 !
59  if(namta(3,itpamp).lt.0) then
60  reftime=ttime+tinc
61  else
62  reftime=tinc
63  endif
64  istart=namta(1,itpamp)
65  iend=namta(2,itpamp)
66  call identamta(amta,reftime,istart,iend,id)
67  if(id.lt.istart) then
68  inew=istart
69  else
70  inew=id+1
71  endif
72 !
73 ! if the end of the new increment is less than a time
74 ! point by less than 1.e-6 (theta-value) dtheta is
75 ! enlarged up to this time point
76 !
77  if((inext.eq.inew).and.(inew.le.iend)) then
78  if(amta(1,inew)-reftime.lt.1.d-6*tper) inew=inew+1
79  endif
80 !
81 ! if the next time point precedes tinc or tmin
82 ! appropriate action must be taken
83 !
84  if(inew.gt.inext) then
85  if(namta(3,itpamp).lt.0) then
86  tinc=amta(1,inext)-ttime
87  else
88  tinc=amta(1,inext)
89  endif
90  inext=inext+1
91  itp=1
92  if(tinc.lt.tmin) then
93  write(*,*) '*ERROR in checktime: a time point'
94  write(*,*) ' precedes the minimum time tmin'
95  call exit(201)
96  else
97  write(*,*) '*WARNING in checktime: a time point'
98  write(*,*) ' precedes the initial time'
99  write(*,*) ' increment tinc; tinc is'
100  write(*,*) ' decreased to ',tinc
101  endif
102  endif
103  endif
104 !
105  return
subroutine identamta(amta, reftime, istart, iend, id)
Definition: identamta.f:26
Hosted by OpenAircraft.com, (Michigan UAV, LLC)