Electromagnetic analysis by Galerkin method without meshing