The discrete de Rham (DDR) complex is a completely discrete sequence of spaces and operators that reproduces various geometric characteristics of the continuous de Rham complex, thus allowing the preservation of certain discrete structures. The spaces themselves are non-conforming, granting them the flexibility to be defined on meshes made up of general polytopes, as well as the option of general-order variants. We present the application of the DDR method to the Yang--Mills and Einstein's equations, the difficulties one encounters when trying to preserve discrete nonlinear structures, and the application of a Lagrange multiplier in one of the cases to overcome the problem.