Homec4science

Updated the behaviour of the `getPotentialEnergy()` and `getKineticEnergy()`…

Authored by Philip Mueller, HS <philip.paul.mueller@bluemail.ch> on Mar 22 2022, 13:08.

Description

Updated the behaviour of the getPotentialEnergy() and getKineticEnergy() function in the structural mechanics model.

The energies are computed by matrix vector multiplications.
However, in case the respective matrix is not (yet) assembled, the function behaves as if the matrix is the zero matrix.
Thus, the result, the energy is zero.

This commit changes the behaviour of the function in such a way, that they now test, if the matrix they need are assembled.
If they are not assembled they will call the respective assemble function.

Note that this is just one behaviour, another solution would be, to generate an error in that case.

Details

Committed
Philip Mueller, HS <philip.paul.mueller@bluemail.ch>Mar 22 2022, 13:48
Pushed
gitlab-richartMar 22 2022, 13:56
Parents
rAKA7c8e3eb1d349: Making IntegratorScheme available in python
Branches
Unknown
Tags
Unknown

Event Timeline

Philip Mueller, HS <philip.paul.mueller@bluemail.ch> committed rAKA7be0c4621be1: Updated the behaviour of the `getPotentialEnergy()` and `getKineticEnergy()`… (authored by Philip Mueller, HS <philip.paul.mueller@bluemail.ch>).Mar 22 2022, 13:48