function cmat = elasticityFcnHandleC2D(l,s,G,mu)
%elasticityFcnHandleC2D onstruct c-matrix for 2D elastic solid with function handle inputs. 
% Same definitions of quantities as in ELASTICITYC2D for numeric
% inputs but now it outputs a 16 x length(location.x) array

%   Copyright 2022 The MathWorks, Inc.
    cmat = zeros(16,length(l.x));
    cmat(1,:) = (2.*G(l,s))+mu(l,s);
    cmat(4,:) = G(l,s);
    cmat(6,:) = mu(l,s);
    cmat(7,:) = G(l,s);
    cmat(10,:) = G(l,s);
    cmat(11,:) = mu(l,s);
    cmat(13,:) = G(l,s);
    cmat(16,:) = (2*G(l,s))+mu(l,s);

end

