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
ee90796679
Merge branch 'master' into add-fmt-lib
...
# Conflicts:
# src/lammps.cpp
# src/utils.cpp
2020-05-31 09:45:54 -04:00
b5b71bbb92
(re-)add example uses of {fmt}
2020-05-26 15:16:35 -04:00
46239e4577
Add utils::is_double and utils::is_integer
2020-05-20 15:53:41 -04:00
db46521d64
Add utils::count_words and utils::trim_comment
2020-05-20 15:53:08 -04:00
fa2a6d7c6b
replace legacy preprocessor tests for linux with POSIX compliant ones
2020-05-03 01:04:52 -04:00
c28b9f100c
remove unused and broken function
2020-03-18 15:38:29 -04:00
e2988c5c20
refactor sfgets() and sfread() to both allow NULL filenames and guess from /proc if needed and possible
2019-10-18 17:55:28 +02:00
63cb0775ef
handle the case where /proc/self/fd/# does not exist (anymore)
2019-10-17 13:17:19 -04:00
cad6293078
use new utils::sfread() utility function in several classes
2019-10-17 11:29:08 -04:00
7d1cd63e1d
added a safe fread variant with error checking.
2019-10-17 09:46:18 -04:00
a50d57bceb
Merge branch 'master' into improve-include-consistency
...
# Conflicts:
# src/utils.cpp
2019-07-19 17:57:58 -04:00