47 REAL,
DIMENSION(:,:,:,:),
ALLOCATABLE :: data
48 LOGICAL,
DIMENSION(:,:,:),
ALLOCATABLE :: fixed
66 CLASS(Boundary_fixed) :: this
67 CLASS(Mesh_base) :: Mesh
68 CLASS(Physics_base) :: Physics
69 TYPE(Dict_TYP),
POINTER:: config
74 INTENT(IN) :: mesh,physics,config
77 CALL this%InitBoundary(mesh,physics,fixed,
boundcond_name,dir,config)
80 SELECT CASE(this%direction%GetType())
82 ALLOCATE(this%data(mesh%GINUM,mesh%JGMIN:mesh%JGMAX,mesh%KGMIN:mesh%KGMAX,physics%VNUM), &
83 this%fixed(mesh%JGMIN:mesh%JGMAX,mesh%KGMIN:mesh%KGMAX,physics%VNUM), &
86 ALLOCATE(this%data(mesh%IGMIN:mesh%IGMAX,mesh%GJNUM,mesh%KGMIN:mesh%KGMAX,physics%VNUM), &
87 this%fixed(mesh%KGMIN:mesh%KGMAX,mesh%IGMIN:mesh%IGMAX,physics%VNUM), &
90 ALLOCATE(this%data(mesh%IGMIN:mesh%IGMAX,mesh%JGMIN:mesh%JGMAX,mesh%GKNUM,physics%VNUM), &
91 this%fixed(mesh%IGMIN:mesh%IGMAX,mesh%JGMIN:mesh%JGMAX,physics%VNUM), &
95 CALL this%Error(
"InitBoundary_fixed",
"Unable to allocate memory.")
98 this%fixed(:,:,:) = .false.
99 this%data(:,:,:,:) = 0.0
110 REAL,
INTENT(IN) :: time
115 SELECT CASE(
this%direction%GetType())
122 WHERE(
this%fixed(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:))
124 pvar%data4d(mesh%IMIN-i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:) = &
125 this%data(i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:)
128 pvar%data4d(mesh%IMIN-i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:) = &
129 (i+1)*pvar%data4d(mesh%IMIN,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:) &
130 - i*pvar%data4d(mesh%IMIN+1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:)
137 WHERE(
this%fixed(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:))
139 pvar%data4d(mesh%IMAX+i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:) = &
140 this%data(i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:)
143 pvar%data4d(mesh%IMAX+i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:) = &
144 (i+1)*pvar%data4d(mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:) &
145 - i*pvar%data4d(mesh%IMAX-1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,:)
151 WHERE(
this%fixed(mesh%KMIN:mesh%KMAX,mesh%IMIN:mesh%IMAX,:))
153 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN-j,mesh%KMIN:mesh%KMAX,:) = &
154 this%data(mesh%IMIN:mesh%IMAX,j,mesh%KMIN:mesh%KMAX,:)
157 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN-j,mesh%KMIN:mesh%KMAX,:) = &
158 (j+1)*pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN,mesh%KMIN:mesh%KMAX,:) &
159 - j*pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN+1,mesh%KMIN:mesh%KMAX,:)
165 WHERE(
this%fixed(mesh%KMIN:mesh%KMAX,mesh%IMIN:mesh%IMAX,:))
167 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX+j,mesh%KMIN:mesh%KMAX,:) = &
168 this%data(mesh%IMIN:mesh%IMAX,j,mesh%KMIN:mesh%KMAX,:)
171 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX+j,mesh%KMIN:mesh%KMAX,:) = &
172 (j+1)*pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX,mesh%KMIN:mesh%KMAX,:) &
173 - j*pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX-1,mesh%KMIN:mesh%KMAX,:)
180 WHERE(
this%fixed(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,:))
182 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN-k,:) = &
183 this%data(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k,:)
186 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN-k,:) = &
187 (k+1)*pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN,:) &
188 - k*pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN+1,:)
194 WHERE(
this%fixed(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,:))
196 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX+k,:) = &
197 this%data(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k,:)
200 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX+k,:) = &
201 (k+1)*pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX,:) &
202 - k*pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX-1,:)
212 CLASS(Boundary_fixed),
INTENT(INOUT) :: this
214 DEALLOCATE(this%data,this%fixed)
215 CALL this%Finalize_base()
subroutine finalize(this)
Destructor for fixed boundary conditions.
type(logging_base), save this
derived class for compound of mesh arrays
subroutine initboundary_fixed(this, Mesh, Physics, dir, config)
Constructor for fixed boundary conditions.
character(len=32), parameter boundcond_name
named integer constants for flavour of state vectors
pure subroutine setboundarydata(this, Mesh, Physics, time, pvar)
Applies the fixed boundary condition.
Dictionary for generic data types.
Boundary module for fixed in/outflow conditions.