mention example using the new Fortran module in examples/COUPLE/simple

This commit is contained in:
Axel Kohlmeyer
2020-10-14 23:29:03 -04:00
parent 88644caaec
commit dc8e6bc5ab
2 changed files with 13 additions and 12 deletions

View File

@ -19,10 +19,12 @@ for a simple program using the Fortran interface would be:
mpifort -o testlib.x lammps.f90 testlib.f90 -L. -llammps
Please note, that the MPI compiler wrapper is only required when the
calling the library from an MPI parallel code. Please also note the order
of the source files: the lammps.f90 file needs to be compiled first,
since it provides the ``LIBLAMMPS`` module that is imported by the
Fortran code using the interface.
calling the library from an MPI parallel code. Please also note the
order of the source files: the ``lammps.f90`` file needs to be compiled
first, since it provides the ``LIBLAMMPS`` module that is imported by
the Fortran code using the interface. A working example code can be
found together with equivalent examples in C and C++ in the
``examples/COUPLE/simple`` folder of the LAMMPS distribution.
.. versionadded:: 9Oct2020
@ -36,11 +38,11 @@ Fortran code using the interface.
.. note::
A contributed (and complete!) Fortran interface that is more
closely resembling the C-library interface is available
A contributed (and complete!) Fortran interface that more
closely resembles the C-library interface is available
in the ``examples/COUPLE/fortran2`` folder. Please see the
``README`` file in that folder for more information about that
Fortran interface and how to contact its author and maintainer.
``README`` file in that folder for more information about it
and how to contact its author and maintainer.
----------

View File

@ -116,12 +116,11 @@ PROGRAM f_driver
natoms = NINT(lmp%get_natoms())
ALLOCATE(x(3*natoms))
! these calls are commented out, b/c libfwrapper.c
! needs to be updated to use gather_atoms and scatter_atoms
! these calls are commented out, because they are not interfaced yet
!CALL lammps_gather_atoms(ptr,'x',1,3,x)
!CALL lmp%gather_atoms('x',1,3,x)
!x(1) = x(1) + epsilon
!CALL lammps_scatter_atoms(ptr,'x',1,3,x)
!CALL lmp%scatter_atoms('x',1,3,x)
DEALLOCATE(x)