Skip to content

Commit

Permalink
Merge pull request #65 from ucns3d-team/dtrig
Browse files Browse the repository at this point in the history
changed cosd sind to cos/sin
  • Loading branch information
TakisCFD authored Oct 5, 2023
2 parents a88ce98 + 32b69c3 commit 2a4f853
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/grid_p.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4641,13 +4641,13 @@ SUBROUTINE CHECK_CONDITION(N,IWHICHSTEN,ISATISFIED,IPERIODICITY,XPER,YPER,ZPER,I
ELSE
if (IS_PERIODIC.eq.2) then
tempxx=VG(N,1)
VGg(1)=tempxx*cosd(angle_per)-VGg(2)*sind(angle_per)
VGg(2)=tempxx*sind(angle_per)+VGg(2)*cosd(angle_per)
VGg(1)=tempxx*cos(angle_per)-VGg(2)*sin(angle_per)
VGg(2)=tempxx*sin(angle_per)+VGg(2)*cos(angle_per)
end if
if (IS_PERIODIC.eq.1) then
tempxx=VG(N,1)
VGg(1)=tempxx*cosd(-angle_per)-VGg(2)*sind(-angle_per)
VGg(2)=tempxx*sind(-angle_per)+VGg(2)*cosd(-angle_per)
VGg(1)=tempxx*cos(-angle_per)-VGg(2)*sin(-angle_per)
VGg(2)=tempxx*sin(-angle_per)+VGg(2)*cos(-angle_per)
end if
END IF
END IF
Expand Down Expand Up @@ -4676,13 +4676,13 @@ SUBROUTINE CHECK_CONDITION(N,IWHICHSTEN,ISATISFIED,IPERIODICITY,XPER,YPER,ZPER,I
ELSE
if (IS_PERIODIC.eq.2) then
tempxx=VG(N,1)
VGg(1)=tempxx*cosd(angle_per)-VGg(2)*sind(angle_per)
VGg(2)=tempxx*sind(angle_per)+VGg(2)*cosd(angle_per)
VGg(1)=tempxx*cos(angle_per)-VGg(2)*sin(angle_per)
VGg(2)=tempxx*sin(angle_per)+VGg(2)*cos(angle_per)
end if
if (IS_PERIODIC.eq.1) then
tempxx=VG(N,1)
VGg(1)=tempxx*cosd(-angle_per)-VGg(2)*sind(-angle_per)
VGg(2)=tempxx*sind(-angle_per)+VGg(2)*cosd(-angle_per)
VGg(1)=tempxx*cos(-angle_per)-VGg(2)*sin(-angle_per)
VGg(2)=tempxx*sin(-angle_per)+VGg(2)*cos(-angle_per)
end if
END IF
END IF
Expand All @@ -4706,13 +4706,13 @@ SUBROUTINE CHECK_CONDITION(N,IWHICHSTEN,ISATISFIED,IPERIODICITY,XPER,YPER,ZPER,I
ELSE
if (IS_PERIODIC.eq.2) then
tempxx=VG(N,1)
VGg(1)=tempxx*cosd(angle_per)-VGg(2)*sind(angle_per)
VGg(2)=tempxx*sind(angle_per)+VGg(2)*cosd(angle_per)
VGg(1)=tempxx*cos(angle_per)-VGg(2)*sin(angle_per)
VGg(2)=tempxx*sin(angle_per)+VGg(2)*cos(angle_per)
end if
if (IS_PERIODIC.eq.1) then
tempxx=VG(N,1)
VGg(1)=tempxx*cosd(-angle_per)-VGg(2)*sind(-angle_per)
VGg(2)=tempxx*sind(-angle_per)+VGg(2)*cosd(-angle_per)
VGg(1)=tempxx*cos(-angle_per)-VGg(2)*sin(-angle_per)
VGg(2)=tempxx*sin(-angle_per)+VGg(2)*cos(-angle_per)
end if
END IF
END IF
Expand All @@ -4736,13 +4736,13 @@ SUBROUTINE CHECK_CONDITION(N,IWHICHSTEN,ISATISFIED,IPERIODICITY,XPER,YPER,ZPER,I
ELSE
if (IS_PERIODIC.eq.2) then
tempxx=VG(N,1)
VGg(1)=tempxx*cosd(angle_per)-VGg(2)*sind(angle_per)
VGg(2)=tempxx*sind(angle_per)+VGg(2)*cosd(angle_per)
VGg(1)=tempxx*cos(angle_per)-VGg(2)*sin(angle_per)
VGg(2)=tempxx*sin(angle_per)+VGg(2)*cos(angle_per)
end if
if (IS_PERIODIC.eq.1) then
tempxx=VG(N,1)
VGg(1)=tempxx*cosd(-angle_per)-VGg(2)*sind(-angle_per)
VGg(2)=tempxx*sind(-angle_per)+VGg(2)*cosd(-angle_per)
VGg(1)=tempxx*cos(-angle_per)-VGg(2)*sin(-angle_per)
VGg(2)=tempxx*sin(-angle_per)+VGg(2)*cos(-angle_per)
end if
END IF
END IF
Expand Down Expand Up @@ -4775,13 +4775,13 @@ SUBROUTINE CHECK_CONDITION(N,IWHICHSTEN,ISATISFIED,IPERIODICITY,XPER,YPER,ZPER,I
if (IS_PERIODIC.eq.2) then

tempxx=VG(N,1)
VGg(1)=tempxx*cosd(angle_per)-VGg(2)*sind(angle_per)
VGg(2)=tempxx*sind(angle_per)+VGg(2)*cosd(angle_per)
VGg(1)=tempxx*cos(angle_per)-VGg(2)*sin(angle_per)
VGg(2)=tempxx*sin(angle_per)+VGg(2)*cos(angle_per)
end if
if (IS_PERIODIC.eq.1) then
tempxx=VG(N,1)
VGg(1)=tempxx*cosd(-angle_per)-VGg(2)*sind(-angle_per)
VGg(2)=tempxx*sind(-angle_per)+VGg(2)*cosd(-angle_per)
VGg(1)=tempxx*cos(-angle_per)-VGg(2)*sin(-angle_per)
VGg(2)=tempxx*sin(-angle_per)+VGg(2)*cos(-angle_per)
end if
END IF
END IF
Expand Down Expand Up @@ -7149,8 +7149,8 @@ FUNCTION ROTATE_PER(VECT_PER,CODE_PER,ANGLE_PERIOD)
angle_temp=angle_period
end if

ROTATE_PER(1)=VECT_PER(1)*cosd(angle_temp)-VECT_PER(2)*sind(angle_temp)
ROTATE_PER(2)=VECT_PER(1)*sind(angle_temp)+VECT_PER(2)*cosd(angle_temp)
ROTATE_PER(1)=VECT_PER(1)*cos(angle_temp)-VECT_PER(2)*sin(angle_temp)
ROTATE_PER(2)=VECT_PER(1)*sin(angle_temp)+VECT_PER(2)*cos(angle_temp)
ROTATE_PER(3)=Vect_PER(3)


Expand All @@ -7170,8 +7170,8 @@ FUNCTION ROTATE_PER_1(VECT_PER,CODE_PER,ANGLE_PERIOD)
angle_temp=-angle_period
end if

ROTATE_PER_1(1)=VECT_PER(1)*cosd(angle_temp)-VECT_PER(2)*sind(angle_temp)
ROTATE_PER_1(2)=VECT_PER(1)*sind(angle_temp)+VECT_PER(2)*cosd(angle_temp)
ROTATE_PER_1(1)=VECT_PER(1)*cos(angle_temp)-VECT_PER(2)*sin(angle_temp)
ROTATE_PER_1(2)=VECT_PER(1)*sin(angle_temp)+VECT_PER(2)*cos(angle_temp)
ROTATE_PER_1(3)=Vect_PER(3)


Expand Down

0 comments on commit 2a4f853

Please sign in to comment.