Skip to content

Commit

Permalink
Merge pull request #71 from ucns3d-team/ReconFixR
Browse files Browse the repository at this point in the history
fix reconstruction gnu compiler bug
  • Loading branch information
TakisCFD authored Mar 4, 2024
2 parents d018352 + 8ffed23 commit ffad4af
Showing 1 changed file with 197 additions and 52 deletions.
249 changes: 197 additions & 52 deletions src/reconstruct_p.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7780,6 +7780,10 @@ SUBROUTINE ARBITRARY_ORDER3(N)


KMAXE=XMPIELRANK(N)



ielem(n,1:kmaxe)%REDUCE=0

SELECT CASE(IWENO)

Expand Down Expand Up @@ -7935,7 +7939,10 @@ SUBROUTINE ARBITRARY_ORDER2(N)


KMAXE=XMPIELRANK(N)


ielem(n,1:kmaxe)%REDUCE=0


SELECT CASE(IWENO)


Expand Down Expand Up @@ -10498,6 +10505,11 @@ SUBROUTINE CHECKSOL(N)
KMAXE=XMPIELRANK(N)
jump_cond=0.85






IF (ITESTCASE.GE.3)THEN

!$OMP DO SCHEDULE (STATIC)
Expand Down Expand Up @@ -10529,25 +10541,55 @@ SUBROUTINE CHECKSOL(N)



IF (((ABS(LEFTV(1)-RIGHTV(1))).GE.(jump_cond*RIGHTV(1))).OR.((ABS(LEFTV(5)-RIGHTV(5))).GE.(jump_cond*RIGHTV(5)))) THEN
IELEM(N,I)%REDUCE=1
! PRINT*,"H--1",LEFTV(1),RIGHTV(1)
if (multispecies.EQ.1)then

END IF


