# load data for analysis Esolv, Esurf, Ecoul = test_outputs['dirichlet_surface'][2:5] Time = test_outputs['dirichlet_surface'][-1] N, iterations = test_outputs['dirichlet_surface'][:2] Etotal = Esolv + Esurf + Ecoul total_time = Time analytical = an_solution.constant_potential_single_energy(1, 4, 0.125, 80) error = abs(Etotal - analytical) / abs(analytical) report_results(error, N, iterations, Etotal, analytical, total_time, energy_type='Total', test_name='sphere_dirichlet') if __name__ == "__main__": from check_for_meshes import check_mesh mesh_file = 'https://zenodo.org/record/55349/files/pygbe_regresion_test_meshes.zip' folder_name = 'regresion_tests_meshes' rename_folder = 'geometry' size = '~10MB' check_mesh(mesh_file, folder_name, rename_folder, size) main()
test_outputs[test_name] = [N, iterations, Esolv, Esurf, Ecoul, Time] picklesave(test_outputs) #load results for analysis Esolv, Esurf, Ecoul = test_outputs['molecule_stern'][2:5] Time = test_outputs['molecule_stern'][-1] N = test_outputs['molecule_stern'][0] iterations = test_outputs['molecule_stern'][1] total_time = Time analytical = an_solution.an_P( numpy.array([1.]), numpy.array([[1., 1., 1.41421356]]), 4., 80., 4., 0.125, 5., 20) error = abs(Esolv - analytical) / abs(analytical) report_results(error, N, iterations, Esolv, analytical, total_time, energy_type='Total') if __name__ == "__main__": from check_for_meshes import check_mesh check_mesh() main()