Modelling intergranular and transgranular micro-cracking in polycrystalline materials