On stress and driving force calculation within phase-field models : Applications to martensitic phase transformation and crack propagation in multiphase systems