  We present a numerical model for the evolution of a protostellar disc that
has formed self-consistently from the collapse of a molecular cloud core. The
global evolution of the disc is followed for several million years after its
formation. The capture of a wide range of spatial and temporal scales is made
possible by use of the thin-disc approximation. We focus on the role of
gravitational torques in transporting mass inward and angular momentum outward
during different evolutionary phases of a protostellar disc with disc-to-star
mass ratio of order 0.1. In the early phase, when the infall of matter from the
surrounding envelope is substantial, mass is transported inward by the
gravitational torques from spiral arms that are a manifestation of the
envelope-induced gravitational instability in the disc. In the late phase, when
the gas reservoir of the envelope is depleted, the distinct spiral structure is
replaced by ongoing irregular nonaxisymmetric density perturbations. The
amplitude of these density perturbations decreases with time, though this
process is moderated by swing amplification aided by the existence of the
disc's sharp outer edge. Our global modelling of the protostellar disc reveals
that there is typically a residual nonzero gravitational torque from these
density perturbations, i.e. their effects do not exactly cancel out in each
region. In particular, the net gravitational torque in the inner disc tends to
be negative during first several million years of the evolution, while the
outer disc has a net positive gravitational torque. Our global model of a
self-consistently formed disc shows that it is also self-regulated in the late
phase, so that it is near the Toomre stability limit, with a near-uniform
Toomre parameter Q\approx 1.5-2.0. (Abstract abridged).
