Intragrain junctions in YBa2Cu3O7−x ceramics and single crystals