function sigma_trial = SigmaTrial(C,epsilon)

% This function calculates the set of stress tensors {sigma,q,q_bar} in
% row form, resulting from multiplicate the constitutive equation 
% sigma = C * epsilon, being C the vector containing the material
% parameters, and epsilon the set of strain tensors in row form


% Recovery of the material parameters
lambda = C(10)  ;
my = C(11)      ;
K = C(3)        ;
H = C(4)        ;

% Computation of the stress tensor sigma
eps = ToMatrix(epsilon(1:6)) ;
sigma = lambda*(trace(eps))*eye(3) + 2*my*eps ;

% Computation of the isotropic hardening variable q
chi = epsilon(7) ;
q =  K * chi ;

% Computation of the kinematic hardening variable q_bar
chi_bar = ToMatrix(epsilon(8:13)) ;
q_bar =  (2/3) * H * chi_bar ;

% Conversion of the three values to a unique vector containing the sigma
% set {sigma,q,q_bar} of stresses
vector_sigma = ToVoigt(sigma) ;
vector_q_bar = ToVoigt(q_bar) ;
sigma_trial = [vector_sigma,q,vector_q_bar] ;
