You can extend the vector field with Piecewise and mask the unwanted excess.
Example one
Example one
In[]:=
vf[x_?NumericQ,y_?NumericQ]:=Piecewise[{{{-y+(9-x^2-y^2)^2/50(2y^2-1),x+(9-x^2-y^2)^2/50x},x^2+y^2<9}},{0,0}];lp=LineIntegralConvolutionPlot[vf[x,y],{x,-4,4},{y,-4,4},ColorFunctionGrayLevel];mask=RegionPlot[x^2+y^2>9,{x,-4,4},{y,-4,4},PlotStyle->White,BoundaryStyle->None];Show[lp,mask]
Out[]=
Example two
Example two
In[]:=
reg=Polygon[Riffle[CirclePoints[3.5,5],CirclePoints[{2.5,-Pi/5},5]]];sdf=SignedRegionDistance[reg];vf[x_?NumericQ,y_?NumericQ]:=With[{dist=sdf[{x,y}]},Piecewise[{{{(sdf[{x,y-0.05}]-sdf[{x,y+0.05}])/0.1+dist^2y(*(2y^2-1)*),(sdf[{x+0.05,y}]-sdf[{x-0.05,y}])/0.1+dist^2x},dist<=0}},{0,0}]];lp=LineIntegralConvolutionPlot[vf[x,y],{x,-4,4},{y,-4,4}];mask=Graphics[{White,RegionDifference[Polygon[{{-4.,-4.},{4.,-4.},{4.,4.},{-4.,4.}}],reg]}];Show[lp,mask]
Out[]=