Index: mttroot/mtt/bin/trans/m/mtt_implicit.m ================================================================== --- mttroot/mtt/bin/trans/m/mtt_implicit.m +++ mttroot/mtt/bin/trans/m/mtt_implicit.m @@ -3,18 +3,21 @@ ## ############################################################### ## ## Version control history ## ############################################################### ## ## $Id$ ## ## $Log$ +## ## Revision 1.2 1999/04/20 00:58:22 peterg +## ## Set open-switch states to zero +## ## ## ## Revision 1.1 1999/04/02 06:23:20 peterg ## ## Initial revision ## ## ## ############################################################### ## Copyright (C) 1999 by P.J. Gawthrop + I = nozeros(!open.*[1:Nx]'); # Indices of states to update + x(I) = AA(I,I)\(AAx(I) + dx(I)*dt); # Implicit update (except open switches); I_open = nozeros(open.*[1:Nx]'); # Indices of open switches x(I_open) = 0.0; # Open switches have zero state - I = nozeros(!open.*[1:Nx]'); # Indices of states to update - x(I) = AA(I,I)\(AAx(I) + dx(I)*dt); # Implicit update (except open switches); endfunction