A Theory of Anharmonic Lattice Statics for Analysis of Defective Crystals