We apply the "solar paradigm" for stellar magnetic activity to the post-mai
n-sequence evolution of stars in the mass range 1 M-circle dot less than or
equal to M-star less than or equal to 3 M-circle dot. The model starts fro
m a strong toroidal magnetic field generated by a dynamo working in the ove
rshoot layer below the convection envelope. Once a critical field strength
is exceeded, an undulatory (Parker-type) instability leads to rising flux l
oops. Upon emergence at the stellar surface, they form bipolar magnetic reg
ions and large-scale coronal loops. By considering the stability, dynamics,
and rise of magnetic flux tubes along evolutionary sequences of stellar mo
dels, we find that the flux loops become trapped in the stellar interior wh
en the depth of convective envelope exceeds about 80% of the stellar radius
. Trapping is caused by an increase of field line curvature at the loop sum
mit, so that eventually the magnetic tension force dominates over the buoya
ncy force. The magnetic loops find a stable equilibrium configuration withi
n the convection zone and do not emerge at the stellar surface. The transit
ion from emerging to trapped flux tubes falls in the range of spectral type
s G7 to K0 for luminosity class III giants, which is close to the observed
"coronal dividing line" in the Hertzsprung-Russell diagram. This result is
remarkably stable within large ranges of stellar parameters (mass, rotation
) and flux tube parameters (field strength, magnetic flux) and depends prac
tically exclusively on the fractional radius of the stellar radiative core.
We suggest that flux tube trapping is the cause for the strong decline of
stellar X-ray emission across the "coronal dividing line".