Model For the Director and Electric Field in Liquid Crystal Cells Having Twist Walls Or Disclination Lines