69 generic ::
operator(.eq.) => equal
86 integer,
parameter,
dimension(2, 3) ::
edge_nodes = reshape((/1,3,&
86 integer,
parameter,
dimension(2, 3) ::
edge_nodes = reshape((/1,3,&
…
95 class(
tri_t),
intent(inout) :: this
96 integer,
intent(inout) :: id
97 type(
point_t),
target,
intent(in) :: p1, p2, p3
110 class(
tri_t),
intent(in) :: this
111 class(
tuple_t),
intent(inout) :: t
112 integer,
intent(in) :: side
113 type(
point_t),
pointer :: p1, p2
121 t%x = (/ p1%id(), p2%id() /)
123 t%x = (/ p2%id(), p1%id() /)
131 class(
tri_t),
intent(in) :: this
132 class(
tuple_t),
intent(inout) :: t
133 integer,
intent(in) :: side
134 type(
point_t),
pointer :: p1, p2
141 t%x = (/ p1%id(), p2%id() /)
148 class(
tri_t),
intent(in) :: this
149 real(kind=
dp) :: d1, d2, d3, res
150 type(
point_t),
pointer :: p1, p2, p3
162 d1 = d1 + (p2%x(i) - p1%x(i))**2
163 d2 = d2 + (p3%x(i) - p2%x(i))**2
164 d3 = d3 + (p1%x(i) - p3%x(i))**2
167 res = sqrt(
max(
max(d1, d2), d3))
173 class(
tri_t),
intent(in) :: this
175 type(
point_t),
pointer :: p1, p2, p3
184 res%x(i) = 1d0/3d0 * (p1%x(i) + p2%x(i) + p3%x(i))
191 class(
tri_t),
intent(in) :: this
199 if ((this%gdim() .eq. other%gdim()) .and. &
200 (this%npts() .eq. other%npts()))
then
202 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_sdim
Dimension of space.
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.