Compute rectangular dimensions and rotation of the cell using the specified rectangle vertex as the origin
156 class(CellRectQuadType),
intent(inout) :: this
158 integer(I4B) :: irv2, irv4, ipv1, ipv2, ipv4
159 integer(I4B),
dimension(4) :: irvnxt = (/2, 3, 4, 1/)
160 real(DP) :: x1, y1, x2, y2, x4, y4, dx2, dy2, dx4, dy4
163 irv2 = irvnxt(this%irvOrigin)
164 irv4 = irvnxt(irvnxt(irv2))
167 ipv1 = this%irectvert(this%irvOrigin)
168 x1 = this%defn%polyvert(1, ipv1)
169 y1 = this%defn%polyvert(2, ipv1)
170 ipv2 = this%irectvert(irv2)
171 x2 = this%defn%polyvert(1, ipv2)
172 y2 = this%defn%polyvert(2, ipv2)
173 ipv4 = this%irectvert(irv4)
174 x4 = this%defn%polyvert(1, ipv4)
175 y4 = this%defn%polyvert(2, ipv4)
180 this%zOrigin = this%defn%bot
181 dx2 = x2 - this%xOrigin
182 dy2 = y2 - this%yOrigin
183 dx4 = x4 - this%xOrigin
184 dy4 = y4 - this%yOrigin
185 this%dx = dsqrt(dx4 * dx4 + dy4 * dy4)
186 this%dy = dsqrt(dx2 * dx2 + dy2 * dy2)
187 this%dz = this%defn%top - this%zOrigin
191 this%sinrot = dy4 / this%dx
192 this%cosrot = dx4 / this%dx