Compute rectangular dimensions and rotation of the cell using the specified rectangle vertex as the origin
164 class(CellRectQuadType),
intent(inout) :: this
166 integer(I4B) :: irv2, irv4, ipv1, ipv2, ipv4
167 integer(I4B),
dimension(4) :: irvnxt = (/2, 3, 4, 1/)
168 real(DP) :: x1, y1, x2, y2, x4, y4, dx2, dy2, dx4, dy4
171 irv2 = irvnxt(this%irvOrigin)
172 irv4 = irvnxt(irvnxt(irv2))
175 ipv1 = this%irectvert(this%irvOrigin)
176 x1 = this%defn%polyvert(1, ipv1)
177 y1 = this%defn%polyvert(2, ipv1)
178 ipv2 = this%irectvert(irv2)
179 x2 = this%defn%polyvert(1, ipv2)
180 y2 = this%defn%polyvert(2, ipv2)
181 ipv4 = this%irectvert(irv4)
182 x4 = this%defn%polyvert(1, ipv4)
183 y4 = this%defn%polyvert(2, ipv4)
188 this%zOrigin = this%defn%bot
189 dx2 = x2 - this%xOrigin
190 dy2 = y2 - this%yOrigin
191 dx4 = x4 - this%xOrigin
192 dy4 = y4 - this%yOrigin
193 this%dx = dsqrt(dx4 * dx4 + dy4 * dy4)
194 this%dy = dsqrt(dx2 * dx2 + dy2 * dy2)
195 this%dz = this%defn%top - this%zOrigin
199 this%sinrot = dy4 / this%dx
200 this%cosrot = dx4 / this%dx