thelfer / MFrontGenericInterfaceSupport

This project aims at providing support for MFront generic behaviours. This project can be embedded in open-source and propriary sofware
37 stars 35 forks source link

Missing block jacobian info in python binding #28

Closed bleyerj closed 4 years ago

bleyerj commented 4 years ago

When inspecting the behaviour object in Python, there seems to be no information about the block structure of the jacobian

thelfer commented 4 years ago

The tangent operator blocks are now available in the python bindings under the tangent_operator_blocks property of the Behaviour class.

Those blocks are accessible as an array of tuples of instances of the Variable class.

This feature can be used as follows:

import mgis.behaviour as mgis_bv

h = mgis_bv.Hypothesis.Tridimensional
b = mgis_bv.load('src/libBehaviour.so','StationaryHeatTransfer2',h)
for t in b.tangent_operator_blocks:
    print('d{}_d{}'.format(t[0].name,t[1].name))