Skip to content

Potential Bug: innerRegionBoxScalingFactor silently ignored for common open/closed configurations (no warning, mesh unchanged)` #90

Description

@AlejandroMunozManterola

Summary

adapterOptions.innerRegionBoxScalingFactor is read from the input JSON and stored on ShapesClassification, but it only affects mesh construction in one specific branch: open problem + no open boundary in the STEP (synthetic rectangle + disk). In other common setups the factor is ignored with no warning, and identical factor values produce identical .msh files.
This caused confusion when trying to scale the “inner region” for a realistic unshielded bundle.

Expected behavior (user expectation)

  • Changing innerRegionBoxScalingFactor (e.g. 1.1 vs 1.3) should change the near-region vacuum construction and/or mesh near the bundle, or
  • Tulip should warn that the option has no effect for the current geometry/classification.

Actual behavior

  • Factor is only used in ShapesClassification::buildOpenVacuumDomain() when isOpenBoundaryDefined() is false, inside:
    nearBoxSize = bbMaxLen * innerRegionBoxScalingFactor_
  • If isOpenCase == false, buildClosedVacuumDomain() runs → factor unused.
  • If isOpenCase == true but OpenBoundary_* exists in STEP (mapped via open layer), vacuum is cut(openVacuum, nonVacuumSurfaces) → factor unused.
    No log message when the user sets the factor in an ignored path.

Code references

cases_for_study.zip

  • AdapterOptions.h — documents factor for “bundles with no open boundary defined” (easy to miss other cases).
  • ShapesClassification::buildVacuumDomain() — open vs closed branch.
  • ShapesClassification::buildOpenVacuumDomain() — lines ~460–476 (STEP open) vs ~477–535 (synthetic, factor used).

Reproduction

A) Closed classification (factor sweep has no effect)

  1. Use a bundle STEP without OpenBoundary_0 / inner_region (e.g. trimmed no_open_no_inner).
  2. Same layers, only change innerRegionBoxScalingFactor: 1.1, 1.2, 1.3.
  3. Re-run adapter + solver (fresh .msh each time).
    Result: identical .msh size/hash; identical FEM+MP. Classification uses buildClosedVacuumDomain().

B) Paper-like open boundary in STEP (factor in JSON has no effect)

  1. Use inner_region STEP with OpenBoundary_0 and open layer in JSON (Tabla II case).
  2. Add "innerRegionBoxScalingFactor": 1.2 in adapterOptions vs default 1.3.
    Result: mesh/solution unchanged vs base; vacuum built from CAD open volume, not synthetic near box.

Impact

  • Users may run parameter sweeps that do nothing.
  • Name collides with STEP layer inner_region and output field innerRegionBox, which come from other code paths.
  • Post-processing innerRegionBox in .tulip.out.json is derived from the mesh (Model::getInnerRegionBoundingBox), not from innerRegionBoxScalingFactor.

Suggested improvements

  1. Warn (or error in strict mode) when innerRegionBoxScalingFactor is set but the active branch does not use it; log: isOpenCase, isOpenBoundaryDefined(), branch taken.
  2. Document a small decision table in docs/tulip_data_format.md under adapterOptions.
  3. Optional: clarify naming (syntheticNearRegionScale?) or extend behavior if scaling CAD inner_region / near mesh is intended (separate design discussion).

Environment

  • Tulip adapter + driver, realistic multi-wire bundle with dielectrics (31 conductors). See files attached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions