Efficient methods for numerical modeling