Skip to content

Prescribed (non-zero) displacements for shell models #388

Description

@mkofler96

Problem

The pure-shell solve path rejects prescribed non-zero displacements: shellDirichlet in web/src/workers/solver.worker.ts throws "prescribed (non-zero) displacements are not supported for shell models yet". This is a deliberate loud error rather than a silent pin-to-zero (the issue #216 failure mode), but it is a real capability gap versus the solid path, which supports inhomogeneous essential BCs via prescribed_dofs (solve_mfem.cpp::add_prescribed_dofs).

The gap is in the engine: solve_shell (engine/cpp/solve_shell.cpp) accepts only fixed_vertices / fixed_dofs / point_loads — there is no inhomogeneous essential BC input, and shell_core's CG solve eliminates fixed DOFs by zeroing rows/columns, which only expresses u = 0.

Fix

  1. engine/cpp/shell_core.cpp: support prescribed DOF values — the standard lifting approach: move K·u_prescribed to the right-hand side, then constrain those DOFs like fixed ones. Unit-test natively in engine/tests/shell_validation.cpp (e.g. a plate with a prescribed edge translation reproduces the equivalent force-loaded solution).
  2. engine/cpp/solve_shell.cpp: accept a prescribed_dofs array {vertex, dof, value} mirroring the solid solver's contract, with the same out-of-range validation (bc_validation.h, solve_shell.cpp silently drops out-of-range vertex/DOF indices in fixed DOFs, fixed vertices, and point loads (shell-solve equivalent of #362/#367) #379/Reject out-of-range BC/load indices loudly (issue #362) #380).
  3. web/src/workers/solver.worker.ts: replace the throw in shellDirichlet with grouping into prescribed_dofs, mirroring groupDirichlet's split for the solid path.

Existing coverage to mirror: examples/validation/prescribed-displacement.test.mjs exercises the solid contract end-to-end.

Related

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions