Geometrical and physical characterization of porous materials by nuclear magnetic resonance