def _compare_bem_solutions(sol_a, sol_b):
 _compare_bem_surfaces(sol_a['surfs'], sol_b['surfs'])
 names = ['bem_method', 'field_mult', 'gamma', 'is_sphere', 'nsol', 'sigma', 'source_mult', 'solution']
 assert_equal(set(sol_a.keys()), set(sol_b.keys()))
 assert_equal(set((names + ['surfs'])), set(sol_b.keys()))
 for key in names:
  assert_allclose(sol_a[key], sol_b[key], rtol=0.001, atol=1e-05, err_msg=('Mismatch: %s' % key))

def _compare_bem_solutions ( sol_a , sol_b ) : _compare_bem_surfaces ( sol_a [ 'surfs' ] , sol_b [ 'surfs' ] ) names = [ 'bem_method' , 'field_mult' , 'gamma' , 'is_sphere' , 'nsol' , 'sigma' , 'source_mult' , 'solution' ] assert_equal ( set ( sol_a . keys ( ) ) , set ( sol_b . keys ( ) ) ) assert_equal ( set ( ( names + [ 'surfs' ] ) ) , set ( sol_b . keys ( ) ) ) for key in names : assert_allclose ( sol_a [ key ] , sol_b [ key ] , rtol = 0.001 , atol = 1e-05 , err_msg = ( 'Mismatch: %s' % key ) )
helper to compare bem solutions .