Energy barriers in magnetic random access memory elements