An algorithm for continuum modeling of rocks with multiple embedded nonlinearly-compliant joints