Coarse-grained Computational Analysis of Complex Problems in Materials Science: Phase Transitions in Liquid Crystals and Thin Films