Commit Graph

397 Commits

Author SHA1 Message Date
4f6c3d12f7 avoid variable definition error: expected 3 arguments but found N 2025-01-10 20:10:53 -05:00
53c3fa2afd memcpymask is a constant and thus should be uppercase 2024-12-27 01:54:44 -05:00
5ece81323e suppress bogus compiler warnings about overflowing buffer size in memcpy() 2024-12-26 22:53:44 -05:00
4296db4991 add link with more explanation to the illegal variable errors 2024-11-20 11:15:12 -05:00
804aa4ee85 improve error message 2024-09-16 20:38:50 -04:00
0f792b0434 cast return value to void to indicate that we want to ignore the result 2024-08-13 12:36:43 -04:00
7e3d613c80 set to zero on underflow to avoid std::stod() throwing an out-of-range exception 2024-07-30 22:24:59 -04:00
a75862088a replace atof() with std::stod() 2024-07-30 03:43:26 -04:00
f0e9d0c96d update comment 2024-07-30 03:39:03 -04:00
361b8c25c4 use c++11 function to convert strings to numbers 2024-07-30 00:34:12 -04:00
58513320d3 core files: replace sprintf with snprintf 2024-07-13 15:33:56 -06:00
6ad0145709 new special variable function is_timeout() 2024-06-29 04:02:33 -04:00
118fa8e209 must reset "eval_in_progress[]" flags to avoid bogus circular dependency errors 2024-06-03 07:47:59 -04:00
3bc367e0b0 implement suggestions made by @rbberger 2024-05-25 05:00:08 -04:00
371ec2036f support trailing brackets for sort() and rsort() 2024-05-23 01:24:41 -04:00
272ce64272 add special function for sorting vectors 2024-05-22 23:46:36 -04:00
5ffff255ea simplify with STL classes 2024-05-22 23:46:13 -04:00
c1538c2f78 move varstyle array definition to Variable class so it can be used in a more general way 2024-05-22 23:42:56 -04:00
1346be4168 Merge pull request #4126 from lammps/global-vector-access
Relax error check on accessing fixes that produce variable size vectors/arrays
2024-04-13 16:58:50 -04:00
9f88867b37 update parsing of file and atomfile variable files
this allows to handle comments and empty lines everywhere for atomfile
and file variables and in a consistent manner since it used utils functions.
also error messages are improved and more specific.
2024-04-10 03:08:08 -04:00
af88cec22d relax error check on fixes that produce variable size vectors/arrays 2024-04-05 15:12:46 -06:00
2c26586b1a clean up 2024-04-04 13:50:43 -06:00
6a2bcc7258 merge in current develop 2024-04-04 13:30:14 -06:00
30f330718a more consistent error checks on variable length global vecs and arrays 2024-03-29 16:53:18 -06:00
7137290682 Follow requested changes to patch 2024-03-29 21:52:57 +01:00
1b7bc36505 Fix variables compatibility with chunk arrays
When using variables with chunk computes that produce arrays (such as `compute chunk/atom`) the compute will not have set `size_array_rows` to the appropriate value before it has ever been called and will therefore incorrectly have thrown the error "Variable formula compute array is zero length".
2024-03-10 12:56:33 +01:00
46cacf089e whitespace 2024-02-19 21:41:29 -05:00
7a5fa7ca54 not a bug but change variable evaluate local ivar to jvar to avoid code confusion 2024-02-19 17:34:43 -07:00
d70a98561f fix bug in removing a variable 2024-02-19 17:33:51 -07:00
6442e05988 even more define to static constexpr conversions 2024-01-25 02:17:28 -05:00
a6261d75b9 some more define to static constexpr conversions 2024-01-24 21:14:19 -05:00
12422ff510 replace defines with static constexpr declarations 2024-01-21 15:53:35 -05:00
9e1f85518c avoid segfault with immediate variables 2023-11-27 05:31:12 -05:00
e3ba19c145 Merge branch 'develop' into variable-custom-atom-properties 2023-11-25 06:42:38 -05:00
dc32efe9be whitespace 2023-11-23 16:19:43 -05:00
961cbfbe10 add custom atom property refs to variable syntax 2023-11-22 22:40:58 -07:00
0db826ae77 whitespace 2023-11-22 19:39:29 -05:00
eb6c101d94 add ternary math function 2023-11-22 09:49:11 -07:00
ea8234a875 treat immediate variables like equal style also for evaluating references to computes and fixes 2023-11-16 22:08:00 -05:00
3390a11312 improve error detection and messages 2023-11-12 10:04:04 -05:00
7d9c068da0 whitespace 2023-08-22 11:50:54 -04:00
aad232ffc6 fix typo 2023-08-22 11:46:57 -04:00
6e1529ddff finish changes to variables 2023-08-18 13:18:50 -06:00
91d826a5d6 changed compute section of variable formulas 2023-08-18 09:34:46 -06:00
95e9e6549f simply variable.cpp 2023-08-18 09:28:58 -06:00
2da908190b make error messages consistent and improve their grammar 2023-07-21 11:24:57 -04:00
c7996b506a make use of Compute::is_initialized() and Compute::init_flags() 2023-07-20 20:31:48 -04:00
564a8e88c1 use blanks on both sides of comparison operators not only one, remove blanks next to parenthesis 2023-07-11 10:31:16 -04:00
6d6f57aeff cosmetic 2023-06-20 16:17:11 -04:00
9cc6839a8b Merge branch 'develop' into collected-small-fixes 2023-06-06 08:36:25 -04:00