From ec26fdee48b0a20b20fe54c6d5249c54f194a713 Mon Sep 17 00:00:00 2001 From: Chris Bradley Date: Tue, 10 Apr 2018 14:40:58 +1200 Subject: [PATCH 1/3] Update for new computation environment routines. --- src/python/cantilever_growth.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/python/cantilever_growth.py b/src/python/cantilever_growth.py index 933bcc1..3977987 100644 --- a/src/python/cantilever_growth.py +++ b/src/python/cantilever_growth.py @@ -132,8 +132,9 @@ #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() +numberOfComputationalNodes = computationEnvironment.NumberOfWorldNodesGet() +computationalNodeNumber = computationEnvironment.WorldNodeNumberGet() # Create a 3D rectangular cartesian coordinate system coordinateSystem = iron.CoordinateSystem() From ff8996060b0c9908f28c1a52991d1f4311bbce24 Mon Sep 17 00:00:00 2001 From: Chris Bradley Date: Wed, 11 Apr 2018 11:25:07 +1200 Subject: [PATCH 2/3] Adding missed file. --- src/python/stressgrowth.cellml | 84 ++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 src/python/stressgrowth.cellml 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 + + + + + From f004a7d3bab1023ccc5feb489489902ac237c805 Mon Sep 17 00:00:00 2001 From: Chris Bradley Date: Fri, 27 Apr 2018 20:04:13 +1200 Subject: [PATCH 3/3] Fixes for contexts. --- src/python/cantilever_growth.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/python/cantilever_growth.py b/src/python/cantilever_growth.py index 3977987..1d19a25 100644 --- a/src/python/cantilever_growth.py +++ b/src/python/cantilever_growth.py @@ -129,22 +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 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() @@ -152,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): @@ -169,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): @@ -443,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