The discontinuity layout optimization (DLO) is a method that numerically approximates the critical failure surface in soils, concrete, and materials alike. The most common form of the method approximates the critical failure surface using straight discontinuity segments in a piecewise manner. These segments are selected through an optimization problem from a highly redundant network of pre-generated discontinuities. The method's lack of popularity (compared to traditional methods; e.g., methods of slices and FEM-based property reduction) is partly due to the difficulty in generating a sufficiently rich solution space, i.e., a redundant discontinuity network. This problem is augmented when various material layers compose the analysis domain; a typical setting in geotechnical engineering. This work proposes a novel discontinuity generation method that allows for unstructured and irregular domains, including different material layers in the said domain. While a regular grid of points can be tweaked to match the domain and material boundaries with good results, the proposed generation methodology readily adapts the needed domain discretization to these boundaries. In addition, this work proposes extensions to the standard DLO formulation allowing to: (1) consider the groundwater effect (seepage analysis), and (2) calculate the critical safety factor of a problem.