cdbcacffce
when processing quoted strings, the quotes need to be removed
2020-07-17 10:23:07 -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
981b9a1f7a
Merge pull request #1567 from akohlmey/collected-small-fixes
...
Collected small fixes and update for the next patch
2019-07-19 17:25:39 -04:00
4c328bf846
add metachars '\i' and '\f' to regexp for interger and floating point number chars
2019-07-19 10:39:06 -04:00
856efa28aa
fix issue #1568
2019-07-17 19:37:08 -04:00
06dcc9e283
Merge branch 'master' into improve-include-consistency
...
# Conflicts:
# src/USER-MESO/atom_vec_tdpd.cpp
2019-07-09 14:50:00 -04:00
cfaa537296
use alternate implementation of numeric conversion functions
...
these new functions allow to choose between aborting with Error::one()
and exiting with Error::all(). in the long run those should replace
all of the functions in Force.
2019-07-08 17:51:37 -04:00
2c0eeeb976
one more chunk of files in src folder to be cleaned up
2019-07-05 14:43:20 -04:00
256531a29a
put implementation header first for all remaining main folder source files
2019-07-03 19:34:13 -04:00
d640c712f8
apply new utility function to most places creating new styles
2019-04-07 21:18:20 -04:00
9166001041
add code to allow reporting which styles are part of what package
2019-04-07 20:55:00 -04:00
a401998ede
correct sfgets() API to use const char for preprocessor string. whitespace cleanup
2019-02-01 12:23:06 +01:00
7fcc76f071
implement the first three convenience utility functions
2019-02-01 12:23:06 +01:00