Skip to content

Commit

Permalink
primitive variable recon 3d
Browse files Browse the repository at this point in the history
fixed an issue with primitive variable reconstruction for 3D meshes
  • Loading branch information
TakisCFD committed May 24, 2021
1 parent 1bb94f9 commit 1e5c8ff
Showing 1 changed file with 44 additions and 11 deletions.
55 changes: 44 additions & 11 deletions CODE/reconstruct_p.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1027,12 +1027,7 @@ SUBROUTINE WENOWEIGHTS(N)
CALL EXTRAPOLATE_BOUND(IEX,L,NGP,I,ICD,LL)


if (wenwrt.eq.3)then
leftv(1:nof_variables)=ILOCAL_RECON3(I)%ULEFT(1:NOF_vARIABLES,l,ngp)
call prim2cons(n)
ILOCAL_RECON3(I)%ULEFT(1:NOF_vARIABLES,l,ngp)=leftv(1:nof_variables)
end if




! ILOCAL_RECON3(I)%ULEFT(1:NOF_vARIABLES,L,NGP)=ILOCAL_RECON3(I)%ULEFT(1:NOF_vARIABLES,L,NGP)&
Expand All @@ -1042,6 +1037,28 @@ SUBROUTINE WENOWEIGHTS(N)
end do

end do



if (wenwrt.eq.3)then

DO L=1,IELEM(N,I)%IFCA

if (ielem(n,i)%types_faces(L).eq.5)then
iqp=qp_quad;WEIGHT_T2(1:IQP)=WEIGHTS_Q(1:IQP)
else
iqp=qp_triangle;WEIGHT_T2(1:IQP)=WEIGHTS_T(1:IQP)
end if
do NGP=1,iqp
leftv(1:nof_variables)=ILOCAL_RECON3(I)%ULEFT(1:NOF_vARIABLES,l,ngp)
call prim2cons(n)
ILOCAL_RECON3(I)%ULEFT(1:NOF_vARIABLES,l,ngp)=leftv(1:nof_variables)
end do
end do

end if




END IF
Expand Down Expand Up @@ -1852,17 +1869,33 @@ SUBROUTINE WENOWEIGHTS(N)
ICD=ICD+1

CALL EXTRAPOLATE_BOUND(IEX,L,NGP,I,ICD,LL)
if (wenwrt.eq.3)then
leftv(1:nof_variables)=ILOCAL_RECON3(I)%ULEFT(1:NOF_vARIABLES,l,ngp)
call prim2cons(n)
ILOCAL_RECON3(I)%ULEFT(1:NOF_vARIABLES,l,ngp)=leftv(1:nof_variables)
end if


! ILOCAL_RECON3(I)%ULEFT(1:NOF_vARIABLES,L,NGP)=ILOCAL_RECON3(I)%ULEFT(1:NOF_vARIABLES,L,NGP)&
! +((U_C(I)%VAL(1,1:NOF_vARIABLES)+RESSOLUTION(icd,1:NOF_vARIABLES) )*WENO(1:NOF_vARIABLES,LL))
end do
end do
end do

if (wenwrt.eq.3)then

DO L=1,IELEM(N,I)%IFCA

if (ielem(n,i)%types_faces(L).eq.5)then
iqp=qp_quad;WEIGHT_T2(1:IQP)=WEIGHTS_Q(1:IQP)
else
iqp=qp_triangle;WEIGHT_T2(1:IQP)=WEIGHTS_T(1:IQP)
end if
do NGP=1,iqp
leftv(1:nof_variables)=ILOCAL_RECON3(I)%ULEFT(1:NOF_vARIABLES,l,ngp)
call prim2cons(n)
ILOCAL_RECON3(I)%ULEFT(1:NOF_vARIABLES,l,ngp)=leftv(1:nof_variables)
end do
end do

end if


END IF!WENWRT2

!TURBULENCE
Expand Down

0 comments on commit 1e5c8ff

Please sign in to comment.