stardis

Perform coupled heat transfer calculations
git clone git://git.meso-star.fr/stardis.git
Log | Files | Refs | README | LICENSE

commit 21fae3ba4f4bde64a1554c1cecb4d909e596ba4c
parent 99f2ca567044cdf52273b631f5c40d2e42df309b
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Mon, 24 Feb 2025 10:07:36 +0100

Fix incompatibility detection between options

Option -D, that is used to dump heat paths, whas allowed in cases where it
should not.

Diffstat:
Mdoc/stardis.1.in | 3+++
Msrc/stardis-args.c | 8++++----
Msrc/stardis-args.h.in | 9+++++++++
3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/doc/stardis.1.in b/doc/stardis.1.in @@ -180,6 +180,9 @@ and possibly followed by .Ql _err for failure paths .Pq e.g. Pa prefix00000000.vtk , Pa prefix00000001_err.vtk +.Pp +Can only be used in conjunction with some options that sample heat paths +.Pq Fl m , Fl p , Fl P , Fl R, Fl s No or Fl S . .It Fl d Ar file_base_name Write the geometry to a file in VTK format along with various properties, including possible errors. diff --git a/src/stardis-args.c b/src/stardis-args.c @@ -931,12 +931,12 @@ parse_args } if(args->mode & MODE_DUMP_PATHS) { - if(!(args->mode & COMPUTE_MODES)) { + if(!(args->mode & CAN_DUMP_PATHS)) { res = RES_BAD_ARG; - print_multiple_modes(buf, sizeof(buf), COMPUTE_MODES, 0); + print_multiple_modes(buf, sizeof(buf), CAN_DUMP_PATHS, 0); logger_print(args->logger, LOG_ERROR, - "Option -%c can only be used in conjunction with an option" - " that samples heat paths (%s).\n", + "Option -%c can only be used in conjunction with some options" + " that sample heat paths (%s).\n", mode_option(MODE_DUMP_PATHS), buf); goto error; } diff --git a/src/stardis-args.h.in b/src/stardis-args.h.in @@ -109,6 +109,15 @@ enum stardis_mode { | MODE_MEDIUM_COMPUTE | MODE_BOUNDARY_COMPUTE | MODE_FLUX_BOUNDARY_COMPUTE + | MODE_PROBE_COMPUTE_FLUX_ON_INTERFACE, + + CAN_DUMP_PATHS = + MODE_PROBE_COMPUTE | + MODE_IR_COMPUTE | + MODE_MEDIUM_COMPUTE | + MODE_BOUNDARY_COMPUTE | + MODE_MAP_COMPUTE | + MODE_PROBE_COMPUTE_ON_INTERFACE }; STATIC_ASSERT(GREEN_COMPATIBLE_MODES == (COMPUTE_MODES & GREEN_COMPATIBLE_MODES),