15 integer(kind=4),
save :: INITflag, nbuckets
16 integer(kind=4),
dimension(:),
allocatable,
save :: ieaddrs
19 type (hecmwST_local_mesh) :: hecMESH
23 if (initflag.eq.0)
then
25 nbuckets= 2*max(hecmesh%n_elem,hecmesh%n_node)
26 allocate (ieaddrs(-nbuckets:+nbuckets))
44 nn1 = mod(nod1, nbuckets) * mod(nod2, nbuckets)
45 iarg= mod( nn1, nbuckets)
48 if (ieaddrs(iarg).gt.hecmesh%n_adapt_edge)
then
59 if (ieaddrs(iarg).eq.0)
then
60 hecmesh%n_adapt_edge= hecmesh%n_adapt_edge + 1
61 iedge= hecmesh%n_adapt_edge
62 hecmesh%adapt_edge_node (2*iedge-1)= nod1
63 hecmesh%adapt_edge_node (2*iedge )= nod2
66 ieaddrs(iarg)= hecmesh%n_adapt_edge
72 in1= hecmesh%adapt_edge_node (2*iedge-1)
73 in2= hecmesh%adapt_edge_node (2*iedge )
77 if (in1.eq.nod1 .and. in2.eq.nod2 .or. &
78 & in1.eq.nod2 .and. in2.eq.nod1)
return
83 inewadd= mod(ioldadd + incr**3, nbuckets)
85 if (inewadd .eq. ioldadd)
then
91 if (nflag .eq. 0)
then
92 if (ieaddrs(inewadd).gt.hecmesh%n_adapt_edge)
then
98 if (ieaddrs(inewadd) .ne. 0)
then
99 iedge= ieaddrs(inewadd)
100 in1= hecmesh%adapt_edge_node (2*iedge-1)
101 in2= hecmesh%adapt_edge_node (2*iedge )
104 if (in1.eq.nod1 .and. in2.eq.nod2 .or. &
105 & in1.eq.nod2 .and. in2.eq.nod1)
return
112 hecmesh%n_adapt_edge= hecmesh%n_adapt_edge + 1
113 iedge= hecmesh%n_adapt_edge
114 hecmesh%adapt_edge_node (2*iedge-1)= nod1
115 hecmesh%adapt_edge_node (2*iedge )= nod2
118 ieaddrs(inewadd)= iedge