more strictly follow the Fortran 2003 standard requirements

This commit is contained in:
Axel Kohlmeyer 2022-10-17 18:45:50 -04:00
parent 74d19b2b6c
commit 61c649fccb
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
2 changed files with 5 additions and 5 deletions

View File

@ -1,8 +1,8 @@
MODULE keepstuff
USE liblammps
IMPLICIT NONE
TYPE(LAMMPS) :: lmp
INTEGER :: mycomm
TYPE(LAMMPS), SAVE :: lmp
INTEGER, SAVE :: mycomm
CHARACTER(LEN=40), DIMENSION(3), PARAMETER :: demo_input = &
[ CHARACTER(LEN=40) :: &
'region box block 0 $x 0 2 0 2', &

View File

@ -110,7 +110,7 @@ FUNCTION f_lammps_gather_atoms_subset_mask(i) BIND(C)
INTEGER(c_int) :: f_lammps_gather_atoms_subset_mask
INTEGER(c_int), DIMENSION(:), ALLOCATABLE :: mask
INTEGER :: j
INTEGER(c_int), DIMENSION(*), PARAMETER :: tag = [3,2]
INTEGER(c_int), DIMENSION(2), PARAMETER :: tag = [3,2]
CALL lmp%gather_atoms_subset('mask', 1_c_int, tag, mask)
f_lammps_gather_atoms_subset_mask = -1
@ -130,7 +130,7 @@ FUNCTION f_lammps_gather_atoms_subset_position(xyz,id) BIND(C)
INTEGER(c_int), INTENT(IN), VALUE :: id, xyz
REAL(c_double) :: f_lammps_gather_atoms_subset_position
REAL(c_double), DIMENSION(:), ALLOCATABLE :: positions
INTEGER(c_int), DIMENSION(*), PARAMETER :: tag = [3,2]
INTEGER(c_int), DIMENSION(2), PARAMETER :: tag = [3,2]
INTEGER :: j
CALL lmp%gather_atoms_subset('x', 3_c_int, tag, positions)
@ -189,7 +189,7 @@ SUBROUTINE f_lammps_scatter_atoms_subset_mask() BIND(C)
USE keepstuff, ONLY : lmp
IMPLICIT NONE
INTEGER(c_int), DIMENSION(:), ALLOCATABLE :: all_masks
INTEGER(c_int), DIMENSION(*), PARAMETER :: tags = [3,1]
INTEGER(c_int), DIMENSION(2), PARAMETER :: tags = [3,1]
INTEGER(c_int), DIMENSION(2) :: masks
CALL lmp%gather_atoms('mask', 1_c_int, all_masks)