Fundamentals of nonlinear optical materials