We develop an explicit and tractable representation of a twist-grain-boundary phase of a smectic-A liquid crystal. This allows us to calculate the interaction energy between grain boundaries and the relative contributions from the bending and compression deformations. We discuss the special stability of the π/2 grain boundaries and discuss the relation of this structure to the Schwarz D surface.PACS numbers: 61.30. Jf, 61.72.Mm, 61.72.Bb, 11.10.Lm Topological defects are often the essential degrees of freedom. They are the focus in the study of some phase transitions [1,2], high-temperature superconductors [3], and liquid crystalline phases [4]. In the latter, there is a necessary connection between the topology of the defects and their geometry which is on the one hand theoretically challenging while, on the other hand, experimentally accessible through real-space, freeze-fracture imaging [5]. The twist grain boundary (TGB) phase of smectic-A liquid crystals [6], has an arrangement of screw dislocations which alter the geometry of the uniform, flat layers into a discretely rotating layered structure. Though topology constrains the geometry, it does not specify it. Rather, the free energy of the deformed smectic layers sets the periodicity of the lattice. Prior analysis [7] relied on linear elasticity to study small angle grain boundaries. However, it has been shown that when the angles and deformations are large, the energetics of the rotationally-invariant nonlinear theory are not only quantitatively, but qualitatively different than in the linear theory [8,9,10]. In order to reconcile our understanding of the linear theory with the nonlinear elasticity and in light of the recently observed [11] large angle grain boundaries, here we develop a full nonlinear theory of the largest angle grain boundaries allowed, with rotations of π/2. To do this we explicitly sum the topological defects to render a closed-form expression which is an exact solution of the linear elasticity theory. Unlike parametric representations of surfaces, our surface is given as a multi-valued height function which allows us to directly calculate the compression energy and allows tractable comparison with real space images. We directly calculate the energetics of space-filling TGB structures analytically and find that grain boundaries interact exponentially with separation.Smectic order is characterized by a periodic mass density ρ = ρ 0 + ρ 1 cos [2πΦ(x)/a], where ρ 0 and ρ 1 are constant amplitudes, set at the nematic-to-smectic phase transition, and a is the equilibrium layer spacing. The smectic layers are defined via the level sets of Φ through Φ(x)/a = n ∈ Z, and the elastic free energy has two terms, FIG. 1: Schnerk's first surface, with charge +2 and −2 screw dislocations. Note that the −2 dislocations lie at the center of the rectangle made by the adjacent +2 dislocations. We choose θ = ψ and k 2 ≈ −0.03033 so that K ′ (k)/K(k) = 2 − i. We are reminded that ". . . imaginary things are often easier to see than real ones." [12]