  Effective demagnetizing factors that connect the sample magnetic moment with
the applied magnetic field are calculated numerically for perfectly diamagnetic
samples of various non-ellipsoidal shapes. The procedure is based on
calculating total magnetic moment by integrating the magnetic induction
obtained from a full three dimensional solution of the Maxwell equations using
adaptive mesh. The results are relevant for superconductors (and conductors in
AC fields) when the London penetration depth (or the skin depth) is much
smaller than the sample size. Simple but reasonably accurate approximate
formulas are given for practical shapes including rectangular cuboids, finite
cylinders in axial and transverse field as well as infinite rectangular and
elliptical cross-section strips.
