Skip to content

Commit 9aa3a12

Browse files
committed
Update for new computation environment routines.
1 parent 8269407 commit 9aa3a12

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/fortran/cantilever.F90

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ PROGRAM CANTILEVEREXAMPLE
6060
!CMISS variables
6161
TYPE(cmfe_BasisType) :: DisplacementBasis,PressureBasis
6262
TYPE(cmfe_BoundaryConditionsType) :: BoundaryConditions
63+
TYPE(cmfe_ComputationEnvironmentType) :: computationEnvironment
6364
TYPE(cmfe_CoordinateSystemType) :: CoordinateSystem, WorldCoordinateSystem
6465
TYPE(cmfe_MeshType) :: Mesh
6566
TYPE(cmfe_DecompositionType) :: Decomposition
@@ -163,8 +164,9 @@ PROGRAM CANTILEVEREXAMPLE
163164
WRITE(*,'("Scaling type: ", i3)') ScalingType
164165

165166
!Get the number of computational nodes and this computational node number
166-
CALL cmfe_ComputationalNumberOfNodesGet(NumberOfComputationalNodes,Err)
167-
CALL cmfe_ComputationalNodeNumberGet(ComputationalNodeNumber,Err)
167+
CALL cmfe_ComputationEnvironment_Initialise(computationEnvironment,err)
168+
CALL cmfe_ComputationEnvironment_NumberOfWorldNodesGet(computationEnvironment,numberOfComputationalNodes,err)
169+
CALL cmfe_ComputationEnvironment_WorldNodeNumberGet(computationEnvironment,computationalNodeNumber,err)
168170

169171
NumberOfDomains=NumberOfComputationalNodes
170172

src/python/cantilever.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@
4545
numberOfXi = 3
4646

4747
# Get the number of computational nodes and this computational node number
48-
numberOfComputationalNodes = iron.ComputationalNumberOfNodesGet()
49-
computationalNodeNumber = iron.ComputationalNodeNumberGet()
48+
computationEnvironment = iron.ComputationEnvironment()
49+
numberOfComputationalNodes = computationEnvironment.NumberOfWorldNodesGet()
50+
computationalNodeNumber = computationEnvironment.WorldNodeNumberGet()
5051

5152
# Create a 3D rectangular cartesian coordinate system
5253
coordinateSystem = iron.CoordinateSystem()
@@ -240,7 +241,7 @@
240241
linearSolver = iron.Solver()
241242
problem.SolversCreateStart()
242243
problem.SolverGet([iron.ControlLoopIdentifiers.NODE],1,nonLinearSolver)
243-
nonLinearSolver.outputType = iron.SolverOutputTypes.PROGRESS
244+
nonLinearSolver.outputType = iron.SolverOutputTypes.MONITOR
244245
nonLinearSolver.NewtonJacobianCalculationTypeSet(iron.JacobianCalculationTypes.FD)
245246
nonLinearSolver.NewtonAbsoluteToleranceSet(1e-14)
246247
nonLinearSolver.NewtonSolutionToleranceSet(1e-14)

0 commit comments

Comments
 (0)