Computing with non-orientable defects: Nematics, smectics and natural patterns