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