45 LOGICAL,
DIMENSION(:),
ALLOCATABLE :: reflx,refly,reflz
63 CLASS(boundary_reflecting),
INTENT(INOUT) :: this
64 CLASS(physics_base),
INTENT(IN) :: Physics
65 CLASS(mesh_base),
INTENT(IN) :: Mesh
66 TYPE(Dict_TYP),
POINTER,
INTENT(IN) :: config
67 INTEGER,
INTENT(IN) :: dir
71 CALL this%InitBoundary(mesh,physics,reflecting,
boundcond_name,dir,config)
74 this%reflX(physics%VNUM), &
75 this%reflY(physics%VNUM), &
76 this%reflZ(physics%VNUM), &
79 CALL this%Error(
"InitBoundary_reflecting",
"Unable to allocate memory.")
83 CALL physics%ReflectionMasks(mesh,this%reflX,this%reflY,this%reflZ)
95 REAL,
INTENT(IN) :: time
100 SELECT CASE(
this%direction%GetType())
104 IF (
this%reflX(m))
THEN 107 pvar%data4d(mesh%IMIN-i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,m) &
108 = -pvar%data4d(mesh%IMIN+i-1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,m)
113 pvar%data4d(mesh%IMIN-i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,m) &
114 = pvar%data4d(mesh%IMIN+i-1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,m)
121 IF (
this%reflX(m))
THEN 124 pvar%data4d(mesh%IMAX+i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,m) &
125 = -pvar%data4d(mesh%IMAX-i+1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,m)
130 pvar%data4d(mesh%IMAX+i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,m) &
131 = pvar%data4d(mesh%IMAX-i+1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,m)
138 IF (
this%reflY(m))
THEN 141 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN-j,mesh%KMIN:mesh%KMAX,m) &
142 = -pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN+j-1,mesh%KMIN:mesh%KMAX,m)
147 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN-j,mesh%KMIN:mesh%KMAX,m) &
148 = pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN+j-1,mesh%KMIN:mesh%KMAX,m)
155 IF (
this%reflY(m))
THEN 158 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX+j,mesh%KMIN:mesh%KMAX,m) &
159 = -pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX-j+1,mesh%KMIN:mesh%KMAX,m)
164 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX+j,mesh%KMIN:mesh%KMAX,m) &
165 = pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX-j+1,mesh%KMIN:mesh%KMAX,m)
172 IF (
this%reflZ(m))
THEN 175 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN-k,m) &
176 = -pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN+k-1,m)
181 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN-k,m) &
182 = pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN+k-1,m)
189 IF (
this%reflZ(m))
THEN 192 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX+k,m) &
193 = -pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX-k+1,m)
198 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX+k,m) &
199 = pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX-k+1,m)
210 CLASS(boundary_reflecting),
INTENT(INOUT) :: this
212 DEALLOCATE(this%reflX,this%reflY,this%reflZ)
213 CALL this%Finalize_base()
subroutine initboundary_reflecting(this, Mesh, Physics, dir, config)
Constructor for reflecting boundary conditions.
type(logging_base), save this
derived class for compound of mesh arrays
pure subroutine setboundarydata(this, Mesh, Physics, time, pvar)
Applies the reflecting boundary condition.
Boundary module for reflecting boundaries.
named integer constants for flavour of state vectors
Dictionary for generic data types.
subroutine finalize(this)
Destructor for reflecting boundary conditions.
character(len=32), parameter boundcond_name