Geometry of domains and domain boundaries in monolayers and bilayers.