function mesh = setedgegrowth( ...
                mesh, ...
                maxgf, ...
                whichGrowth, ...
                add )
    if nargin < 4, add = 0; end
    mesh = makeTRIvalid( mesh );
    newgrowth = zeros( size(mesh.nodes,1), 1 );
    ends = unique(mesh.edgeends(mesh.edgecells(:,2)==0,:));
    newgrowth(ends) = maxgf;
    if add
        mesh.morphogens(:,whichGrowth) = newgrowth + mesh.morphogens(:,whichGrowth);
    else
        mesh.morphogens(:,whichGrowth) = newgrowth;
    end
    mesh.saved = 0;
end

    
    
    
    
    
    
