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

Go to the source code of this file.

Functions/Subroutines

subroutine extrapolate_ad_h_comp (nface, ielfa, xrlfa, adv, advfa, hel, hfa, icyclic, c, ifatie)
 

Function/Subroutine Documentation

◆ extrapolate_ad_h_comp()

subroutine extrapolate_ad_h_comp ( integer  nface,
integer, dimension(4,*)  ielfa,
real*8, dimension(3,*)  xrlfa,
real*8, dimension(*)  adv,
real*8, dimension(*)  advfa,
real*8, dimension(3,*)  hel,
real*8, dimension(3,*)  hfa,
integer  icyclic,
real*8, dimension(3,3)  c,
integer, dimension(*)  ifatie 
)
21 !
22 ! inter/extrapolation of adv at the center of the elements
23 ! to the center of the faces
24 !
25 ! inter/extrapolation of h at the center of the elements
26 ! to the center of the faces; division through advfa to obtain
27 ! the face velocity
28 !
29  implicit none
30 !
31  integer nface,ielfa(4,*),ipo1,iel2,ipo3,i,j,icyclic,ifatie(*)
32 !
33  real*8 xrlfa(3,*),xl1,xl2,advfa(*),adv(*),hel(3,*),hfa(3,*),c(3,3)
34 !
35 c$omp parallel default(none)
36 c$omp& shared(nface,ielfa,xrlfa,advfa,adv,hfa,hel,icyclic,c,ifatie)
37 c$omp& private(i,ipo1,xl1,iel2,j,ipo3,xl2)
38 c$omp do
39  do i=1,nface
40  ipo1=ielfa(1,i)
41  xl1=xrlfa(1,i)
42  iel2=ielfa(2,i)
43  if(iel2.gt.0) then
44 !
45 ! internal face
46 !
47  xl2=xrlfa(2,i)
48  advfa(i)=1.d0/(xl1/adv(ipo1)+xl2/adv(iel2))
49  if((icyclic.eq.0).or.(ifatie(i).eq.0)) then
50  do j=1,3
51  hfa(j,i)=(xl1*hel(j,ipo1)/adv(ipo1)
52  & +xl2*hel(j,iel2)/adv(iel2))
53  enddo
54  elseif(ifatie(i).gt.0) then
55  do j=1,3
56  hfa(j,i)=(xl1*hel(j,ipo1)/adv(ipo1)
57  & +xl2*(c(j,1)*hel(1,iel2)+
58  & c(j,2)*hel(2,iel2)+
59  & c(j,3)*hel(3,iel2))/adv(iel2))
60  enddo
61  else
62  do j=1,3
63  hfa(j,i)=(xl1*hel(j,ipo1)/adv(ipo1)
64  & +xl2*(c(1,j)*hel(1,iel2)+
65  & c(2,j)*hel(2,iel2)+
66  & c(3,j)*hel(3,iel2))/adv(iel2))
67  enddo
68  endif
69  elseif(ielfa(3,i).ne.0) then
70 !
71 ! external face; linear extrapolation
72 !
73  ipo3=abs(ielfa(3,i))
74  advfa(i)=1.d0/(xl1/adv(ipo1)+xrlfa(3,i)/adv(ipo3))
75  do j=1,3
76  hfa(j,i)=(xl1*hel(j,ipo1)/adv(ipo1)+
77  & xrlfa(3,i)*hel(j,ipo3)/adv(ipo3))
78  enddo
79  else
80 !
81 ! external face: constant extrapolation (only one adjacent
82 ! element layer)
83 !
84  advfa(i)=adv(ipo1)
85  do j=1,3
86  hfa(j,i)=hel(j,ipo1)/adv(ipo1)
87  enddo
88  endif
89  enddo
90 c$omp end do
91 c$omp end parallel
92 !
93  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)