IF (((ABS(LEFTV(8)-RIGHTV(8))).GE.(jump_cond*RIGHTV(8))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
END IF

if (multispecies.eq.1)then
IF (leftv(8).lt.0.0)then
REDUCE1=1
IELEM(N,I)%REDUCE=1
END IF

! IF (((ABS(LEFTV(8)-RIGHTV(8))).GE.(jump_cond*RIGHTV(8))).or.(leftv(8).lt.-0.01))then
! IELEM(N,I)%REDUCE=1
!
! END IF
!
!
!
end if

IF (((ABS(LEFTV(1)-RIGHTV(1))).GE.(jump_cond*RIGHTV(1))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if


IF ((LEFTV(1).LT.0.0))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if



IF ((LEFTV(5).LT.0.0))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if



else
IF (((ABS(LEFTV(1)-RIGHTV(1))).GE.(jump_cond*RIGHTV(1))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

IF (((ABS(LEFTV(5)-RIGHTV(5))).GE.(jump_cond*RIGHTV(5))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

IF ((LEFTV(5).LT.0.0).OR.(LEFTV(1).LT.0.0))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

end if


END DO
Expand Down Expand Up @@ -10587,13 +10629,16 @@ SUBROUTINE CHECKSOLX(N)
KMAXE=XMPIELRANK(N)
jump_cond=0.95




IF (ITESTCASE.GE.3)THEN

!$OMP DO SCHEDULE (STATIC)
DO I=1,KMAXE !ALL ELEMENTS



REDUCE1=0

if (ielem(n,i)%troubled.eq.1)then

Expand All @@ -10610,25 +10655,57 @@ SUBROUTINE CHECKSOLX(N)
RIGHTV(1:NOF_VARIABLES)=U_C(I)%VAL(1,1:NOF_VARIABLES)
CALL CONS2PRIM2(N)

if (multispecies.EQ.1)then

IF (((ABS(LEFTV(8)-RIGHTV(8))).GE.(jump_cond*RIGHTV(8))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
END IF

IF (((ABS(LEFTV(1)-RIGHTV(1))).GE.(jump_cond*RIGHTV(1))).OR.((ABS(LEFTV(5)-RIGHTV(5))).GE.(jump_cond*RIGHTV(5)))) THEN
IELEM(N,I)%REDUCE=1
IF (leftv(8).lt.0.0)then
REDUCE1=1
IELEM(N,I)%REDUCE=1
END IF

IF (((ABS(LEFTV(1)-RIGHTV(1))).GE.(jump_cond*RIGHTV(1))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if


IF ((LEFTV(1).LT.0.0))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

END IF
if (multispecies.eq.1)then
! IF (((ABS(LEFTV(7)-RIGHTV(7))).GE.(jump_cond*RIGHTV(7))).or.(leftv(7).lt.zero))then
! REDUCE1=1
!
! END IF

end if


IF ((LEFTV(5).LT.0.0))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if



else
IF (((ABS(LEFTV(1)-RIGHTV(1))).GE.(jump_cond*RIGHTV(1))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

IF (((ABS(LEFTV(5)-RIGHTV(5))).GE.(jump_cond*RIGHTV(5))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

IF ((LEFTV(5).LT.0.0).OR.(LEFTV(1).LT.0.0))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

end if


END DO
END DO

Expand Down Expand Up @@ -10712,6 +10789,10 @@ SUBROUTINE CHECKSOL2D(N)
KMAXE=XMPIELRANK(N)
jump_cond=0.85





IF (ITESTCASE.GE.3)THEN

!$OMP DO SCHEDULE (STATIC)
Expand All @@ -10737,23 +10818,48 @@ SUBROUTINE CHECKSOL2D(N)



IF (((ABS(LEFTV(1)-RIGHTV(1))).GE.(jump_cond*RIGHTV(1))).OR.((ABS(LEFTV(4)-RIGHTV(4))).GE.(jump_cond*RIGHTV(4)))) THEN
REDUCE1=1
if (multispecies.EQ.1)then

IELEM(N,I)%REDUCE=1
END IF
if (multispecies.eq.1)then
IF (((ABS(LEFTV(7)-RIGHTV(7))).GE.(jump_cond*RIGHTV(7))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
END IF

IF (leftv(7).lt.0.0)then
REDUCE1=1
IELEM(N,I)%REDUCE=1
END IF

! IF (((ABS(LEFTV(7)-RIGHTV(7))).GE.(jump_cond*RIGHTV(7))).or.(leftv(7).lt.-0.00001))then
! REDUCE1=1
! IELEM(N,I)%REDUCE=1
! END IF



end if
IF (((ABS(LEFTV(1)-RIGHTV(1))).GE.(jump_cond*RIGHTV(1))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if


IF ((LEFTV(1).LT.0.0))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if



else
IF (((ABS(LEFTV(1)-RIGHTV(1))).GE.(jump_cond*RIGHTV(1))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

IF (((ABS(LEFTV(4)-RIGHTV(4))).GE.(jump_cond*RIGHTV(4))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

IF ((LEFTV(4).LT.0.0).OR.(LEFTV(1).LT.0.0))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

end if



Expand Down Expand Up @@ -10790,6 +10896,8 @@ SUBROUTINE CHECKSOL2DX(N)
KMAXE=XMPIELRANK(N)
jump_cond=0.95



IF (ITESTCASE.GE.3)THEN

!$OMP DO SCHEDULE (STATIC)
Expand All @@ -10809,23 +10917,60 @@ SUBROUTINE CHECKSOL2DX(N)



IF (((ABS(LEFTV(1)-RIGHTV(1))).GE.(jump_cond*RIGHTV(1))).OR.((ABS(LEFTV(4)-RIGHTV(4))).GE.(jump_cond*RIGHTV(4)))) THEN
REDUCE1=1
IELEM(N,I)%REDUCE=1
if (multispecies.EQ.1)then

IF (((ABS(LEFTV(7)-RIGHTV(7))).GE.(jump_cond*RIGHTV(7))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
END IF

END IF
if (multispecies.eq.1)then
IF (leftv(7).lt.0.0)then
REDUCE1=1
IELEM(N,I)%REDUCE=1
END IF

IF (((ABS(LEFTV(1)-RIGHTV(1))).GE.(jump_cond*RIGHTV(1))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if


IF ((LEFTV(1).LT.0.0))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if



IF ((LEFTV(4).LT.0.0))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if






else
IF (((ABS(LEFTV(1)-RIGHTV(1))).GE.(jump_cond*RIGHTV(1))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

IF (((ABS(LEFTV(4)-RIGHTV(4))).GE.(jump_cond*RIGHTV(4))))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

! IF (((ABS(LEFTV(7)-RIGHTV(7))).GE.(jump_cond*RIGHTV(7))).or.(leftv(7).lt.zero))then
! REDUCE1=1
!
! END IF


IF ((LEFTV(4).LT.0.0).OR.(LEFTV(1).LT.0.0))then
REDUCE1=1
IELEM(N,I)%REDUCE=1
end if

end if
end if



Expand Down

0 comments on commit ffad4af

Please sign in to comment.