Commit Graph

224 Commits

Author SHA1 Message Date
8c56f60939 use bigint instead of int for timestep related variable functions to avoid overflows 2020-10-01 09:35:45 -04:00
b350dce573 improve error messages for variables and python commands 2020-09-23 19:02:55 -04:00
4c51a8ae57 move version and num_ver from Universe to LAMMPS and make num_ver an int 2020-09-19 11:37:08 -04:00
0f6a34775c Merge branch 'master' into symbolic-atom-constants 2020-09-15 17:44:31 -04:00
f1ef7d85a8 T2345: Replace instances of NULL with nullptr
The following changes have been applied to src and lib folders:
regex replace: ([^"_])NULL ⇒ \1nullptr (8968 chgs in src, 1153 in lib)
Manually find/change: (void \*) nullptr ⇒ nullptr (1 case)
regex find: ".*?nullptr.*?"
  Manually ~14 cases back to "NULL" in src, ~2 in lib
  regex finds a few false positive where nullptr appears between two
  strings in a function call
2020-09-12 09:34:38 -06:00
9d0c3bc665 replace some numeric constants in Atom and AtomVec classes with enumerators 2020-09-11 19:07:55 -04:00
9925122cea more IWYU updates 2020-09-03 00:22:09 -04:00
96d8d12a88 replace calls to force->*numeric() with the corresponding utils::*numeric()
this also removes the now obsolete functions from Force
2020-08-29 20:31:02 -04:00
67a9856e0c silence compiler warning when converting MAXBIGINT to a double 2020-08-04 19:07:53 -04:00
5b4275002c Merge branch 'master' into kim_fix 2020-07-20 20:27:41 -04:00
65f9c1abf5 bugfix: reorder instructions 2020-07-17 14:00:16 -04:00
b3bd36947d add convenience function to allow variable->set() command with a single string argument 2020-07-17 13:57:54 -04:00
2fb6a61f2a refactor code to make better use of std::string and simplify using changes to Variable class API 2020-07-17 01:23:17 -04:00
63bebf58fd add convenience function to allow variable->set() command with a single string argument 2020-07-17 00:46:31 -04:00
dd7bc1d34e use const char * instead of char * so we don't need a cast for string constants 2020-07-17 00:45:58 -04:00
0af7fbe98e use const char * instead of char * so we don't need a cast for string constants 2020-07-17 00:34:23 -04:00
c37b5e50b1 flag error when trying to compute an average of an empty vector 2020-07-03 22:35:53 -04:00
307f54611f use doubles to avoid multiple integer overflows in slope() function 2020-07-02 16:43:00 -04:00
91502b8bf6 more simplification 2020-06-26 16:22:19 -04:00
54a8b4e08b more local buffers removed and file error status added. 2020-06-04 20:14:19 -04:00
dd11fb3964 remove .c_str() and simplify output in several places 2020-06-03 16:37:30 -04:00
23c55b0046 fix "use of class after delete" bug 2020-05-11 16:23:04 -04:00
1192845ad5 avoid segmentation faults in universe/uloop variable increment 2020-03-25 08:19:24 -04:00
21f3f51ea2 better error messages on accessing invalid IDs in variable expressions 2019-08-05 23:17:38 -04:00
a50d57bceb Merge branch 'master' into improve-include-consistency
# Conflicts:
#	src/utils.cpp
2019-07-19 17:57:58 -04:00
e72aef2a96 more sscanf() return value checking 2019-07-19 12:01:16 -04:00
256531a29a put implementation header first for all remaining main folder source files 2019-07-03 19:34:13 -04:00
42c31227d9 continuing to clean up include file lists 2019-07-01 15:59:16 -04:00
17602b4c26 some more include file cleanup.
include cstdlib where functions like atoi() are used
remove unneeded include statements from headers
2019-06-27 01:02:17 -04:00
6536399fc3 Merge pull request #1476 from uihsnv/log_spacing
A function logfreq3(), for logarithmic spacing
2019-06-17 14:12:59 -04:00
3e2f3a8058 avoid a case of mixing malloc()/free() with new/delete 2019-06-10 18:22:04 -04:00
3b7c15a8b2 Merging to stay up-to-date
Merge remote-tracking branch 'lammps_upstream/master' into log_spacing
2019-06-01 10:33:27 +05:30
68d69955d0 fix off-by-one error 2019-05-31 14:38:12 -04:00
02e7dd5716 also allow %e in format variables of suffix 2019-05-30 14:52:26 -04:00
1a5c3c6dcb add check that allows only %f and %g conversions in variable format strings 2019-05-30 14:46:07 -04:00
c2a200fe85 A function logfreq3(), for logarithmical spacing
Unlike logfreq(), this also allows for fractional ratios
Resolves #1471
2019-05-26 14:00:21 +05:30
e359e80118 fix bug reported in issue #1410 2019-04-04 22:39:58 -04:00
81dd96f970 print more meaningful error message when trying to access individual data from a local array produced by a compute */local 2019-04-04 12:42:54 -04:00
ba320967a5 fix variable delete bug reported in #1346 2019-02-27 16:08:41 -05:00
7e1f760b72 rename python.h to lmppython.h and correspondingly python.cpp to lmppython.cpp 2019-02-04 14:24:53 -05:00
6f8c544a7d add option to print_var_error() function to delegate errors to error->one() instead of error->all()
this change is applied to cases that may happen on individual ranks only, e.g. out-of-range access, division by zero, invalid argument.
2019-01-10 16:50:00 -05:00
09abc0c75a Fix memory leak in Variable::compute_atom 2018-11-29 00:41:40 -05:00
3508eca337 make sure all local Tree pointers are initialized, either to a newly allocated Tree() or NULL 2018-11-28 18:49:37 -05:00
1fc3b4618c remove dead code and silence compiler warnings 2018-11-15 16:50:56 -05:00
4d52cb9245 more buffer overflow avoiding through using snprintf() 2018-09-06 09:57:43 -04:00
7a2cb10864 Remove unused variable (#1076) 2018-08-24 10:42:08 -06:00
e9bc939098 Fix more unused parameter warnings (#1076) 2018-08-23 12:22:44 -06:00
5789ef9128 bug-fix for slope() function in variable 2018-08-03 10:08:02 -06:00
3e79296dcf Variable style 'string' substitutes variables in definition 2018-06-14 13:10:08 +02:00
e4071d7f46 replace C-style include files with their C++ equivalents 2018-04-27 18:00:24 -04:00