Skip to content

First-class BC object for nesting/DD layer (#53) #67

Description

@awickert

Context

The domain-decomposition / nesting layer (#53) needs to read transmission BCs off one subdomain's edge and write them as prescribed BCs on the adjacent subdomain's edge. Currently boundary-condition values live in ad-hoc instance attributes (_bc_west_values, _bc_west_norm, etc.) with no clean external interface.

Scope

Design and implement a lightweight BC object (or structured dict) that:

  • Is addressable per-edge and per-condition: flex.bc["west"]["moment"], flex.bc["west"]["displacement"], etc.
  • Has getters and setters so the nesting layer can write: child.bc["west"] = parent.bc["east"].as_transmission().
  • Converts cleanly to/from the existing internal attributes (_bc_west_values, _bc_west_norm) so no existing code paths break.
  • Exposes the resolved (post-normalize) canonical string alongside any prescribed values, so the coefficient-matrix path continues unchanged.

Design note

The object does not need to be a full class hierarchy. A thin wrapper around the existing dicts — with a stable .as_transmission() method that flips sign conventions where needed (e.g. east shear transmitted as west shear with opposite sign) — may be sufficient.

Acceptance criteria

  • flex.bc["west"]["moment"] returns the prescribed moment value (or None for homogeneous BCs).
  • Writing child.bc["west"] = parent.bc["east"].as_transmission() correctly wires the child subdomain.
  • No change to string-BC behaviour; all existing tests pass.
  • At least one integration test showing a two-subdomain nesting scenario matches the single-domain solution.

Related

Split from #52. Depends on: scalar dict BCs (done, 79e2c0c). Used by: #53.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions