anchor.diff:      elem_ordrs(1:num_ord,1:num_elems)=enodes_temp(1:num_ord,1:num_elems)
       deallocate(enodes_temp)
       elem_ordrs(1:num_ord,num_elems+1:num_elems_new) = 0
  -    
  -!    allocate(nodelem_temp(num_elems))
  -!    nodelem_temp=elem_units_below
  -!    deallocate(elem_units_below)
  -!    allocate(elem_units_below(num_elems_new))
  -!    elem_units_below(1:num_elems)=nodelem_temp(1:num_elems)
  -!    deallocate(nodelem_temp)
  -!    elem_units_below(num_elems+1:num_elems_new)=0
  -    
  +
  +    allocate(nodelem_temp(num_elems))
  +    nodelem_temp=elem_units_below
  +    deallocate(elem_units_below)
  +    allocate(elem_units_below(num_elems_new))
  +    elem_units_below(1:num_elems)=nodelem_temp(1:num_elems)
  +    deallocate(nodelem_temp)
  +    elem_units_below(num_elems+1:num_elems_new)=0
  +
       allocate(enodes_temp(num_nodes,0:3))
       enodes_temp=elems_at_node
       deallocate(elems_at_node)
  
positive.code:     elem_symmetry(1:num_elems)=nodelem_temp(1:num_elems)
      deallocate(nodelem_temp) !deallocate the temporary array
      elem_symmetry(num_elems+1:num_elems_new)=1
      
      allocate(enodes_temp2(-1:1,0:2,0:num_elems))
      enodes_temp2=elem_cnct
      deallocate(elem_cnct)
  
negative.code:     elem_cnct(-1:1,0:2,0:num_elems)=enodes_temp2(-1:1,0:2,0:num_elems)
      deallocate(enodes_temp2)
      elem_cnct(-1:1,0:2,num_elems+1:num_elems_new) = 0
  
      allocate(enodes_temp(num_ord,num_elems))
      enodes_temp=elem_ordrs
      deallocate(elem_ordrs)
  