diff --git a/src/python/cantilever_growth.py b/src/python/cantilever_growth.py index 933bcc1..1d19a25 100644 --- a/src/python/cantilever_growth.py +++ b/src/python/cantilever_growth.py @@ -129,21 +129,27 @@ numberOfZNodes = numberOfGlobalZElements*(numberOfNodesXi-1)+1 numberOfNodes = numberOfXNodes*numberOfYNodes*numberOfZNodes + +worldRegion = iron.Region() +iron.Context.WorldRegionGet(worldRegion) + #iron.DiagnosticsSetOn(iron.DiagnosticTypes.FROM,[1,2,3,4,5],"diagnostics",["FiniteElasticity_FiniteElementResidualEvaluate"]) # Get the number of computational nodes and this computational node number -numberOfComputationalNodes = iron.ComputationalNumberOfNodesGet() -computationalNodeNumber = iron.ComputationalNodeNumberGet() +computationEnvironment = iron.ComputationEnvironment() +iron.Context.ComputationEnvironmentGet(computationEnvironment) +numberOfComputationalNodes = computationEnvironment.NumberOfWorldNodesGet() +computationalNodeNumber = computationEnvironment.WorldNodeNumberGet() # Create a 3D rectangular cartesian coordinate system coordinateSystem = iron.CoordinateSystem() -coordinateSystem.CreateStart(coordinateSystemUserNumber) +coordinateSystem.CreateStart(coordinateSystemUserNumber,iron.Context) coordinateSystem.DimensionSet(numberOfDimensions) coordinateSystem.CreateFinish() # Create a region and assign the coordinate system to the region region = iron.Region() -region.CreateStart(regionUserNumber,iron.WorldRegion) +region.CreateStart(regionUserNumber,worldRegion) region.LabelSet("Region") region.CoordinateSystemSet(coordinateSystem) region.CreateFinish() @@ -151,7 +157,7 @@ # Define basis functions uBasis = iron.Basis() -uBasis.CreateStart(uBasisUserNumber) +uBasis.CreateStart(uBasisUserNumber,iron.Context) uBasis.NumberOfXiSet(numberOfDimensions) uBasis.TypeSet(iron.BasisTypes.LAGRANGE_HERMITE_TP) if (uInterpolation == LINEAR_LAGRANGE): @@ -168,7 +174,7 @@ if (pInterpolation > CONSTANT_LAGRANGE): pBasis = iron.Basis() - pBasis.CreateStart(pBasisUserNumber) + pBasis.CreateStart(pBasisUserNumber,iron.Context) pBasis.NumberOfXiSet(numberOfDimensions) pBasis.TypeSet(iron.BasisTypes.LAGRANGE_HERMITE_TP) if (pInterpolation == LINEAR_LAGRANGE): @@ -442,7 +448,7 @@ problemSpecification = [iron.ProblemClasses.ELASTICITY, iron.ProblemTypes.FINITE_ELASTICITY, iron.ProblemSubtypes.FINITE_ELASTICITY_WITH_GROWTH_CELLML] -problem.CreateStart(problemUserNumber,problemSpecification) +problem.CreateStart(problemUserNumber,iron.Context,problemSpecification) problem.CreateFinish() # Create control loops diff --git a/src/python/stressgrowth.cellml b/src/python/stressgrowth.cellml new file mode 100644 index 0000000..d0575ac --- /dev/null +++ b/src/python/stressgrowth.cellml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + time + + lambda1 + + + + 1 + bff + S11 + + + + + + + + time + + lambda2 + + + + 1 + bss + S22 + + + + + + + + time + + lambda3 + + + + 1 + bnn + S33 + + + + +