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

Go to the source code of this file.

Functions/Subroutines

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

Function/Subroutine Documentation

◆ extrapolate_ad_h()

subroutine extrapolate_ad_h ( 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,*),
34  & c(3,3)
35 !
36 c$omp parallel default(none)
37 c$omp& shared(nface,ielfa,xrlfa,advfa,adv,hfa,hel,icyclic,c,ifatie)
38 c$omp& private(i,ipo1,xl1,iel2,j,ipo3,xl2)
39 c$omp do
40  do i=1,nface
41  ipo1=ielfa(1,i)
42  xl1=xrlfa(1,i)
43  iel2=ielfa(2,i)
44  if(iel2.gt.0) then
45 !
46 ! internal face
47 !
48  xl2=xrlfa(2,i)
49  advfa(i)=xl1*adv(ipo1)+xl2*adv(iel2)
50 c write(*,*) 'extrapolate_ad_h ',i,ipo1,adv(ipo1),iel2,
51 c & adv(iel2),xl1,xl2
52  if((icyclic.eq.0).or.(ifatie(i).eq.0)) then
53  do j=1,3
54  hfa(j,i)=(xl1*hel(j,ipo1)
55  & +xl2*hel(j,iel2))/advfa(i)
56  enddo
57  elseif(ifatie(i).gt.0) then
58  do j=1,3
59  hfa(j,i)=(xl1*hel(j,ipo1)
60  & +xl2*(c(j,1)*hel(1,iel2)+
61  & c(j,2)*hel(2,iel2)+
62  & c(j,3)*hel(3,iel2)))/advfa(i)
63  enddo
64  else
65  do j=1,3
66  hfa(j,i)=(xl1*hel(j,ipo1)
67  & +xl2*(c(1,j)*hel(1,iel2)+
68  & c(2,j)*hel(2,iel2)+
69  & c(3,j)*hel(3,iel2)))/advfa(i)
70  enddo
71  endif
72  elseif(ielfa(3,i).ne.0) then
73 !
74 ! external face; linear extrapolation
75 !
76  ipo3=abs(ielfa(3,i))
77  advfa(i)=xl1*adv(ipo1)+xrlfa(3,i)*adv(ipo3)
78  do j=1,3
79  hfa(j,i)=(xl1*hel(j,ipo1)+xrlfa(3,i)*hel(j,ipo3))
80  & /advfa(i)
81  enddo
82  else
83 !
84 ! external face: constant extrapolation (only one adjacent
85 ! element layer)
86 !
87  advfa(i)=adv(ipo1)
88  do j=1,3
89  hfa(j,i)=hel(j,ipo1)/advfa(i)
90  enddo
91  endif
92  enddo
93 c$omp end do
94 c$omp end parallel
95 !
96  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)