Along with rock mechanics, soil mechanics provides the theoretical basis for analysis in geotechnical engineering,a subdiscipline of civil engineering, and engineering geology, a subdiscipline of geology. Soil mechanics is used to analyze the deformations of and flow of fluids within natural and man-made structures that are supported on or made of soil, or structures that are buried in soils.Example applications are building and bridge foundations, retaining walls, dams, and buried pipeline systems. Principles of soil mechanics are also used in related disciplines such as engineering geology, geophysical engineering, coastal engineering, agricultural engineering, hydrology and soil physics.