Soil and rock mechanics are the sciences on which geotechnical engineering is based. They deal with how soil (or rock) masses respond to the application of loadings of different types. This response can often be found analytically or semi-analytically, so that equations link cause and effect directly. When problems are too complex for this to be possible, due to complicated boundary conditions, loading or soil models, solutions must be found numerically.