Skip to content
Snippets Groups Projects
Commit 2fc692d1 authored by Dave Whipp's avatar Dave Whipp
Browse files

Migrated from use of 'INCLUDE mpif.h' to 'use mpi' as that is preferred for...

Migrated from use of 'INCLUDE mpif.h' to 'use mpi' as that is preferred for modern Fortran; Trimmed commented old code
parent c9a6aeed
No related branches found
No related tags found
No related merge requests found
......@@ -29,9 +29,10 @@ subroutine create_surf(surface,is,debug)
!(((((((((((((((( declaration of the subroutine arguments ))))))))))))))))))))
!------------------------------------------------------------------------------|
use constants
use definitions
use mpi
use randomodule
use constants
implicit none
......@@ -64,8 +65,6 @@ integer nnn(1),nnlist(1),ntrilist(1)
!------------------------------------------------------------------------------|
!------------------------------------------------------------------------------|
INCLUDE 'mpif.h'
call mpi_comm_size (mpi_comm_world,nproc,ierr)
call mpi_comm_rank (mpi_comm_world,iproc,ierr)
......@@ -744,14 +743,11 @@ select case(surface_type)
endif
endif
elseif (x(i).ge.((x0-y0w)-(sp02/(2.d0*psis))) .and. x(i).lt.((x0-y0w)+(sp02/(2.d0*psis)))) then
!z(i)=sp01+(((x(i)-((x0-y0w)-(abs(sp02)/(2.d0*psis))))/(abs(sp02)/psis))*sp02)
z(i)=sp01+psis*(x(i)-((x0-y0w)-(sp02/(2.d0*psis))))
elseif (x(i).ge.((x0-y0w)+(sp02/(2.d0*psis))) .and. x(i).lt.((x0+y0w)-(sp02/(2.d0*psis)))) then
z(i)=sp01+sp02
elseif (x(i).ge.((x0+y0w)-(sp02/(2.d0*psis))) .and. x(i).lt.((x0+y0w)+(sp02/(2.d0*psis)))) then
!z(i)=sp01+(((x(i)-((x0+y0w)+(abs(sp02)/(2.d0*psis))))/(-abs(sp02)/psis))*sp02)
z(i)=sp01+psis*(x(i)-((x0+y0w)+(sp02/(2.d0*psis))))
!elseif (x(i).ge.((x0+y0w)+(sp02/(2.d0*psis)))) then
else
if (abs(flatdiff).gt.eps) then
if ((flatdiff).gt.eps) then
......@@ -773,15 +769,12 @@ select case(surface_type)
endif
elseif (y(i).ge.m2*x(i)+bb2 .and. y(i).lt.m1*x(i)+bb1) then
dist=abs(a1*x(i)+b1*y(i)+c1)/sqrt(a1**2.d0+b1**2.d0)
!z(i)=sp01+dist/(abs(sp02)/psis)*sp02
z(i)=sp01+dist*psis
elseif (y(i).lt.m2*x(i)+bb2 .and. y(i).lt.m3*x(i)+bb3) then
z(i)=sp01+sp02
elseif (y(i).ge.m3*x(i)+bb3 .and. y(i).lt.m4*x(i)+bb4) then
dist=abs(a4*x(i)+b4*y(i)+c4)/sqrt(a4**2.d0+b4**2.d0)
!z(i)=sp01+dist/(abs(sp02)/psis)*sp02
z(i)=sp01+dist*psis
!if (y(i).ge.m1*x(i)+bb1) then
else
dist=abs(a4*x(i)+b4*y(i)+c4)/sqrt(a4**2.d0+b4**2.d0)
if (abs(flatdiff).gt.eps) then
......@@ -801,12 +794,10 @@ select case(surface_type)
endif
endif
elseif (x(i).ge.((x0-y0w-(y1-y2)*theta1s)-(sp02/(2.d0*psis))) .and. x(i).lt.((x0-y0w-(y1-y2)*theta1s)+(sp02/(2.d0*psis)))) then
!z(i)=sp01+(((x(i)-((x0-y0w-(y1-y2)*theta1s)-(sp02/(2.d0*psis))))/(sp02/psis))*sp02)
z(i)=sp01+psis*(x(i)-((x0-y0w-(y1-y2)*theta1s)-(sp02/(2.d0*psis))))
elseif (x(i).ge.((x0-y0w-(y1-y2)*theta1s)+(abs(sp02)/(2.d0*psis))) .and. x(i).lt.((x0+y0w+(y1-y2)*theta1s)-(abs(sp02)/(2.d0*psis)))) then
z(i)=sp01+sp02
elseif (x(i).ge.((x0+y0w+(y1-y2)*theta1s)-(abs(sp02)/(2.d0*psis))) .and. x(i).lt.((x0+y0w+(y1-y2)*theta1s)+(abs(sp02)/(2.d0*psis)))) then
!z(i)=sp01+(((x(i)-((x0+y0w+(y1-y2)*theta1s)+(abs(sp02)/(2.d0*psis))))/(-abs(sp02)/psis))*sp02)
z(i)=sp01+psis*(x(i)-((x0+y0w+(y1-y2)*theta1s)+(sp02/(2.d0*psis))))
else
if (abs(flatdiff).gt.eps) then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment