--- old+++ new@@ -1,4 +1,3 @@- - add missing metods in the BehaviourDescription class to retrieve information about the material symmetry
- add missing methods to retrieve information about standard and physical variables' bounds
Milestone: 3.0.1 --> 3.1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
fromtfel.materialimportModellingHypothesisimportmfrontdefprintBounds(n,b):print('Bounds of variable \''+n+'\':')if((b.boundsType==mfront.VariableBoundsTypes.LOWER)or(b.boundsType==mfront.VariableBoundsTypes.LOWERANDUPPER)):print('- lower bound: '+str(b.lowerBound))if((b.boundsType==mfront.VariableBoundsTypes.UPPER)or(b.boundsType==mfront.VariableBoundsTypes.LOWERANDUPPER)):print('- upper bound: '+str(b.upperBound))print('')dsl=mfront.getDSL('Norton.mfront')dsl.analyseFile('Norton.mfront',[])# behaviour descriptionbd=dsl.getBehaviourDescription()if(bd.getSymmetryType()==mfront.BehaviourSymmetryType.ISOTROPIC):print'Isotropic behaviour\n'else:print'Orthropic behaviour\n'if(bd.getElasticSymmetryType()==mfront.BehaviourSymmetryType.ISOTROPIC):print'Isotropic elasticity\n'else:print'Orthropic elasticity\n'# a deeper look at the 3D cased=bd.getBehaviourData(ModellingHypothesis.TRIDIMENSIONAL)forpind.getParameters():if(p.arraySize==1):if(p.hasBounds()):printBounds(p.name,p.getBounds())else:foriinrange(p.arraySize):if(p.hasBounds(i)):printBounds(p.name+'['+str(i)+']',p.getBounds(i))
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Diff:
Fixed in revision 1655. See the example below: