|
125 | 125 | numberOfZNodes = numberOfGlobalZElements*(numberOfNodesXi-1)+1 |
126 | 126 | numberOfNodes = numberOfXNodes*numberOfYNodes*numberOfZNodes |
127 | 127 |
|
| 128 | +worldRegion = iron.Region() |
| 129 | +iron.Context.WorldRegionGet(worldRegion) |
| 130 | + |
128 | 131 | # Get the number of computational nodes and this computational node number |
129 | 132 | computationEnvironment = iron.ComputationEnvironment() |
| 133 | +iron.Context.ComputationEnvironmentGet(computationEnvironment) |
130 | 134 | numberOfComputationalNodes = computationEnvironment.NumberOfWorldNodesGet() |
131 | 135 | computationalNodeNumber = computationEnvironment.WorldNodeNumberGet() |
132 | 136 |
|
133 | 137 | # Create a 3D rectangular cartesian coordinate system |
134 | 138 | coordinateSystem = iron.CoordinateSystem() |
135 | | -coordinateSystem.CreateStart(coordinateSystemUserNumber) |
| 139 | +coordinateSystem.CreateStart(coordinateSystemUserNumber,iron.Context) |
136 | 140 | coordinateSystem.DimensionSet(3) |
137 | 141 | coordinateSystem.CreateFinish() |
138 | 142 |
|
139 | 143 | # Create a region and assign the coordinate system to the region |
140 | 144 | region = iron.Region() |
141 | | -region.CreateStart(regionUserNumber,iron.WorldRegion) |
| 145 | +region.CreateStart(regionUserNumber,worldRegion) |
142 | 146 | region.LabelSet("CantileverRegion") |
143 | 147 | region.coordinateSystem = coordinateSystem |
144 | 148 | region.CreateFinish() |
145 | 149 |
|
146 | 150 | # Define quadratic basis |
147 | 151 | quadraticBasis = iron.Basis() |
148 | | -quadraticBasis.CreateStart(basisUserNumber) |
| 152 | +quadraticBasis.CreateStart(basisUserNumber,iron.Context) |
149 | 153 | quadraticBasis.type = iron.BasisTypes.LAGRANGE_HERMITE_TP |
150 | 154 | quadraticBasis.numberOfXi = 3 |
151 | 155 | quadraticBasis.interpolationXi = [iron.BasisInterpolationSpecifications.QUADRATIC_LAGRANGE]*3 |
|
154 | 158 |
|
155 | 159 | # Define linear basis |
156 | 160 | linearBasis = iron.Basis() |
157 | | -linearBasis.CreateStart(pressureBasisUserNumber) |
| 161 | +linearBasis.CreateStart(pressureBasisUserNumber,iron.Context) |
158 | 162 | linearBasis.type = iron.BasisTypes.LAGRANGE_HERMITE_TP |
159 | 163 | linearBasis.numberOfXi = 3 |
160 | 164 | linearBasis.interpolationXi = [iron.BasisInterpolationSpecifications.LINEAR_LAGRANGE]*3 |
|
379 | 383 | elasticityProblemSpecification = [iron.ProblemClasses.ELASTICITY, |
380 | 384 | iron.ProblemTypes.FINITE_ELASTICITY, |
381 | 385 | iron.ProblemSubtypes.STATIC_FINITE_ELASTICITY] |
382 | | -elasticityProblem.CreateStart(elasticityProblemUserNumber,elasticityProblemSpecification) |
| 386 | +elasticityProblem.CreateStart(elasticityProblemUserNumber,iron.Context,elasticityProblemSpecification) |
383 | 387 | elasticityProblem.CreateFinish() |
384 | 388 |
|
385 | 389 | # Create the elasticity problem control loop |
|
444 | 448 | iron.ProblemTypes.DATA_FITTING, |
445 | 449 | iron.ProblemSubtypes.STATIC_FITTING] |
446 | 450 | fittingProblem = iron.Problem() |
447 | | -fittingProblem.CreateStart(fittingProblemUserNumber,fittingProblemSpecification) |
| 451 | +fittingProblem.CreateStart(fittingProblemUserNumber,iron.Context,fittingProblemSpecification) |
448 | 452 | fittingProblem.CreateFinish() |
449 | 453 |
|
450 | 454 | # Create control loops |
|
0 commit comments