Commit Graph

40 Commits

Author SHA1 Message Date
22e93468d6 simplify code by appling varargs messages and warnings 2021-05-05 18:19:12 -04:00
e9e0bb71b6 Use varargs version of Error:all() and Error::one() where applicable 2021-04-25 21:30:51 -04:00
183b30abd7 use strmatch() consistently to detect respa and verlet runstyles with optional suffix 2021-03-30 18:30:22 -04:00
e481eb1154 simplify by using utils::strdup() fmt::format() and reorder includes 2021-03-29 07:29:14 -04:00
b32570c15e simplify by using utils::strdup() and reorder includes 2021-03-28 22:22:13 -04:00
bca3164fc4 fix whitespace issues 2021-01-26 18:39:02 -05:00
5a23b804d9 vtally changes to USER packages 2021-01-21 16:06:54 -07:00
51a20175c9 more code formatting consistency changes for loops and conditionals 2020-12-30 09:47:45 -05:00
4f5192fa86 silence compiler warnings 2020-12-30 09:21:11 -05:00
382ade15fe more consistent formatting of for/while loops and if statements 2020-12-30 09:09:08 -05:00
adf74b3a22 use https://lammps.sandia.gov based URLs consistently 2020-10-21 16:45:30 -04:00
62a63d0cd8 silence compiler warnings 2020-09-17 10:27:06 -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
6113169a47 IWYU based include statement cleanup 2020-09-02 17:39:34 -04:00
4f03acc560 Fix merge conflicts caused by code's do-si-do around Axel's additions
to the utils namespace.
2020-09-01 06:30:12 -06:00
2536f28e1a Per comments from Axel, continued the evolution of the output messages.
- Converted Compute message with imputed value to fmt::format style.
- Condensed most error-> output messages to oneliners where fmt::format
is called within the call to the error method. For a couple, the
formatting string/value list were complex enough that I continued using
a temporary string variable to make the code easier to read.
2020-09-01 05:49:29 -06:00
9ef725ea52 Move destruction of splines data structure to FixBocs destructor
from ComputePressure destructor.
2020-09-01 05:49:29 -06:00
4dca927693 Switch dynamically created arrays/matrices to use memory->create and
->destroy, LAMMPS-standard for dynamic memory management.
2020-09-01 05:49:29 -06:00
fe89edc828 Remove c_str() calls from message strings. Message class now accepts
actual strings.
2020-09-01 05:49:29 -06:00
0aa66319fe Change the build_xxx_splines methods to accept a const reference parameter
to the data vector rather than a vector parameter. Vectors are, as all
types are, passed by value in C++. Using a vector directly as a parameter
causes the data to be copied. Using a reference to the vector neatly
avoids that problem.

Also tucked fmt/format.h into its rightful place in the include list
since Axel says there's no absolute rule about it being an exception.
2020-09-01 05:49:29 -06:00
076c834734 Manually reconciled conflict from:
Corrected two issues in code identified by valgrind:
1) memory leaks (the subject of the original #1109) and
2) an invalid memory access (reading from beyond the end of an array).

Also:
- replaced several dynamically-allocated (calloc and free) local arrays with std::vector.
- reorganized include statements per new conventions, and
- updated messages to use strings and fmt.

Added folders and files used in manual testing and verification to examples folder.

No changes in analysis results are expected or intended. This is pure refactoring except for a bit of error message cleanup.
2020-09-01 05:48:49 -06:00
96d8d12a88 replace calls to force->*numeric() with the corresponding utils::*numeric()
this also removes the now obsolete functions from Force
2020-08-29 20:31:02 -04:00
88bf503451 Merge from master 2020-04-30 08:17:05 -06:00
5f68f3006f replace Fix::box_change_xxx variables with Fix::box_change bitmask and add check to Domain::init()
This allows a more specific tracking of whether multiple fixes are
modifying the same box parameter and error out in that case.
2020-02-08 15:12:26 -05:00
d8ef5f6991 added internal fix dummy command to enable more control of fix ordering 2019-11-05 12:57:34 -07:00
d750cc02c0 Changed the code in the read_F_table function to conform to the "expected behavior" description in #1572. Adopted a best-of-both-worlds approach, though, and processed the whole input file all the way through, emitting a message for each problem found, before issuing a final error message to stop processing. Updated doc to clarify requirement for uniform spacing of pressure correction points. 2019-08-02 08:46:04 -04:00
31e19e0824 complete cleaning includes in some more packages 2019-07-08 16:45:21 -04:00
416911aa7e more rearranging of include file order to put implementation headers first 2019-07-03 21:57:39 -04:00
3bc815efe8 fix a memory leak in fix bocs 2019-03-07 15:11:33 -05:00
9c27548a5c more replacing of sprintf() with snprintf() 2018-09-06 10:45:48 -04:00
38a998c03c Fix misc. warnings (#1076) 2018-08-24 14:58:28 -06:00
92a4dc25b1 Fix unused params in packages (#1076) 2018-08-24 10:42:08 -06:00
e37ee02eed port nh fixes to USER-BOCS package 2018-07-24 11:19:00 -04:00
f7c37a7a98 adapt isfinite() handling to upstream 2018-05-05 11:46:35 -04:00
095ca76b5b plug memory leaks in USER-BOCS 2018-05-05 11:44:21 -04:00
81293b0fda changes to integrate USER-BOCS into LAMMPS and to closer follow the LAMMPS programming/documentation style 2018-05-05 10:21:11 -04:00
fc0110a2e0 Update fix_bocs.cpp 2018-05-02 13:25:26 -04:00
2e2f19770c Removed .html files. Removed compute.h mods. Cast pressure for functions 2018-05-02 11:14:30 -04:00
56d0014a4a Added #include "citeme.h" 2018-04-26 10:05:49 -04:00
c5e884fb41 USER-BOCS 2018-04-26 09:34:47 -04:00