Use of wave energy or electrical discharge during pretreatment of substrate or post-treatment of coating