We have

Then with
definition (see Section New Optimized assembling algorithm (version OptV2)) , we obtain

We represent in figure 135 the corresponding row-wise operations.
So the vectorized algorithm for
computation is simple and given in Algorithm 136.
Algorithm 136
Note
Compute all the elementaries Mass matrices,
for 
| Parameters: | areas ( numpy array of floats) – areas of all the mesh elements. |
|---|---|
| Returns: | a one dimensional numpy array of size ![]() |
We have 

Using vectorized algorithm function
given in Algorithm 134, we obtain
the vectorized algorithm 137 for
computation of the Stiffness matrix in 2d.
Algorithm 137
Note
Compute all the elementaries Stiff matrices,
for 
| Parameters: |
|
|---|---|
| Returns: | a one dimensional numpy array of size |
We define on
the local alternate basis
by

where
With notations of Presentation, we have


with,

(1)
For example, we can compute explicitely the first two terms in the first column of
which are given by

and

Using vectorized algorithm function
given in Algorithm 134, we obtain
the vectorized algorithm 137 for
computation of the Elasticity Stiffness matrix in 2d.
Algorithm 138
Note
Compute all the elementaries Stiffness elasticity matrices,
for
in local alternate basis.
| Parameters: |
|
|---|---|
| Returns: | a (36*nme,) numpy array of floats. |
We define on
the local block basis
by

where 
For example, using formula (1), we can explicitly compute the first two terms in the first column of
which are given by

and

Using vectorized algorithm function
given in Algorithm 134, we obtain
the vectorized algorithm 139 for
computation of the Elasticity Stiffness matrix in 2d.
Algorithm 139
Note
Compute all the elementaries Stiffness elasticity matrices,
for
in local block basis.
| Parameters: |
|
|---|---|
| Returns: | a (36*nme,) numpy array of floats. |