-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalc_ider_cross_split.f
106 lines (106 loc) · 2.82 KB
/
calc_ider_cross_split.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
!
! CalculiX - A 3-dimensional finite element program
! Copyright (C) 1998-2021 Guido Dhondt
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation(version 2);
!
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; if not, write to the Free Software
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
!
! author: Yannick Muller
!
subroutine calc_ider_cross_split(df,pt1,Tt1,xflow1,xflow2,pt2,
&Tt2,ichan_num,A1,A2,A_s,dh1,dh2,alpha,zeta_fac,
&kappa,R,ider,iflag)
!
implicit none
!
integer ichan_num,ider,iflag
!
real*8
&df(6),
&pt1,
&pt2,
&Tt1,
&Tt2,
&xflow1,
&xflow2,
&A1,
&A2,
&kappa,
&R,
&dh1,
&dh2,
&alpha,
&calc_residual_cross_split,
&eps,
&h,
&f0,
&zeta_fac,
&A_s
!
eps = 1.0e-4
!
f0 = calc_residual_cross_split(pt1,Tt1,xflow1,xflow2,pt2,
&Tt2,ichan_num,A1,A2,A_s,dh1,dh2,alpha,zeta_fac,
&kappa,R,ider,iflag)
!
h = eps*dabs(pt1)
if(h.eq.0)then
h = eps
endif
df(1) = (calc_residual_cross_split(pt1+h,Tt1,xflow1,xflow2,pt2,
&Tt2,ichan_num,A1,A2,A_s,dh1,dh2,alpha,zeta_fac,
&kappa,R,ider,iflag)-f0)/h
!
h = eps*dabs(Tt1)
if(h.eq.0)then
h = eps
endif
df(2) = (calc_residual_cross_split(pt1,Tt1+h,xflow1,xflow2,pt2,
&Tt2,ichan_num,A1,A2,A_s,dh1,dh2,alpha,zeta_fac,
&kappa,R,ider,iflag)-f0)/h
!
h = eps*dabs(xflow1)
if(h.eq.0)then
h = eps
endif
df(3) = (calc_residual_cross_split(pt1,Tt1,xflow1+h,xflow2,pt2,
&Tt2,ichan_num,A1,A2,A_s,dh1,dh2,alpha,zeta_fac,
&kappa,R,ider,iflag)-f0)/h
!
h = eps*dabs(xflow2)
if(h.eq.0)then
h = eps
endif
df(4) = (calc_residual_cross_split(pt1,Tt1,xflow1,xflow2+h,pt2,
&Tt2,ichan_num,A1,A2,A_s,dh1,dh2,alpha,zeta_fac,
&kappa,R,ider,iflag)-f0)/h
!
h = eps*dabs(pt2)
if(h.eq.0)then
h = eps
endif
df(5) = (calc_residual_cross_split(pt1,Tt1,xflow1,xflow2,pt2+h,
&Tt2,ichan_num,A1,A2,A_s,dh1,dh2,alpha,zeta_fac,
&kappa,R,ider,iflag)-f0)/h
!
h = eps*dabs(Tt2)
if(h.eq.0)then
h = eps
endif
df(6) = (calc_residual_cross_split(pt1,Tt1,xflow1,xflow2,pt2,
&Tt2+h,ichan_num,A1,A2,A_s,dh1,dh2,alpha,zeta_fac,
&kappa,R,ider,iflag)-f0)/h
!
return
end