 
\subsection{Time--discretization of the linear case~(\ref{first-DS3}) } 
Let us now proceed with the time discretization of~(\ref{eq:toto1}) with FirstOrderLinearR~(\ref{first-DS3})  by a fully implicit scheme : 
\begin{equation}
  \begin{array}{l}
    \label{eq:toto1-DS3}
     M x^{\alpha+1}_{k+1} = M x_{k} +h\theta A x^{\alpha+1}_{k+1}+h(1-\theta) A x_k + h \gamma r^{\alpha+1}_{k+1}+ h(1-\gamma)r(t_k)  +hb\\[2mm]
     y^{\alpha+1}_{k+1} =  C x^{\alpha+1}_{k+1} + D \lambda ^{\alpha+1}_{k+1} +Fz +e\\[2mm]
     r^{\alpha+1}_{k+1} = B \lambda ^{\alpha+1}_{k+1} \\[2mm]
  \end{array}
\end{equation}

\[R_{\free} = M(x^{\alpha}_{k+1} - x_{k}) -h\theta A x^{\alpha}_{k+1} - h(1-\theta) A x_k -hb_{k+1} \]
\[R_{\free} = W(x^{\alpha}_{k+1} - x_{k}) -h A x_{k} -hb_{k+1} \]

\paragraph{Resulting Newton step (only one step)}
For the sake of simplicity, let us assume that $\gamma =1$
\begin{equation}
  \begin{array}{l}
     (M -h\theta A)x^{\alpha+1}_{k+1} = M x_{k} +h(1-\theta) A x_k + hr^{\alpha+1}_{k+1} + hb\\[2mm]
     y^{\alpha+1}_{k+1} =  C x^{\alpha+1}_{k+1} + D \lambda ^{\alpha+1}_{k+1} +Fz + e \\[2mm]
     r^{\alpha+1}_{k+1} = B \lambda ^{\alpha+1}_{k+1}\\[2mm]
  \end{array}
\end{equation}
that lead to with: $ (M -h\theta A) = W$
\begin{equation}
  \begin{array}{l}
     x^{\alpha+1}_{k+1} = W^{-1}(M x_{k} +h(1-\theta) A x_k + r^{\alpha+1}_{k+1} +hb) = x\free + W^{-1}(r^{\alpha+1}_{k+1})\\[2mm]
     y^{\alpha+1}_{k+1} =  ( D+hCW^{-1}B) \lambda ^{\alpha+1}_{k+1} +Fz + CW^{-1}(M
     x_k+h(1-\theta)Ax_k + hb) +e \\[2mm]
  \end{array}
\end{equation}
with $x_{\free} = x^{\alpha}_{k+1} + W^{-1}(-R_{\free})= x^{\alpha}_{k+1} - W^{-1}(W(x^{\alpha}_{k+1}
- x_k) -hAx_k-hb_{k+1} )= W^{-1}(Mx_k +h(1-\theta)Ax_k +h b_{k+1})$
\begin{equation}
  \begin{array}{l}
     y^{\alpha+1}_{k+1} =  ( D+hCW^{-1}B) \lambda ^{\alpha+1}_{k+1} +Fz + Cx_{\free}+e\\[2mm]
     r^{\alpha+1}_{k+1} = B \lambda ^{\alpha+1}_{k+1}\\[2mm]
  \end{array}
\end{equation}

\paragraph{Coherence with previous formulation}
\[y_p = y^{\alpha}_{k+1} -\mathcal R^{\alpha}_{yk+1} + C^{\alpha}_{k+1}(x_p -x^{\alpha}_{k+1}) -
D^{\alpha}_{k+1} \lambda^{\alpha}_{k+1} \]
\[y_p = Cx_k + D \lambda _k  + C(\tilde x_{\free}) -D \lambda_k +Fz + e\]
\[y_p = Cx_k   + C(\tilde x_{\free})  +Fz + e\]
\[y_p = Cx_k   + C(\tilde x_{\free})  +Fz + e\]
\[y_p = C(x_{\free})  +Fz + e\]

%In the case of the system~(\ref{eq:deux}) with a affine function $f$ or $\theta =0$, the the MLCP matrix $W$ can be computed before the beginning of the time loop saving a lot of computing effort.  In the case of the system (\ref{eq:trois}) with $\theta=\gamma=0$, the MLCP matrix $W$ can be computed before the beginning of the Newton loop.
\clearpage


%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "DevNotes"
%%% End: 
