Finite element method for 3D optical modeling of liquid crystal on silicon spatial light modulator