Add fucntion calculateActivity, refs #52368