We obtain a large deviation function for the stationary measures of twisted
Brownian motions associated to the Lagrangians
LΞ»β(p,v)=21βgpβ(v,v)βΞ»Οpβ(v), where g is a
Cβ Riemannian metric in a compact surface (M,g) with nonpositive
curvature, Ο is a closed 1-form such that the Aubry-Mather measure of
the Lagrangian L(p,v)=21βgpβ(v,v)βΟpβ(v) has support in a
unique closed geodesic Ξ³; and the curvature is negative at every point
of M but at the points of Ξ³ where it is zero. We also assume that the
Aubry set is equal to the Mather set. The large deviation function is of
polynomial type, the power of the polynomial function depends on the way the
curvature goes to zero in a neighborhood of Ξ³. This results has
interesting counterparts in one-dimensional dynamics with indifferent fixed
points and convex billiards with flat points in the boundary of the billiard. A
previous estimate by N. Anantharaman of the large deviation function in terms
of the Peierl's barrier of the Aubry-Mather measure is crucial for our result