Skip to content

Serialize element-level rho in quad/triangle elements (fixes garbage mass on DB restore / MPI) - #31

Open
nmorabowen wants to merge 1 commit into
jaabell:ladruñofrom
nmorabowen:up/02-quad-tri-rho-serialization
Open

Serialize element-level rho in quad/triangle elements (fixes garbage mass on DB restore / MPI)#31
nmorabowen wants to merge 1 commit into
jaabell:ladruñofrom
nmorabowen:up/02-quad-tri-rho-serialization

Conversation

@nmorabowen

Copy link
Copy Markdown

FourNodeQuad, FourNodeQuad3d, EightNodeQuad, NineNodeQuad, SixNodeTri and Tri31 pick their mass density as "if element-level rho is nonzero use it, else fall back to the material density." But sendSelf/recvSelf never packed rho into the data Vector, and every blank (broker) constructor except FourNodeQuad3d left rho uninitialized.

So after a database restore or an OpenSeesMP send, rho held garbage heap data. A nonzero garbage value then hijacked the mass matrix → non-deterministic, often indefinite M (negative generalized eigenvalues) and diverging transient restarts.

Fix (additive)

  • Append rho to each element's send/recv data Vector (+1 slot).
  • Initialize rho(0.0) in the blank constructors that lacked it.

Committed nodal displacements round-trip fine, so a plain nodeDisp restore test does not expose this — it only shows once the restored model integrates in time.

Wire-format note

The send/recv Vector grows by one slot for these element types, so a model saved/sent by this build is not binary-compatible with a stock-built peer for those elements. This only matters for mixed-build database-restore / MPI runs.

Authors: Nicolas Mora Bowen, Patricio Palacios, José A. Abell

FourNodeQuad, FourNodeQuad3d, EightNodeQuad, NineNodeQuad, SixNodeTri and
Tri31 select their mass density as: if the element-level rho is nonzero use
it, otherwise fall back to the material density. But sendSelf/recvSelf never
packed rho into the data Vector, and every blank (broker) constructor except
FourNodeQuad3d left rho uninitialized. So after a database restore or an
OpenSeesMP send, rho held garbage heap data: a nonzero garbage value then
hijacked the mass matrix, giving a non-deterministic, often indefinite M
(negative generalized eigenvalues) and diverging transient restarts.

Fix (additive): append rho to each element's send/recv data Vector (+1 slot)
and initialize rho(0.0) in the blank constructors that lacked it. Committed
nodal displacements round-trip unchanged, so a plain nodeDisp restore test
did not expose this; it only shows once the restored model integrates in time.

Wire-format note: the send/recv Vector grows by one slot, so a model saved or
sent by this build is not binary-compatible with a stock-built peer for these
element types. This matters only for mixed-build database restore / MPI runs.

Co-authored-by: Patricio Palacios <pxpalacios@miuandes.cl>
Co-authored-by: Jose A. Abell <jaabell@miuandes.cl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant