Application of Singularity Programming in Reservoir Simulation