@@ -45,7 +45,8 @@ PROGRAM burgers_generalised
4545 ! Program types
4646 TYPE (cmfe_BasisType) :: Basis
4747 TYPE (cmfe_ComputationEnvironmentType) :: computationEnvironment
48- TYPE (cmfe_CoordinateSystemType) :: CoordinateSystem,WorldCoordinateSystem
48+ TYPE (cmfe_ContextType) :: context
49+ TYPE (cmfe_CoordinateSystemType) :: CoordinateSystem
4950 TYPE (cmfe_DecompositionType) :: Decomposition
5051 TYPE (cmfe_EquationsType) :: Equations
5152 TYPE (cmfe_EquationsSetType) :: EquationsSet
@@ -66,11 +67,15 @@ PROGRAM burgers_generalised
6667 LOGICAL :: LINEAR_SOLVER_DIRECT_FLAG,EXPORT_FIELD
6768
6869 ! Intialise OpenCMISS
69- CALL cmfe_Initialise(WorldCoordinateSystem,WorldRegion,Err)
70- CALL cmfe_ErrorHandlingModeSet(CMFE_ERRORS_TRAP_ERROR,Err)
70+ CALL cmfe_Context_Initialise(context,err)
71+ CALL cmfe_Initialise(context,err)
72+ CALL cmfe_ErrorHandlingModeSet(CMFE_ERRORS_TRAP_ERROR,err)
73+ CALL cmfe_Region_Initialise(worldRegion,err)
74+ CALL cmfe_Context_WorldRegionGet(context,worldRegion,err)
7175
7276 ! Get the computational nodes information
7377 CALL cmfe_ComputationEnvironment_Initialise(computationEnvironment,err)
78+ CALL cmfe_Context_ComputationEnvironmentGet(context,computationEnvironment,err)
7479 CALL cmfe_ComputationEnvironment_NumberOfWorldNodesGet(computationEnvironment,numberOfComputationalNodes,err)
7580 CALL cmfe_ComputationEnvironment_WorldNodeNumberGet(computationEnvironment,computationalNodeNumber,err)
7681
@@ -101,7 +106,7 @@ PROGRAM burgers_generalised
101106
102107 ! Start the creation of a new RC coordinate system
103108 CALL cmfe_CoordinateSystem_Initialise(CoordinateSystem,Err)
104- CALL cmfe_CoordinateSystem_CreateStart(CoordinateSystemUserNumber,CoordinateSystem,Err)
109+ CALL cmfe_CoordinateSystem_CreateStart(CoordinateSystemUserNumber,context, CoordinateSystem,Err)
105110 ! Set the coordinate system to be 1D
106111 CALL cmfe_CoordinateSystem_DimensionSet(CoordinateSystem,1 ,Err)
107112 ! Finish the creation of the coordinate system
@@ -126,7 +131,7 @@ PROGRAM burgers_generalised
126131
127132 ! Start the creation of a basis
128133 CALL cmfe_Basis_Initialise(Basis,Err)
129- CALL cmfe_Basis_CreateStart(BasisUserNumber,Basis,Err)
134+ CALL cmfe_Basis_CreateStart(BasisUserNumber,context, Basis,Err)
130135 CALL cmfe_Basis_TypeSet(Basis,CMFE_BASIS_LAGRANGE_HERMITE_TP_TYPE,Err)
131136 CALL cmfe_Basis_NumberOfXiSet(Basis,1 ,Err)
132137 ! Set the basis xi interpolation and number of Gauss points
@@ -251,7 +256,7 @@ PROGRAM burgers_generalised
251256
252257 ! Create the problem
253258 CALL cmfe_Problem_Initialise(Problem,Err)
254- CALL cmfe_Problem_CreateStart(ProblemUserNumber,[CMFE_PROBLEM_FLUID_MECHANICS_CLASS,CMFE_PROBLEM_BURGERS_EQUATION_TYPE, &
259+ CALL cmfe_Problem_CreateStart(ProblemUserNumber,context, [CMFE_PROBLEM_FLUID_MECHANICS_CLASS,CMFE_PROBLEM_BURGERS_EQUATION_TYPE, &
255260 & CMFE_PROBLEM_DYNAMIC_BURGERS_SUBTYPE],Problem,Err)
256261 ! Finish the creation of a problem.
257262 CALL cmfe_Problem_CreateFinish(Problem,Err)
@@ -370,7 +375,7 @@ PROGRAM burgers_generalised
370375 CALL cmfe_Fields_Finalise(Fields,Err)
371376 ENDIF
372377
373- CALL cmfe_Finalise(Err)
378+ CALL cmfe_Finalise(context, Err)
374379 WRITE (* ,' (A)' ) " Program successfully completed."
375380
376381END PROGRAM burgers_generalised
0 commit comments