72 generic ::
operator(.eq.) => equal
92 integer,
parameter,
dimension(3, 4) ::
face_nodes = reshape((/1,3,4,&
114 integer,
parameter,
dimension(2, 6) ::
edge_nodes = reshape((/1,2,&
126 class(
tet_t),
intent(inout) :: this
127 integer,
intent(inout) :: id
128 type(
point_t),
target,
intent(in) :: p1, p2, p3, p4
141 class(
tet_t),
intent(in) :: this
142 class(
tuple_t),
intent(inout) :: t
143 integer,
intent(in) :: side
144 integer :: i, j, temp
145 type(
point_t),
pointer :: p1,p2,p3
153 t%x = (/ p1%id(), p2%id(), p3%id() /)
156 if(t%x(j) .lt. t%x(i))
then
169 class(
tet_t),
intent(in) :: this
170 class(
tuple_t),
intent(inout) :: t
171 integer,
intent(in) :: side
172 type(
point_t),
pointer :: p1,p2,p3
180 t%x = (/ p1%id(), p2%id(), p3%id() /)
188 class(
tet_t),
intent(in) :: this
189 class(
tuple_t),
intent(inout) :: t
190 integer,
intent(in) :: side
191 type(
point_t),
pointer :: p1,p2
198 if (p1%id() .lt. p2%id())
then
199 t%x = (/ p1%id(), p2%id() /)
201 t%x = (/ p2%id(), p1%id() /)
210 class(
tet_t),
intent(in) :: this
211 real(kind=
dp) :: d1, d2, d3, d4, d5, d6, res
212 type(
point_t),
pointer :: p1, p2, p3, p4
229 d1 = d1 + (p2%x(i) - p3%x(i))**2
230 d2 = d2 + (p1%x(i) - p3%x(i))**2
231 d3 = d3 + (p1%x(i) - p2%x(i))**2
232 d4 = d4 + (p1%x(i) - p4%x(i))**2
233 d5 = d5 + (p2%x(i) - p4%x(i))**2
234 d6 = d6 + (p3%x(i) - p4%x(i))**2
249 class(
tet_t),
intent(in) :: this
251 type(
point_t),
pointer :: p1, p2, p3, p4
260 do i = 1, this%gdim()
261 res%x(i) = 0.25 * (p1%x(i) + p2%x(i) + p3%x(i) + p4%x(i))
269 class(
tet_t),
intent(in) :: this
277 if ((this%gdim() .eq. other%gdim()) .and. &
278 (this%npts() .eq. other%npts()))
then
279 do i = 1, this%npts()
280 if (this%pts(i)%p .ne. other%pts(i)%p)
then
integer, parameter, public dp
Defines a tetrahedral element.
subroutine tet_init(this, id, p1, p2, p3, p4)
Create a tetrahedral element based upon four points.
real(kind=dp) function tet_diameter(this)
Compute the diameter of a tetrahedral element.
integer, parameter, public neko_tet_npts
Number of points.
pure logical function tet_equal(this, other)
Check if two tet elements are equal.
integer, parameter, public neko_tet_neds
Number of edges.
integer, dimension(2, 6), parameter edge_nodes
Edge node ids.
integer, parameter, public neko_tet_nfcs
Number of faces.
type(point_t) function tet_centroid(this)
Compute the centroid of a tetrahedral element.
integer, dimension(3, 4), parameter face_nodes
Face node ids.
subroutine tet_facet_order(this, t, side)
Return the ordered points for face i as a 3-tuple t.
subroutine tet_facet_id(this, t, side)
Return the facet id for face i as a 3-tuple t.
subroutine tet_edge_id(this, t, side)
Return the edge id for an edge i as a 2-tuple t.
integer, parameter, public neko_tet_gdim
Geometric dimension.
Base type for an element.
A point in with coordinates .
Base type for an n-tuple.