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
6a9073a0cb
Add count_words for C-Strings
2020-06-11 13:50:26 -04:00
6cb5345cd0
Add optimized version of count_words for default whitespace chars
2020-06-11 13:37:22 -04:00
9945f73743
fix spelling in a few more files
2020-06-11 01:05:58 -04:00
81d937ee97
Performance optimization of Tokenizer
...
Reduces string allocations and removes std::vector from Tokenizer
Most processing now happens on-demand.
2020-06-11 00:22:04 -04:00
a42a86c0d2
Remove more c_str()
2020-06-05 12:13:41 -04:00
7df387f7d5
Merge remote-tracking branch 'origin/master' into refactor-table-reading
2020-06-05 12:09:57 -04:00
4a6d3bc0e0
Move common potentials opening code to utils
2020-06-04 17:18:28 -04:00
47888b587a
add convenience function to get the output of strerror(errno) as c++ string
2020-06-04 12:01:02 -04:00
9291d2a9d7
Simplify count_words, add trim_and_count_words
...
The original count_words function (before it was put into utils::) also trimmed
comments. For compatibility this behaviour was retained at first. However, due
to the name the trimming is not immediatly apparent and many times not
wanted.
Therefore, this commit replaces count_words with an implementation that
just does what it says. If a comment should be trimmed there is a
trim_comment function. For convenience, a trim_and_count_words function was
added and is now used where the old behaviour was needed.
2020-06-04 11:13:37 -04:00
60f17e7397
Add filesystem utils functions
2020-06-02 14:11:09 -04:00