Commit Graph

232 Commits

Author SHA1 Message Date
a57311ce3a whitespace fixes 2021-02-28 12:03:50 -05:00
a89f0f332d Make regex code in utils thread-safe
regex_context_t is only 520 bytes on platforms with 8-byte pointers,
which is reasonable to allocate on the stack instead of as a global in
a userland program.
2021-02-26 15:24:08 -06:00
dfae88cf13 address spelling issues 2021-02-25 23:11:41 -05:00
92d892aa2d add new utility function utils::strfind() 2021-02-25 23:03:17 -05:00
a9467e830e update regex code in utils to state of git repo of 2021-02-25 2021-02-25 23:02:46 -05:00
0f07215a2b add utils::strdup() convenience function 2021-02-04 17:00:02 -05:00
4747e0496a add a bunch of unicode space equivalents 2021-01-30 02:22:49 -05:00
69e7480fed update utils::*numeric() functions to use utf8 check and substitution 2021-01-25 20:41:05 -05:00
72168d6780 add utility functions to detect UTF-8 characters and substitute with ASCII equivalents 2021-01-25 01:41:38 -05:00
bddd26ba6c additional changes needed to merge with current master 2021-01-11 17:26:00 -07:00
0b14770468 merge with current master 2021-01-11 16:13:33 -07:00
51a20175c9 more code formatting consistency changes for loops and conditionals 2020-12-30 09:47:45 -05:00
382ade15fe more consistent formatting of for/while loops and if statements 2020-12-30 09:09:08 -05:00
2dc80e9521 avoid crash in the case of checking an empty potential file 2020-11-01 15:19:52 -05:00
b931501711 add utils::path_dirname() to complement utils::path_basename() 2020-10-23 20:40:18 -04:00
adf74b3a22 use https://lammps.sandia.gov based URLs consistently 2020-10-21 16:45:30 -04:00
93a0d4c096 fix up some comments 2020-09-12 14:26:34 -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
485a169ef2 move merge sort to utils namespace 2020-09-06 17:38:53 -04:00
ceed9284c1 Merge branch 'master' into collected-small-changes 2020-09-04 13:32:47 -04:00
ce78be864a move date2num() convernience function from Universe class to utils namespace 2020-09-03 17:47:45 -04:00
9925122cea more IWYU updates 2020-09-03 00:22:09 -04:00
54ed23448b instantiate bounds() also with long long to make windows happy. 2020-08-31 14:14:51 -04:00
22ccde1d13 modernize utils::bounds() implementation and remove duplicate definition. 2020-08-31 12:58:00 -04:00
dd03c7232a Merge remote-tracking branch 'github/master' into move-convenience-functions 2020-08-31 11:41:18 -04:00
cf11945e21 get rid of utils::boundsbig() by making it a template function with two specializations 2020-08-31 11:25:43 -04:00
569b6f95a3 no need to use ValueTokenizer. Make code more compact. 2020-08-30 23:32:17 -04:00
4396dbd9a3 move Force::open_potential() to utils::open_potential() 2020-08-29 22:37:14 -04:00
5a22f4d7f2 support that LAMMPS_POTENTIALS is a real path variable with multiple entries, not just a single folder 2020-08-29 22:22:03 -04:00
05ff352021 add utils::open_potential() function to utils namespace 2020-08-29 22:08:16 -04:00
fcd0b9f78f move Force::bounds() and Force::boundsbig() to utils. 2020-08-29 18:23:03 -04:00
2a365c17e0 update utils namespace documentation including doxygen parts 2020-08-28 18:21:18 -04:00
024e4c5f21 make formatting and doxygen decorations for utils functions consistent 2020-08-24 20:55:13 -04:00
e2b113b5e1 Merge branch 'master' into refactor-reading 2020-08-10 12:25:16 -04:00
4126ba24c1 Move timespec2seconds to utils 2020-08-03 16:54:53 -04:00
74f50ed1bd Merge branch 'master' into collected-small-changes 2020-07-31 21:51:10 -04:00
8cb63194aa optimize utils::strmatch() by using const string reference 2020-07-30 23:42:03 -04:00
4b91ab0d23 add utils::trim() function to remove leading and trailing whitespace from string 2020-07-30 23:39:37 -04:00
0748b12472 when processing quoted strings, the quotes need to be removed 2020-07-17 13:58:15 -04:00
c3fe0e77c2 expose guesspath function and add unit test 2020-07-02 09:13:57 -04:00
911b95fdc9 std::string.find_last_of() wants a string not a character as argument 2020-06-29 23:26:01 -04:00
84ec2cc39b simplify more code with std::string and fmtlib 2020-06-25 23:13:28 -04:00
2acf71c3e2 add unit conversion to table pair style 2020-06-25 04:31:34 -04:00
aa94d3f723 Merge branch 'master' into pair-potential-file-unit-convert 2020-06-24 20:24:51 -04:00
ee5be42026 avoid having to use external test runner script by parsing environment variables directly 2020-06-24 09:32:59 -04:00
b29b3d52f6 initial implementation of automated unit conversion.
this includes a tester program and implementation into pair style tersoff
2020-06-22 17:57:05 -04:00
753e2b00cf potential file metadata may only be in the first line of a file. 2020-06-14 19:59:17 -04:00
0481184862 add utility function to get the units tag value from a potential file 2020-06-14 06:22:47 -04:00
22ed175632 Merge pull request #2151 from akohlmey/move-ubuf-to-lmptype
Move definition(s) of union ubuf to lmptype.h
2020-06-12 05:51:41 -04:00
9ca0d01a5b silence compiler warnings 2020-06-11 19:05:06 -04:00