Skip to content

STATEV: stress-like tensor history without the engineering-shear factor (#63) - #91

Open
petlenz wants to merge 1 commit into
mainfrom
fix/statev-stress-like-history
Open

petlenz wants to merge 1 commit into
mainfrom
fix/statev-stress-like-history

Conversation

@petlenz

@petlenz petlenz commented Oct 15, 2026

Copy link
Copy Markdown
Member

What

  • core/stress_like.h: stress_like<T> is a tmech::tensor<T, 3, 2> that marks a history property as stress-like. It inherits the tensor's constructors and assignment, and an is_tensor_type specialization lets it take part in tmech expressions.
  • A material declares the kind with the type: add_history_output<stress_like<value_type>>("back_stress").
  • statev_map stores it with stress_to_buffer / stress_from_buffer, so the host sees σ₁₂ rather than 2σ₁₂. Plain tensor2 history keeps the strain convention (default, unchanged), and describe() marks the entry [stress].

No files of the open PRs are touched (material_base.h and property_traits stay as they are); the kinematic-hardening model of #20/#55 can use the type for its back stress.

Tests

StatevMap.StressLikeHistoryKeepsItsShearComponentsForTheHost in test_material_point_evaluator.cpp, using a probe material with a stress-like and a strain-like history. It checks:

  • the host slot σ₁₂ = 0.1 next to γ₁₂ = 0.2;
  • the round trip of both;
  • the [stress] marker.

It failed to compile before (no stress_like). GCC 14 Debug with fetched dependencies: 622/622.

Closes #63

A material declares a stress-like rank-2 history by its type,
stress_like<T> (a tmech tensor usable in expressions); statev_map stores it
with stress_to_buffer/stress_from_buffer, so the host sees sigma_12, not
2 sigma_12. Plain tensor2 history keeps the strain convention. describe()
marks the entry [stress].

Closes #63
@petlenz

petlenz commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

Review findings (design, tmech expressions instead of component loops, modern C++, comments, tests, correctness). Severity: must = wrong result, hang, build break or unreachable feature; should = design, duplication, accuracy; nit = style.

STATEV stress-like — needs changes

  • [must] statev_map.h:249-286 hist_stress2 is a verbatim copy of hist_tensor2 → one add_tensor2_entry<bool ShearStrain> using tmech::abq_std<3, ShearStrain> (exactly how tensor_conversion.h:180/197 distinguishes them).
  • [must] file docblock :40-44 still says tensor history is strain-like globally.
  • [should] unsupported-type message omits stress_like; stress_like<T, Dim> has a Dim that statev cannot honour; test lives in the evaluator test file instead of test_statev_map.cpp; stress_like by inheritance bypasses tmech's exact-type array copy (note it, or use a trait).
  • [nit] nested ternary at :169.

Conflicts and landing order (open PRs on main)

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.

STATEV layout applies the engineering-shear factor to every symmetric tensor, which mis-scales stress-like history

1 participant