def _compare_bem_surfaces(surfs_1, surfs_2):
 names = ['id', 'nn', 'rr', 'coord_frame', 'tris', 'sigma', 'ntri', 'np']
 ignores = ['tri_cent', 'tri_nn', 'tri_area', 'neighbor_tri']
 for (s0, s1) in zip(surfs_1, surfs_2):
  assert_equal(set(names), (set(s0.keys()) - set(ignores)))
  assert_equal(set(names), (set(s1.keys()) - set(ignores)))
  for name in names:
   assert_allclose(s0[name], s1[name], rtol=0.001, atol=1e-06, err_msg=('Mismatch: "%s"' % name))

def _compare_bem_surfaces ( surfs_1 , surfs_2 ) : names = [ 'id' , 'nn' , 'rr' , 'coord_frame' , 'tris' , 'sigma' , 'ntri' , 'np' ] ignores = [ 'tri_cent' , 'tri_nn' , 'tri_area' , 'neighbor_tri' ] for ( s0 , s1 ) in zip ( surfs_1 , surfs_2 ) : assert_equal ( set ( names ) , ( set ( s0 . keys ( ) ) - set ( ignores ) ) ) assert_equal ( set ( names ) , ( set ( s1 . keys ( ) ) - set ( ignores ) ) ) for name in names : assert_allclose ( s0 [ name ] , s1 [ name ] , rtol = 0.001 , atol = 1e-06 , err_msg = ( 'Mismatch: "%s"' % name ) )
helper to compare bem surfaces .