A widely used, descriptive classification of porosity types developed in carbonates. Primary porosity types are classified as: interparticle (pores between the grains); framework (pore spaces between the rigid framework of carbonate skeletons, as in a reef); shelter (pore spaces preserved when curved shell fragments or irregularly shaped grains prevent intergranular spaces from becoming completely occupied by the mud matrix); intraparticle (pores within the skeletal material which do not become filled with diagenetic (see diagenesis) cement); and fenestral (pores within carbonate muds provided by fenestrae). Secondary porosity types, produced by diagenetic and tectonic (see tectonism) effects, are classified as: intercrystalline (pores produced by dolomitization or by preferential dissolution of mineral cements); moldic (pore spaces produced by the dissolution of grains, e.g. ooids, shell fragments); channel and vug (both produced by the dissolution of the rock by formation waters to generate linear (channel) or patchy (vug) cavities); cavern (the large-scale dissolution of the rock to yield man-sized or larger pores); and fracture (formed by tectonic stresses within the rock).