A General Method of Conserving Mass in Complex Geometry Simulations on Mesh Grids and its Implementation in BOT3P5.O