@@ -109,8 +109,8 @@ PROGRAM stokes_dynamic
109109 TYPE (cmfe_RegionType) :: Region
110110 TYPE (cmfe_RegionType) :: WorldRegion
111111 TYPE (cmfe_ComputationEnvironmentType) :: computationEnvironment
112+ TYPE (cmfe_ContextType) :: context
112113 TYPE (cmfe_CoordinateSystemType) :: CoordinateSystem
113- TYPE (cmfe_CoordinateSystemType) :: WorldCoordinateSystem
114114 TYPE (cmfe_BasisType) :: BasisGeometry
115115 TYPE (cmfe_BasisType) :: BasisVelocity
116116 TYPE (cmfe_BasisType) :: BasisPressure
@@ -146,8 +146,11 @@ PROGRAM stokes_dynamic
146146
147147 ! INITIALISE OPENCMISS
148148
149- CALL cmfe_Initialise(WorldCoordinateSystem,WorldRegion,Err)
150- CALL cmfe_ErrorHandlingModeSet(CMFE_ERRORS_TRAP_ERROR,Err)
149+ CALL cmfe_Context_Initialise(context,err)
150+ CALL cmfe_Initialise(context,err)
151+ CALL cmfe_ErrorHandlingModeSet(CMFE_ERRORS_TRAP_ERROR,err)
152+ CALL cmfe_Region_Initialise(worldRegion,err)
153+ CALL cmfe_Context_WorldRegionGet(context,worldRegion,err)
151154
152155 !
153156 ! ================================================================================================================================
@@ -157,6 +160,7 @@ PROGRAM stokes_dynamic
157160
158161 ! Get the computational nodes information
159162 CALL cmfe_ComputationEnvironment_Initialise(computationEnvironment,err)
163+ CALL cmfe_Context_ComputationEnvironmentGet(context,computationEnvironment,err)
160164 CALL cmfe_ComputationEnvironment_NumberOfWorldNodesGet(computationEnvironment,numberOfComputationalNodes,err)
161165 CALL cmfe_ComputationEnvironment_WorldNodeNumberGet(computationEnvironment,computationalNodeNumber,err)
162166
@@ -235,7 +239,7 @@ PROGRAM stokes_dynamic
235239
236240 ! Start the creation of a new RC coordinate system
237241 CALL cmfe_CoordinateSystem_Initialise(CoordinateSystem,Err)
238- CALL cmfe_CoordinateSystem_CreateStart(CoordinateSystemUserNumber,CoordinateSystem,Err)
242+ CALL cmfe_CoordinateSystem_CreateStart(CoordinateSystemUserNumber,context, CoordinateSystem,Err)
239243 ! Set the coordinate system dimension
240244 CALL cmfe_CoordinateSystem_DimensionSet(CoordinateSystem,NUMBER_OF_DIMENSIONS,Err)
241245 ! Finish the creation of the coordinate system
@@ -265,7 +269,7 @@ PROGRAM stokes_dynamic
265269 ! Start the creation of new bases
266270 MESH_NUMBER_OF_COMPONENTS= 1
267271 CALL cmfe_Basis_Initialise(BasisGeometry,Err)
268- CALL cmfe_Basis_CreateStart(BASIS_NUMBER_SPACE,BasisGeometry,Err)
272+ CALL cmfe_Basis_CreateStart(BASIS_NUMBER_SPACE,context, BasisGeometry,Err)
269273 ! Set the basis type (Lagrange/Simplex)
270274 CALL cmfe_Basis_TypeSet(BasisGeometry,BASIS_TYPE,Err)
271275 ! Set the basis xi number
@@ -291,7 +295,7 @@ PROGRAM stokes_dynamic
291295 ! Initialise a new velocity basis
292296 CALL cmfe_Basis_Initialise(BasisVelocity,Err)
293297 ! Start the creation of a basis
294- CALL cmfe_Basis_CreateStart(BASIS_NUMBER_VELOCITY,BasisVelocity,Err)
298+ CALL cmfe_Basis_CreateStart(BASIS_NUMBER_VELOCITY,context, BasisVelocity,Err)
295299 ! Set the basis type (Lagrange/Simplex)
296300 CALL cmfe_Basis_TypeSet(BasisVelocity,BASIS_TYPE,Err)
297301 ! Set the basis xi number
@@ -320,7 +324,7 @@ PROGRAM stokes_dynamic
320324 ! Initialise a new pressure basis
321325 CALL cmfe_Basis_Initialise(BasisPressure,Err)
322326 ! Start the creation of a basis
323- CALL cmfe_Basis_CreateStart(BASIS_NUMBER_PRESSURE,BasisPressure,Err)
327+ CALL cmfe_Basis_CreateStart(BASIS_NUMBER_PRESSURE,context, BasisPressure,Err)
324328 ! Set the basis type (Lagrange/Simplex)
325329 CALL cmfe_Basis_TypeSet(BasisPressure,BASIS_TYPE,Err)
326330 ! Set the basis xi number
@@ -510,7 +514,7 @@ PROGRAM stokes_dynamic
510514 ! Start the creation of a problem.
511515 CALL cmfe_Problem_Initialise(Problem,Err)
512516 CALL cmfe_ControlLoop_Initialise(ControlLoop,Err)
513- CALL cmfe_Problem_CreateStart(ProblemUserNumber,[CMFE_PROBLEM_FLUID_MECHANICS_CLASS,CMFE_PROBLEM_STOKES_EQUATION_TYPE, &
517+ CALL cmfe_Problem_CreateStart(ProblemUserNumber,context, [CMFE_PROBLEM_FLUID_MECHANICS_CLASS,CMFE_PROBLEM_STOKES_EQUATION_TYPE, &
514518 & CMFE_PROBLEM_TRANSIENT_STOKES_SUBTYPE],Problem,Err)
515519 ! Finish the creation of a problem.
516520 CALL cmfe_Problem_CreateFinish(Problem,Err)
@@ -668,7 +672,7 @@ PROGRAM stokes_dynamic
668672 ENDIF
669673
670674 ! Finialise CMISS
671- CALL cmfe_Finalise(Err)
675+ CALL cmfe_Finalise(context, Err)
672676 WRITE (* ,' (A)' ) " Program successfully completed."
673677 STOP
674678
0 commit comments