A block-structuring technique for general geometries