72 generic ::
operator(.eq.) => equal
93 integer,
public,
parameter,
dimension(4, 6) ::
face_nodes = &
94 reshape([1, 5, 7, 3, &
120 integer,
public,
parameter,
dimension(2, 12) ::
edge_nodes = &
136 integer,
public,
parameter,
dimension(3, 8) ::
node_faces = &
147 integer,
public,
parameter,
dimension(3, 8) ::
node_edges = &
158 integer,
public,
parameter,
dimension(2, 12) ::
edge_faces = &
175 subroutine hex_init(this, id, p1, p2, p3, p4, p5, p6, p7, p8)
176 class(
hex_t),
intent(inout) :: this
177 integer,
intent(inout) :: id
178 type(
point_t),
target,
intent(in) :: p1, p2, p3, p4, p5, p6, p7, p8
195 class(
hex_t),
intent(in) :: this
196 class(
tuple_t),
intent(inout) :: t
197 integer,
intent(in) :: side
198 integer :: i, j, temp
199 type(
point_t),
pointer :: p1, p2, p3, p4
208 t%x = [p1%id(), p2%id(), p3%id(), p4%id()]
211 if (t%x(j) .lt. t%x(i))
then
224 class(
hex_t),
intent(in) :: this
225 class(
tuple_t),
intent(inout) :: t
226 integer,
intent(in) :: side
227 type(
point_t),
pointer :: p1, p2, p3, p4
236 t%x = [p1%id(), p2%id(), p3%id(), p4%id()]
244 class(
hex_t),
intent(in) :: this
245 class(
tuple_t),
intent(inout) :: t
246 integer,
intent(in) :: side
247 type(
point_t),
pointer :: p1, p2
254 if (p1%id() .lt. p2%id())
then
255 t%x = [p1%id(), p2%id()]
257 t%x = [p2%id(), p1%id()]
266 class(
hex_t),
intent(in) :: this
267 real(kind=
dp) :: d1, d2, d3, d4, res
268 type(
point_t),
pointer :: p1, p2, p3, p4, p5, p6, p7, p8
286 d1 = d1 + (p8%x(i) - p1%x(i))**2
287 d2 = d2 + (p7%x(i) - p2%x(i))**2
288 d3 = d3 + (p5%x(i) - p4%x(i))**2
289 d4 = d4 + (p6%x(i) - p3%x(i))**2
292 res = sqrt(
max(
max(d1, d2),
max(d3, d4)))
298 class(
hex_t),
intent(in) :: this
300 type(
point_t),
pointer :: p1, p2, p3, p4, p5, p6, p7, p8
313 do i = 1, this%gdim()
314 res%x(i) = 0.125 * (p1%x(i) + p2%x(i) + p3%x(i) + p4%x(i) + &
315 p5%x(i) + p6%x(i) + p7%x(i) + p8%x(i))
323 class(
hex_t),
intent(in) :: this
331 if ((this%gdim() .eq. other%gdim()) .and. &
332 (this%npts() .eq. other%npts()))
then
333 do i = 1, this%npts()
334 if (this%pts(i)%p .ne. other%pts(i)%p)
then
Defines a hexahedron element.
type(point_t) function hex_centroid(this)
Compute the centroid of a hexahedron element.
subroutine hex_facet_order(this, t, side)
Return the ordered points for face i as a 4-tuple t.
integer, dimension(3, 8), parameter, public node_edges
Edge ids incident to each node.
subroutine hex_edge_id(this, t, side)
Return the edge id for an edge i as a 2-tuple t.
integer, dimension(2, 12), parameter, public edge_faces
Face ids incident to each edge.
integer, parameter, public neko_hex_gdim
Geometric dimension.
integer, parameter, public neko_hex_npts
Number of points.
integer, parameter, public neko_hex_nfcs
Number of faces.
integer, parameter, public neko_hex_neds
Number of edges.
real(kind=dp) function hex_diameter(this)
Compute the diameter of a hexahedron element.
integer, dimension(4, 6), parameter, public face_nodes
Face node ids.
pure logical function hex_equal(this, other)
Check if two hex elements are equal.
integer, dimension(3, 8), parameter, public node_faces
Face ids incident to each node.
subroutine hex_init(this, id, p1, p2, p3, p4, p5, p6, p7, p8)
Create a hexahedron element based upon eight points.
integer, dimension(2, 12), parameter, public edge_nodes
Edge node ids.
subroutine hex_facet_id(this, t, side)
Return the facet id for face i as a 4-tuple t.
integer, parameter, public dp
Base type for an element.
A point in with coordinates .
Base type for an n-tuple.