-
Hi Thomas, I was wondering if it was possible to declare variables and/or material properties of "arbitrary size". What I mean by that is for instance, one could use a
but as far as I understand the value of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @LordKthulhu, However, you can do this: @DSL Default;
@Behaviour @behaviour@;
@IntegerConstant Len = @nprops@;
@MaterialProperty real mat_prop[Len];
@StateVariable real state_var[Len];
@Integrator{} and compile it this way: $ mfront --interface=generic --@behaviour@=example3 --@nprops@=3 test.mfront
$ mfront --interface=generic --@behaviour@=example2 --@nprops@=2 test.mfront
$ mfront --obuild
The following library has been built :
- libBehaviour.so : example3_AxisymmetricalGeneralisedPlaneStrain example3_Axisymmetrical example3_PlaneStrain example3_GeneralisedPlaneStrain example3_Tridimensional example2_AxisymmetricalGeneralisedPlaneStrain example2_Axisymmetrical example2_PlaneStrain example2_GeneralisedPlaneStrain example2_Tridimensional |
Beta Was this translation helpful? Give feedback.
Hi @LordKthulhu,
No, you can't do that, as it would break many optimisation strategies in MFront.
However, you can do this:
and compile it this way: