using finite difference methods or finite element methods