From 89b9967f2c46764e7181a3160e5659874c712bf5 Mon Sep 17 00:00:00 2001 From: Karl Hammond Date: Wed, 10 Aug 2022 11:37:15 -0500 Subject: [PATCH] Added part of lmp_extract_global --- fortran/lammps.f90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fortran/lammps.f90 b/fortran/lammps.f90 index 0e91a378b1..64d4c50e48 100644 --- a/fortran/lammps.f90 +++ b/fortran/lammps.f90 @@ -83,6 +83,8 @@ MODULE LIBLAMMPS PROCEDURE :: memory_usage => lmp_memory_usage PROCEDURE :: get_mpi_comm => lmp_get_mpi_comm PROCEDURE :: extract_setting => lmp_extract_setting + PROCEDURE, PRIVATE :: lmp_extract_global_int + GENERIC :: extract_global => lmp_extract_global_int ! TODO PROCEDURE :: version => lmp_version END TYPE lammps @@ -541,6 +543,7 @@ CONTAINS datatype = lammps_extract_global_datatype(self%handle, Cname) IF ( datatype /= LAMMPS_INT ) THEN ! throw an exception or something; data type doesn't match! + WRITE(0,*) 'WARNING: global data type is inconsistent' END IF Cptr = lammps_extract_global(self%handle, Cname) CALL c_f_pointer(Cptr, ptr)