Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions src/fortran/darcy_static.F90
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ PROGRAM darcy_static
!CMISS variables
TYPE(cmfe_RegionType) :: Region
TYPE(cmfe_RegionType) :: WorldRegion
TYPE(cmfe_ComputationEnvironmentType) :: computationEnvironment
TYPE(cmfe_ContextType) :: context
TYPE(cmfe_CoordinateSystemType) :: CoordinateSystem
TYPE(cmfe_CoordinateSystemType) :: WorldCoordinateSystem
TYPE(cmfe_BasisType) :: BasisGeometry
TYPE(cmfe_BasisType) :: BasisVelocity
TYPE(cmfe_BasisType) :: BasisPressure
Expand Down Expand Up @@ -122,12 +123,17 @@ PROGRAM darcy_static
INTEGER(CMISSIntg) :: EquationsSetIndex,i,BoundaryNodeDomain,Err

!Intialise OpenCMISS
CALL cmfe_Initialise(WorldCoordinateSystem,WorldRegion,Err)
CALL cmfe_ErrorHandlingModeSet(CMFE_ERRORS_TRAP_ERROR,Err)

CALL cmfe_Context_Initialise(context,err)
CALL cmfe_Initialise(context,err)
CALL cmfe_ErrorHandlingModeSet(CMFE_ERRORS_TRAP_ERROR,err)
CALL cmfe_Region_Initialise(worldRegion,err)
CALL cmfe_Context_WorldRegionGet(context,worldRegion,err)

!Get the computational nodes information
CALL cmfe_ComputationalNumberOfNodesGet(NumberOfComputationalNodes,Err)
CALL cmfe_ComputationalNodeNumberGet(ComputationalNodeNumber,Err)
CALL cmfe_ComputationEnvironment_Initialise(computationEnvironment,err)
CALL cmfe_Context_ComputationEnvironmentGet(context,computationEnvironment,err)
CALL cmfe_ComputationEnvironment_NumberOfWorldNodesGet(computationEnvironment,numberOfComputationalNodes,err)
CALL cmfe_ComputationEnvironment_WorldNodeNumberGet(computationEnvironment,computationalNodeNumber,err)

!-----------------------------------------------------------------------------------------------------------
! PROBLEM CONTROL PANEL
Expand Down Expand Up @@ -198,7 +204,7 @@ PROGRAM darcy_static

!Start the creation of a new RC coordinate system
CALL cmfe_CoordinateSystem_Initialise(CoordinateSystem,Err)
CALL cmfe_CoordinateSystem_CreateStart(CoordinateSystemUserNumber,CoordinateSystem,Err)
CALL cmfe_CoordinateSystem_CreateStart(CoordinateSystemUserNumber,context,CoordinateSystem,Err)
!Set the coordinate system dimension
CALL cmfe_CoordinateSystem_DimensionSet(CoordinateSystem,NUMBER_OF_DIMENSIONS,Err)
!Finish the creation of the coordinate system
Expand All @@ -224,7 +230,7 @@ PROGRAM darcy_static
!Start the creation of new bases
MESH_NUMBER_OF_COMPONENTS=1
CALL cmfe_Basis_Initialise(BasisGeometry,Err)
CALL cmfe_Basis_CreateStart(BASIS_NUMBER_GEOMETRY,BasisGeometry,Err)
CALL cmfe_Basis_CreateStart(BASIS_NUMBER_GEOMETRY,context,BasisGeometry,Err)
!Set the basis type (Lagrange/Simplex)
CALL cmfe_Basis_TypeSet(BasisGeometry,BASIS_TYPE,Err)
!Set the basis xi number
Expand Down Expand Up @@ -385,7 +391,7 @@ PROGRAM darcy_static
!Start the creation of a problem.
CALL cmfe_Problem_Initialise(Problem,Err)
CALL cmfe_ControlLoop_Initialise(ControlLoop,Err)
CALL cmfe_Problem_CreateStart(ProblemUserNumber,[CMFE_PROBLEM_FLUID_MECHANICS_CLASS,CMFE_PROBLEM_DARCY_EQUATION_TYPE, &
CALL cmfe_Problem_CreateStart(ProblemUserNumber,context,[CMFE_PROBLEM_FLUID_MECHANICS_CLASS,CMFE_PROBLEM_DARCY_EQUATION_TYPE, &
& CMFE_PROBLEM_STANDARD_DARCY_SUBTYPE],Problem,Err)
!Finish the creation of a problem.
CALL cmfe_Problem_CreateFinish(Problem,Err)
Expand Down Expand Up @@ -508,7 +514,7 @@ PROGRAM darcy_static
ENDIF

!Finialise CMISS
CALL cmfe_Finalise(Err)
CALL cmfe_Finalise(context,Err)
WRITE(*,'(A)') "Program successfully completed."

END PROGRAM darcy_static
Loading