72 REAL,
DIMENSION(:,:,:,:),
POINTER :: sendbuf, & !< send buffer for boundary data
77 procedure(setboundarydata),
DEFERRED :: setboundarydata
86 PURE SUBROUTINE setboundarydata(this,Mesh,Physics,time,pvar)
92 REAL,
INTENT(IN) :: time
104 CHARACTER(LEN=32),
DIMENSION(6),
PARAMETER :: &
105 direction_name = (/
' west',
' east',
' south',
' north',
'bottom',
' top' /)
111 enumerator :: no_gradients = z
'01', &
113 reflecting = z
'03', &
118 extrapolation = z
'07', &
136 no_gradients, periodic, reflecting, axis, &
138 fixed, extrapolation, &
149 SUBROUTINE initboundary(this,Mesh,Physics,bctype,bcname,dir,config)
152 CLASS(boundary_base),
INTENT(INOUT) :: this
153 CLASS(mesh_base),
INTENT(IN) :: Mesh
154 CLASS(physics_base),
INTENT(IN) :: Physics
155 TYPE(Dict_TYP),
INTENT(IN),
POINTER :: config
156 INTEGER,
INTENT(IN) :: bctype,dir
157 CHARACTER(LEN=32),
INTENT(IN) :: bcname
160 INTEGER,
PARAMETER :: strlen = 32
161 CHARACTER(LEN=strlen) :: sendbuf
162 CHARACTER(LEN=strlen) :: recvbuf
163 INTEGER :: status(MPI_STATUS_SIZE)
168 CALL this%InitLogging(bctype,bcname)
169 ALLOCATE(this%direction)
173 CASE(west,east,north,south,top,bottom)
176 CALL this%Error(
"InitBoundary_common",
"Unknown direction")
194 IF (this%GetRank() .EQ. 0 .AND. this%GetRank().EQ.mesh%rank0_boundaries(dir))
THEN 197 CALL this%Info(
" BOUNDARY-> condition: " // trim(this%direction%GetName()) &
198 //
" " // trim(this%GetName()), this%GetRank())
200 ELSE IF (this%GetRank().EQ.mesh%rank0_boundaries(dir))
THEN 202 sendbuf = trim(this%direction%GetName())//
" "//trim(this%GetName())
203 CALL mpi_send(sendbuf,strlen,mpi_character,0, &
204 0,mpi_comm_world,ierror)
205 ELSE IF (this%GetRank().EQ.0)
THEN 207 CALL mpi_recv(recvbuf,strlen,mpi_character,mesh%rank0_boundaries(dir),&
208 mpi_any_tag,mpi_comm_world,status,ierror)
209 CALL this%Info(
" BOUNDARY-> condition: " // trim(recvbuf),this%GetRank())
222 dir = this%direction%GetType()
229 CLASS(boundary_base),
INTENT(INOUT) :: this
231 IF (.NOT.this%Initialized()) &
232 CALL this%Error(
"CloseBoundary_one",
"not initialized")
233 DEALLOCATE(this%direction)
subroutine finalize(this)
Destructor of common class.
pure integer function getdirection(this)
Get the direction number.
type(logging_base), save this
derived class for compound of mesh arrays
subroutine initboundary(this, Mesh, Physics, bctype, bcname, dir, config)
subroutine finalize_base(this)
named integer constants for flavour of state vectors
Dictionary for generic data types.
integer, parameter none
periodic with shear for shearing sheet/box
character(len=32), dimension(6), parameter direction_name
string literal for each orientation