68 generic ::
operator(.eq.) => equal
85 integer,
parameter,
dimension(2, 3) ::
edge_nodes = reshape((/1,3,&
94 class(
tri_t),
intent(inout) :: this
95 integer,
intent(inout) :: id
96 type(
point_t),
target,
intent(in) :: p1, p2, p3
109 class(
tri_t),
intent(in) :: this
110 class(
tuple_t),
intent(inout) :: t
111 integer,
intent(in) :: side
112 type(
point_t),
pointer :: p1, p2
120 t%x = (/ p1%id(), p2%id() /)
122 t%x = (/ p2%id(), p1%id() /)
130 class(
tri_t),
intent(in) :: this
131 class(
tuple_t),
intent(inout) :: t
132 integer,
intent(in) :: side
133 type(
point_t),
pointer :: p1, p2
140 t%x = (/ p1%id(), p2%id() /)
147 class(
tri_t),
intent(in) :: this
148 real(kind=
dp) :: d1, d2, d3, res
149 type(
point_t),
pointer :: p1, p2, p3
161 d1 = d1 + (p2%x(i) - p1%x(i))**2
162 d2 = d2 + (p3%x(i) - p2%x(i))**2
163 d3 = d3 + (p1%x(i) - p3%x(i))**2
166 res = sqrt(
max(
max(d1, d2), d3))
172 class(
tri_t),
intent(in) :: this
174 type(
point_t),
pointer :: p1, p2, p3
182 do i = 1, this%gdim()
183 res%x(i) = 1d0/3d0 * (p1%x(i) + p2%x(i) + p3%x(i))
190 class(
tri_t),
intent(in) :: this
198 if ((this%gdim() .eq. other%gdim()) .and. &
199 (this%npts() .eq. other%npts()))
then
200 do i = 1, this%npts()
201 if (this%pts(i)%p .ne. other%pts(i)%p)
then
integer, parameter, public dp
Defines a triangular element.
integer, parameter, public neko_tri_npts
Number of points.
integer, parameter, public neko_tri_gdim
Geometric dimension.
real(kind=dp) function tri_diameter(this)
Compute the diameter of a triangular element.
subroutine tri_facet_order(this, t, side)
Return the ordered edge for face i as a 2-tuple t.
integer, parameter, public neko_tri_neds
Number of edges.
subroutine tri_facet_id(this, t, side)
Return the edge id for face i as a 2-tuple t.
type(point_t) function tri_centroid(this)
Compute the centroid of a triangular element.
subroutine tri_init(this, id, p1, p2, p3)
Create a trinagular element based upon three points.
integer, dimension(2, 3), parameter edge_nodes
Edge node ids.
pure logical function tri_equal(this, other)
Check if two triangle elements are equal.
Base type for an element.
A point in with coordinates .
Base type for an n-tuple.