% -*- texinfo -*- % @deftypefn {Function File} {[@var{jx},@var{jy}]} = BIM2Cglobalflux(@var{mesh},@var{u},@var{alpha},@var{gamma},@var{eta},@var{beta}) % % Builds the Scharfetter-Gummel approximation of the vector field % @iftex % @tex % $ \vect{J}(u) = \alpha \gamma (\eta\vect{\nabla}u-\vect{beta}u) $ % @end tex % @end iftex % @ifnottex % J(@var{u}) = @var{alpha}* @var{gamma} * (@var{eta} * grad @var{u} - @var{beta} * @var{u})) % @end ifnottex % % where: % @itemize @minus % @item @var{alpha}: element-wise constant scalar function % @item @var{eta}, @var{u}, @var{gamma}: piecewise linear conforming scalar functions % @item @var{beta}: element-wise constant vector function % @end itemize % % J(@var{u}) is an element-wise constant vector function % % Instead of passing the vector field @var{beta} directly % one can pass a piecewise linear conforming scalar function % @var{phi} as the last input. In such case @var{beta} = grad @var{phi} % is assumed. If @var{phi} is a single scalar value @var{beta} % is assumed to be 0 in the whole domain. % % @seealso{BIM2Cpdegrad,BIM2Aadvdiff} % @end deftypefn