Data-Driven Computing Methods for Nonlinear Physics Systems with Geometric Constraints