thelfer / MFrontGenericInterfaceSupport

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

[bindings] Variables array size depending on type+modelling hypothesis #30

Closed pbouda95 closed 4 years ago

pbouda95 commented 4 years ago

Thomas,

Within the Behaviour object, one can get parameters, state variables (external+internal) or material properties type (scalar, vector tensor or stensor) using current bindings. However, it is not possible to get their size depending on the modelling hypothesis.

I can try to do something about this, but I am not sure if this is really relevant ... Or maybe there is an another way to proceed ?

Thanks in advance for your advices,

Cheers, Pascal

thelfer commented 4 years ago

Hi Pascal, Material proeperties, parameters and external state variables are always scalars so their size does not depend on modelling hypothesis. For state variables, you can indeed get access to its type, but I did not expose any method to get their size as a function of the modelling hypothesis. I'll fix this ASAP.

thelfer commented 4 years ago

The get_variable_size function is now available in the mgis_behaviour module. This function returns the size of a variable (i.e. the number of components) for the given hypothesis.