Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for new computation environment routines. #4

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 3.4 FATAL_ERROR)

if (DEFINED OpenCMISSLibs_DIR)
set(CMAKE_PROJECT_INCLUDE_BEFORE ${OpenCMISSLibs_DIR}/opencmisslibs-preconfig.cmake)
endif ()

project(Stokes_ALE VERSION 1.0 LANGUAGES C Fortran)

find_package(OpenCMISSLibs 1.3.0 REQUIRED COMPONENTS Iron CONFIG)
Expand Down
13 changes: 9 additions & 4 deletions src/fortran/stokes_ale.F90
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
PROGRAM stokes_ale
PROGRAM StokesALEExample

USE OpenCMISS
USE OpenCMISS_Iron
#ifndef NOMPIMOD
USE MPI
#endif

IMPLICIT NONE

#ifdef NOMPIMOD
#include "mpif.h"
#endif
Expand All @@ -19,6 +21,7 @@ PROGRAM stokes_ale
REAL(CMISSRP), PARAMETER :: WIDTH=1.0_CMISSRP
REAL(CMISSRP), PARAMETER :: LENGTH=1.0_CMISSRP

INTEGER(CMISSIntg), PARAMETER :: ContextUserNumber=1
INTEGER(CMISSIntg), PARAMETER :: CoordinateSystemUserNumber=1
INTEGER(CMISSIntg), PARAMETER :: RegionUserNumber=2
INTEGER(CMISSIntg), PARAMETER :: MeshUserNumber=3
Expand Down Expand Up @@ -130,6 +133,7 @@ PROGRAM stokes_ale

TYPE(cmfe_RegionType) :: Region
TYPE(cmfe_RegionType) :: WorldRegion
TYPE(cmfe_ComputationEnvironmentType) :: computationEnvironment
TYPE(cmfe_CoordinateSystemType) :: CoordinateSystem
TYPE(cmfe_CoordinateSystemType) :: WorldCoordinateSystem
TYPE(cmfe_BasisType) :: BasisGeometry
Expand Down Expand Up @@ -188,8 +192,9 @@ PROGRAM stokes_ale
!CHECK COMPUTATIONAL NODE

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

!
!================================================================================================================================
Expand Down Expand Up @@ -885,4 +890,4 @@ PROGRAM stokes_ale
WRITE(*,'(A)') "Program successfully completed."
STOP

END PROGRAM stokes_ale
END PROGRAM StokesALEExample