Conversation
…ency with the recent Cylinder update
There was a problem hiding this comment.
Pull request overview
This PR updates the slab force/basis implementation to match current conventions (isothermal slab profile normalization, cache versioning, and a self_consistent “frozen potential” mode) and adds compile-time parsing of the EXP version string for internal version-dependent logic.
Changes:
- Switch isothermal slab model normalization to use a
sech^2(z/2H)form and warn users when running older EXP versions. - Add a
self_consistentconfiguration flag to SlabSL to support freezing the potential coefficients. - Add compile-time EXP version parsing (
EXPversion.H,exp_build) and a small test utility; add slab cache version attribute.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/Test/version_test.cc | Adds a small example program that prints VERSION and parsed major/minor/patch. |
| utils/Test/CMakeLists.txt | Builds the new vtest utility. |
| utils/ICs/bonnerebert.cc | Removes the local VERSION macro and the -V version flag handling. |
| src/SlabSL.H | Documents self_consistent and adds storage for frozen coefficients. |
| src/SlabSL.cc | Adds YAML parsing for self_consistent and uses frozen coefficients during force evaluation. |
| src/cudaSlabSL.cu | Uses frozen coefficients when copying coefficients to the GPU if self_consistent=false. |
| include/SLGridMP2.H | Adds cache versioning for slab cache and improves internal grouping/comments. |
| include/libvars.H | Exposes exp_build as a compile-time parsed {major,minor,patch} version triple. |
| include/EXPversion.H | Introduces a constexpr version-string parser. |
| exputil/SLGridMP2.cc | Updates isothermal slab profile functions and adds slab cache version checks/write. |
| exputil/libvars.cc | Ensures config header is included in libvars translation unit. |
| expui/BiorthBasis.cc | Allows self_consistent as a recognized YAML key for the slab basis config. |
Comments suppressed due to low confidence (1)
utils/ICs/bonnerebert.cc:404
- The
-V/--versionoption was removed fromgetopt_longparsing, butlong_optionsstill defines aversionentry andusage()still advertises-V. This makes the CLI help incorrect and--versionwill likely behave unexpectedly (depending ongetopt_longbehavior). Either restore handling for-V/--versionor remove it consistently fromlong_optionsand the usage text.
"R:" /* runit */
"N:" /* number */
"S:" /* seed */
"h", /* help */
long_options, (int *) 0)) != EOF)
{
switch (c)
{
case 'o': /* --output */
oname = string(optarg);
break;
case 'd': /* --xstep */
h = atof(optarg);
break;
case 'r': /* --ratio */
Rratio = atof(optarg);
break;
case 'R': /* --runit */
R = atof(optarg);
break;
case 'M': /* --munit */
Munit = atof(optarg);
break;
case 'm': /* --mass */
M = atof(optarg);
break;
case 'T': /* --temp */
T = atof(optarg);
break;
case 'N': /* --number */
N = atoi(optarg);
break;
case 'S': /* --seed */
S = atoi(optarg);
break;
case 'h':
usage (0);
default:
usage (-1);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@michael-petersen I am probably the only one that uses the slab stuff and these changes implement some of the standard features from the other force classes. So no need for you to spend time on most of this. It's all tested and seems to work. However, note that this PR adds a compile-time function that parses the CMake-generated |
Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/a9b4ee92-2327-4580-968b-23dded26f6e2 Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
The |
Updates for consistency with the current conventions
SlablSLnow implements theself_consistentflag for enabling a frozen potentialOne general development support feature
Added compile -time parsing of the EXP version string into major, minor, patch for internal version control logic. E.g.
This will make future version-dependent toggles easier to implement. We have a usage example in both
SLGridSlaband inutils/Test.