From b40e0be1c9971eb1112bdcf81b91852d5408a512 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 12 Jan 2023 12:07:29 -0500 Subject: [PATCH] reset to current state of the library interface and remove parts from upstream that have crept in --- examples/COUPLE/plugin/liblammpsplugin.c | 2 -- examples/COUPLE/plugin/liblammpsplugin.h | 26 ++---------------------- examples/COUPLE/plugin/simple.c | 2 +- 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/examples/COUPLE/plugin/liblammpsplugin.c b/examples/COUPLE/plugin/liblammpsplugin.c index 0b7eda7537..bc83262b29 100644 --- a/examples/COUPLE/plugin/liblammpsplugin.c +++ b/examples/COUPLE/plugin/liblammpsplugin.c @@ -188,8 +188,6 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib) lmp->has_error = NULL; lmp->get_last_error_message = NULL; #endif - - ADDSYM(python_api_version); return lmp; } diff --git a/examples/COUPLE/plugin/liblammpsplugin.h b/examples/COUPLE/plugin/liblammpsplugin.h index eb63ca6807..52ed781818 100644 --- a/examples/COUPLE/plugin/liblammpsplugin.h +++ b/examples/COUPLE/plugin/liblammpsplugin.h @@ -33,7 +33,7 @@ #endif #if defined(LAMMPS_BIGBIG) || defined(LAMMPS_SMALLBIG) -#include /* for int64_t */ +#include /* for int64_t */ #endif /* The following enums must be kept in sync with the equivalent enums @@ -71,27 +71,7 @@ enum _LMP_TYPE_CONST { LMP_SIZE_COLS = 5 /*!< return number of columns */ }; -/* Error codes to select the suitable function in the Error class */ - -enum _LMP_ERROR_CONST { - LMP_ERROR_WARNING = 0, /*!< call Error::warning() */ - LMP_ERROR_ONE = 1, /*!< called from one MPI rank */ - LMP_ERROR_ALL = 2, /*!< called from all MPI ranks */ - LMP_ERROR_WORLD = 4, /*!< error on Comm::world */ - LMP_ERROR_UNIVERSE = 8 /*!< error on Comm::universe */ -}; - -/** Variable style constants for extracting data from variables. - * - * Must be kept in sync with the equivalent constants in python/lammps/constants.py, - * fortran/lammps.f90, and tools/swig/lammps.i */ - -enum _LMP_VAR_CONST { - LMP_VAR_EQUAL = 0, /*!< compatible with equal-style variables */ - LMP_VAR_ATOM = 1, /*!< compatible with atom-style variables */ - LMP_VAR_VECTOR = 2, /*!< compatible with vector-style variables */ - LMP_VAR_STRING = 3 /*!< return value will be a string (catch-all) */ -}; +/* Ifdefs to allow this file to be included in C and C++ programs */ #ifdef __cplusplus extern "C" { @@ -238,8 +218,6 @@ struct _liblammpsplugin { int (*has_error)(void *); int (*get_last_error_message)(void *, char *, int); - - int (*python_api_version)(); }; typedef struct _liblammpsplugin liblammpsplugin_t; diff --git a/examples/COUPLE/plugin/simple.c b/examples/COUPLE/plugin/simple.c index 8383584a38..6cc453bd34 100644 --- a/examples/COUPLE/plugin/simple.c +++ b/examples/COUPLE/plugin/simple.c @@ -53,7 +53,7 @@ int main(int narg, char **arg) MPI_Init(&narg,&arg); if (narg != 4) { - printf("Syntax: simpleC P in.lammps /path/to/liblammps.so\n"); + printf("Syntax: %s P in.lammps /path/to/liblammps.so\n", arg[0]); exit(1); }