Geometry effects on the electromagnetic properties of linear magnetic materials and superconductors in the critical state