function Gamma_phi = Gamma_phi_bad( phi ) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% set diffusion parameter Gamma as function of phi %% %% Gamma(phi) = Gamma(phi_ref) + Gamma_grad * (phi - phi_ref) %% %% This linearization can produce negative Gamma - beware! %% ------------------------------------------------------ global phi_ref Gamma_ref Gamma_grad Gamma_phi = Gamma_ref + Gamma_grad * (phi - phi_ref ); % % % %