source: CIVL/examples/compare/provesa/ADFirstAidKit/validityTest.f@ a389857

main test-branch
Last change on this file since a389857 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100755
File size: 1.8 KB
Line 
1c$Id: validityTest.f 1443 2006-10-24 11:21:23Z llh $
2 BLOCK DATA validityTestBD
3C Keeps the current bounds of the validity interval
4C Initial value is ]-infinity, +infinity[
5 REAL gmin, gmax
6 LOGICAL infmin, infmax
7 COMMON /validity_test_common/
8 + gmin, gmax, infmin, infmax
9 DATA infmin/.TRUE./
10 DATA infmax/.TRUE./
11 DATA gmin/-999.99/
12 DATA gmax/999.99/
13 END
14
15 SUBROUTINE validity_domain_real8(t, td)
16C Updates the bounds of the validity interval
17C with the new constraint that t keeps its sign.
18 real*8 t, td
19 real gmin, gmax, temp
20 logical infmin, infmax
21 COMMON /validity_test_common/
22 + gmin, gmax, infmin, infmax
23
24 if(td .ne. 0.0) then
25 temp = -(t/td)
26 if ( temp .lt. 0.0 ) then
27 if ( infmin ) then
28 gmin = temp
29 infmin = .FALSE.
30 else
31 gmin = max(gmin,temp)
32 endif
33 else
34 if ( infmax ) then
35 gmax = temp
36 infmax = .FALSE.
37 else
38 gmax = min(gmax,temp)
39 endif
40 endif
41 endif
42 end
43
44 SUBROUTINE validity_domain_real4(t, td)
45C Updates the bounds of the validity interval
46C with the new constraint that t keeps its sign.
47 real*4 t, td
48 real gmin, gmax, temp
49 logical infmin, infmax
50 COMMON /validity_test_common/
51 + gmin, gmax, infmin, infmax
52
53 if(td .ne. 0.0) then
54 temp = -(t/td)
55 if ( temp .lt. 0.0 ) then
56 if ( infmin ) then
57 gmin = temp
58 infmin = .FALSE.
59 else
60 gmin = max(gmin,temp)
61 endif
62 else
63 if ( infmax ) then
64 gmax = temp
65 infmax = .FALSE.
66 else
67 gmax = min(gmax,temp)
68 endif
69 endif
70 endif
71 end
Note: See TracBrowser for help on using the repository browser.