We investigate stripe patterns formation far from threshold using a combination of topological, analytic and numerical methods. We first give a definition of the mathematical structure of 'multi-valued' phase functions that are needed for describing layered structures or stripe patterns containing defects. This definition yields insight into the appropriate 'gauge-symmetries' of patterns, and leads to the formulation of variational problems, in the class of special functions with bounded variation, to model patterns with defects. We then discuss approaches to discretize and numerically solve these variational problems. These energy minimizing solutions support defects having the same character as seen in experiments.