12 double precision :: dx
13 double precision :: dy
14 double precision :: dz
16 double precision :: sinrot
17 double precision :: cosrot
20 double precision :: xorigin
21 double precision :: yorigin
22 double precision :: zorigin
24 double precision :: qextl1(4), qextl2(4), qintl(5)
25 integer,
allocatable :: irectvert(:)
26 integer,
allocatable :: ipv4irv(:, :)
27 double precision,
allocatable :: rectflow(:, :)
47 allocate (cell%irectvert(5))
48 allocate (cell%ipv4irv(2, 4))
49 allocate (cell%rectflow(2, 4))
51 cell%type =
'rectquad'
57 deallocate (this%defn)
58 deallocate (this%irectvert)
59 deallocate (this%type)
67 call this%load_irectvert()
79 integer :: npolyverts, n, m
81 npolyverts = this%defn%get_npolyverts()
85 if (.not. this%defn%get_ispv180(m))
then
88 this%ipv4irv(1, n) = m
89 this%rectflow(1, n) = this%defn%get_faceflow(m)
90 this%ipv4irv(2, n) = 0
91 this%rectflow(2, n) = 0d0
94 this%ipv4irv(2, n) = m
95 this%rectflow(2, n) = this%defn%get_faceflow(m)
101 this%irectvert(5) = this%irectvert(1)
114 integer :: irv, irv2, irv4, ipv1, ipv2, ipv4
115 integer,
dimension(4) :: irvnxt = (/2, 3, 4, 1/)
116 double precision :: x1, y1, x2, y2, x4, y4
128 ipv4 = this%irectvert(irv4)
129 ipv1 = this%irectvert(irv1)
130 x4 = this%defn%polyvert(1, ipv4)
131 y4 = this%defn%polyvert(2, ipv4)
132 x1 = this%defn%polyvert(1, ipv1)
133 y1 = this%defn%polyvert(2, ipv1)
136 ipv2 = this%irectvert(irv2)
137 x2 = this%defn%polyvert(1, ipv2)
138 if (x2 .le. x1)
return
139 else if (y1 .ge. y4)
then
141 ipv2 = this%irectvert(irv2)
142 y2 = this%defn%polyvert(2, ipv2)
143 if (y2 .gt. y1)
return
155 dx, dy, dz, sinrot, cosrot)
159 double precision :: xOrigin, yOrigin, zOrigin, dx, dy, dz, sinrot, cosrot
161 integer :: irv2, irv4, ipv1, ipv2, ipv4
162 integer,
dimension(4) :: irvnxt = (/2, 3, 4, 1/)
163 double precision :: x1, y1, x2, y2, x4, y4, dx2, dy2, dx4, dy4
167 irv4 = irvnxt(irvnxt(irv2))
170 ipv1 = this%irectvert(irv1)
171 x1 = this%defn%polyvert(1, ipv1)
172 y1 = this%defn%polyvert(2, ipv1)
173 ipv2 = this%irectvert(irv2)
174 x2 = this%defn%polyvert(1, ipv2)
175 y2 = this%defn%polyvert(2, ipv2)
176 ipv4 = this%irectvert(irv4)
177 x4 = this%defn%polyvert(1, ipv4)
178 y4 = this%defn%polyvert(2, ipv4)
183 zorigin = this%defn%bot
188 dx = dsqrt(dx4 * dx4 + dy4 * dy4)
189 dy = dsqrt(dx2 * dx2 + dy2 * dy2)
190 dz = this%defn%top - zorigin
202 double precision :: rectflow
203 rectflow = this%rectflow(iq, irv)
211 logical :: is_refined
213 if (this%ipv4irv(2, i) .ne. 0)
then
subroutine, public create_defn(cellDefn)
Create a new cell definition object.
subroutine, public create_cell_rect_quad(cell)
Create a new rectangular-quad cell.
logical function face_is_refined(this, i)
Return whether a rectangle face is refined.
integer function get_irectvertsw(this)
Get index of SW rectangle vertex.
subroutine init_from(this, defn)
Initialize a rectangular-quad cell from another cell.
subroutine destroy_cell_rect_quad(this)
Destroy the rectangular-quad cell.
subroutine get_rectdimensionsrotation(this, irv1, xOrigin, yOrigin, zOrigin, dx, dy, dz, sinrot, cosrot)
Get rectangular cell dimensions and rotation.
double precision function get_rectflow(this, iq, irv)
Return a rectangle face flow.
subroutine load_irectvert(this)
Load local polygon vertex indices.
Base grid cell definition.
Base type for grid cells of a concrete type. Contains a cell-definition which is information shared b...