Finite element modeling of periodic polycrystalline aggregates with intergranular cracks