Magnetic energy evaluation
If the relation between H and B is linear (whether the medium is isotropic or not), the energy density of the magnetic field is \$\tfrac{1}{2}\$H⋅B.
For a brief but unusual explanation, see § 2.2 of my work in progress (free download).