Commit Graph

90 Commits

Author SHA1 Message Date
f123246189 minor doc updates 2020-08-30 00:25:01 -04:00
ceeaf1e988 update and correct documentation for utils functions 2020-08-29 23:51:46 -04:00
83a9e5e724 handle spelling issues with new doc text 2020-08-29 22:55:05 -04:00
4396dbd9a3 move Force::open_potential() to utils::open_potential() 2020-08-29 22:37:14 -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
9cd0a52c44 Remove old comment 2020-08-03 16:58:56 -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
c3fe0e77c2 expose guesspath function and add unit test 2020-07-02 09:13:57 -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
0481184862 add utility function to get the units tag value from a potential file 2020-06-14 06:22:47 -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
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
636a1bffe3 Fix whitespace 2020-05-29 17:25:41 -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
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
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
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
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