elucidate key features of the theory and aspects of the numerical implementation. The complete, documented source code, instructions, and all input decks required to reproduce the numerical examples are provided online at [www.cerecam.uct.ac.za/code/surface\_energy/doc/html/index.html](www.cerecam.uct.ac.za/code/surface_energy/doc/html/index.html).

Notation and definitions {#notation-and-definitions .unnumbered}
------------------------

Direct notation is adopted throughout. Occasional use is made of index notation, the summation convention for repeated indices being implied. When the repeated indices are lower-case italic letters, the summation is over the range $\{1,2,3\}$. If they are lower-case Greek letters the summation is over the range $\{1,2\}$. The scalar product of two vectors $\b{a}$ and $\b{b}$ is denoted $\b{a}\cdot\b{b} = [\b{a}]_{i} [\b{b}]_{i}$. The scalar product of two second-order tensors $\b{A}$ and $\b{B}$ is denoted $\b{A}:\b{B} = [\b{A}]_{ij} [\b{B}]_{ij}$. The composition of two second-order tensors $\b{A}$ and $\b{B}$, denoted $\b{A} \cdot \b{B}$, is a second-order tensor with components $[\b{A} \cdot \b{B}]_{ij} = [\b{A}]_{im} [\b{B}]_{mj}$. The tensor product of two vectors $\b{a}$ and $\b{b}$ is a second-order tensor $\b{D}=\b{a}\dyad\b{b}$ with $[\b{D}]_{ij}= [\b{a}]_{i} [\b{b}]_{j}$. The two non-standard tensor products of two second-order tensors $\b{A}$ and $\b{B}$ are the fourth-order tensors $[ \b{A} \,\o{\dyad}\, \b{B}]_{ijkl} = [\b{A}]_{ik} [\b{B}]_{jl}$ and $[\b{A} \,\u{\dyad}\, \b{B}]_{ijkl} = [\b{A}]_{il} [\b{B}]_{jk}$.

An arbitrary quantity in the volume is denoted as 