Implementing modified equation system for given strain/stress

Hey everybody,

I wanted to ask if it is possible to calculate/implement the following algorithm using Fenics.

Algo

Note that the initial strain and stress are given in the first place. The matrix B is the strain-displacement matrix, the matrix C is the elasticity modulus, f_i is the applied force at node i. and w_e are the weights of the Gauss-Points.

For your information, the above equation system can also be written as:

K*u = f_eps
K*eta = f_sig

where K is the stiffness matrix in context of FEM.