44     logical, 
private :: finalized = .false.
 
 
   72    integer, 
optional :: size
 
   76    if (
present(size)) 
then 
   77       call z%scratch%init(size)
 
 
   87    if (
allocated(z%facet_el)) 
then 
   88       deallocate(z%facet_el)
 
 
  105    if (.not. z%finalized) 
then 
  107       allocate(z%facet_el(z%scratch%size()))
 
  109       tp => z%scratch%array()
 
  110       do i = 1, z%scratch%size()
 
  111          z%facet_el(i) = tp(i)
 
  114       z%size = z%scratch%size()
 
  116       call z%scratch%clear()
 
 
  127    integer, 
intent(in) :: facet
 
  128    integer, 
intent(in) :: el
 
  131    if (z%finalized) 
then 
  132       call neko_error(
'Facet zone already finalized')
 
  135    t%x = (/ facet, el /)
 
  136    call z%scratch%push(t)
 
 
  143    integer, 
optional :: size
 
  147    if (
present(size)) 
then 
  149       call z%p_scratch%init(size)
 
  150       call z%p_id_scratch%init(size)
 
  151       call z%org_id_scratch%init(size)
 
  154       call z%p_scratch%init()
 
  155       call z%p_id_scratch%init()
 
  156       call z%org_id_scratch%init()
 
 
  167    if (
allocated(z%p_facet_el)) 
then 
  168       deallocate(z%p_facet_el)
 
  171    if (
allocated(z%p_ids)) 
then 
  174    if (
allocated(z%org_ids)) 
then 
  175       deallocate(z%org_ids)
 
  178    call z%p_scratch%free()
 
  179    call z%p_id_scratch%free()
 
  180    call z%org_id_scratch%free()
 
 
  193    if (.not. z%finalized) 
then 
  197       if (z%size .ne. z%p_scratch%size()) 
then 
  201       allocate(z%p_facet_el(z%size))
 
  202       allocate(z%p_ids(z%size))
 
  203       allocate(z%org_ids(z%size))
 
  205       tp => z%p_scratch%array()
 
  207          z%p_facet_el(i) = tp(i)
 
  209       tp2 => z%p_id_scratch%array()
 
  213       tp3 => z%org_id_scratch%array()
 
  215          z%org_ids(i) = tp3(i)
 
  218       call z%p_scratch%clear()
 
  219       call z%p_id_scratch%clear()
 
  220       call z%org_id_scratch%clear()
 
 
  229    integer, 
intent(in) :: facet
 
  230    integer, 
intent(in) :: el
 
  231    integer, 
intent(in) :: p_facet
 
  232    integer, 
intent(in) :: p_el
 
  233    integer, 
intent(in) :: pids(4)
 
  234    integer, 
intent(in) :: org_ids(4)
 
  239    if (z%finalized) 
then 
  240       call neko_error(
'Facet zone already finalized')
 
  243    call z%add_facet(facet, el)
 
  245    t%x = (/ p_facet, p_el /)
 
  246    call z%p_scratch%push(t)
 
  248    call z%p_id_scratch%push(t2)
 
  250    call z%org_id_scratch%push(t3)
 
 
Defines a zone as a subset of facets in a mesh.
 
subroutine facet_zone_init(z, size)
Initialize a facet zone.
 
subroutine facet_zone_periodic_finalize(z)
Finalize a periodic zone list.
 
subroutine facet_zone_periodic_init(z, size)
Initialize a periodic zone.
 
subroutine facet_zone_add_facet(z, facet, el)
Add a (facet, el) tuple to an unfinalized zone.
 
subroutine facet_zone_periodic_add_facet(z, facet, el, p_facet, p_el, pids, org_ids)
Add a (facet, el) tuple to an unfinalized zone.
 
subroutine facet_zone_free(z)
Deallocate a facet zone.
 
subroutine facet_zone_periodic_free(z)
Deallocate a zone.
 
subroutine facet_zone_finalize(z)
Finalize a zone list.
 
Implements a dynamic stack ADT.
 
Integer 2-tuple based stack.
 
Integer 4-tuple based stack.