Repository navigation
Conversation
… defects New: - gsMaterialMatrixTFTSplit: tension-field split with closed-form wrinkle direction, eta-regularisation, Exact mode (exact wrinkled-state solve, symmetric tangent, linear=false only), Midsurface option and fallback counters; shared helpers in gismo::detail_tftsplit (gsMaterialMatrixTFT.h). - MaterialOutput WrinkleDir / WrinkleIntensity / GammaHat, stress_type 100-104, eval3D_pstressDir for TFT and Split. - Tests: gsMaterialMatrixLinear_test, gsMaterialMatrixTFTSplit_test, gsMaterialMatrixWrinkleOutputs_test; extended Nonlinear and TFT suites. - Doxygen and README for the above. Fixes (each with a regression test that failed before the fix): - dCijkl_impl passed tensor g12 to Cfun, which takes Voigt 2*g12. - TFT hyperelastic tangent was returned transposed; linear=true TFT tangent had a sign error in df/dE. - TFT outputs used the unmodified stress. - 2D _getMetricUndeformed_impl stored the covariant metric in m_Acon_ori. - Compressible Cauchy stress returned zeros; now S/J. - hasUndeformed() tested the deformed geometry. - eval3D_pstressDir used a wrong frame/layout; now [d_min | d_max | N]. - _evalPStress / _evalPStrain on degenerate frames (G1 x G2 = 0): finite in 2D (N = e3), explicit NaN in 3D; _evalPStrain no longer overwrites S(2,2) and the normal with the third eigenpair. Non-degenerate results are unchanged. Full unit-test run: 474 / 474 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015qurMNbDqCjWHyF4r7nicQ
…rames - _tensionField returns taut (1) when the unmodified principal strains (strain criterion), stresses (stress criterion) or both (mixed) are not finite, as gsMaterialMatrixTFTSplit already does. A NaN deformed-to-reference metric ratio (inverted element) no longer reaches the theta root finders; the NaN still reaches the stress and the residual. - detail_tftsplit::principalStressFrame: degenerate-frame guard of _evalPStress (10 eps test; planar basis -> N = e3, otherwise NaN). - MaterialOutput legend: 1 taut, 0 wrinkled, -1 slack. Finite, non-degenerate results are unchanged. gsMaterialMatrix suites pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in theta check
For a linear base law, the decorator fed the theta search a mid-surface stress N with a strain E at height z, while
the classification used the z-dependent stress. On curved states every root was rejected ("Everything failed??"),
theta fell back to 0 and Newton did not converge (hanging blanket, SvK airbag).
For linear == true the classification, theta search, gamma, modified stress, tangent and strain outputs are now all
built from the one mid-surface pair (N = C E_mid, E_mid), with the base law's TensionField criterion and the same
tolerances as gsMaterialMatrixTFTSplit. Results match Split with eta = 0: flat sheet and 5x5 blanket identical,
SvK airbag uz_M 0.208223846446 for both at load 1 (previously TFT stalled at 0.79); the 25x25 blanket reaches load 1.
linear == false is unchanged apart from the shear fix below.
_check_theta_full used 2 m1 m2 on the engineering shear strain E(2), counting the shear twice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lit (eta 0) Pins the behaviour of 6c214d4. A flat reference square is deformed into a curved surface (quadratic bump) and evaluated with SvK wrapped by gsMaterialMatrixTFT<3,real_t,true> and by gsMaterialMatrixTFTSplit with eta = 0, at wrinkled, taut and slack states. Asserted: TFT strain, stress and principal strain do not vary through the thickness (with a control that the wrapped law's strain does vary by > 1e-4 relative); strain and stress equal Split to 1e-12 relative; single-point and single-row calls agree with the block call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gsMaterialMatrixTFT gains the options Eta (0..1, default 0) and EtaTangentOnly (default false). With Eta > 0 the wrinkled/slack stress and tangent are blended with the base law as in Zhang & Kiendl (Eqs. 35/40): S_eff = (1-eta) S' + eta S, C_eff = (1-eta) J + eta C; the slack factor is SlackMultiplier if > 0, else Eta. EtaTangentOnly keeps the pure tension-field stress and blends only the tangent. Eta = 0 runs the original statements unchanged. Tests: TFT(Eta) equals TFTSplit(Eta) on wrinkled/taut/slack points, tangent-only leaves stress and strain unchanged, FD check of the blended tangent at Eta 0.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin eval3D_pstrain with Eta > 0 at wrinkled, taut and slack points (both variants) and the slack-factor rule SlackMultiplier > 0 over Eta for stress, tangent, strain and pstrain against TFTSplit. Keep the deformed geometry of the FD tangent test alive for the whole evaluation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- bracketed Newton-bisection scalar pass, taut check at gamma = 0 - tolerance relative to the relaxed stress with a round-off floor; options ExactTol, ExactStagTol, ExactMaxIt - acceptance: minimum test first, taut/slack reclassification inside a band, otherwise saddle or wrong branch (linearised fallback) - separate counters and result flags (nonconverged, saddle, wrong branch, stagnated, taut, slack, skipped, 2x2); legacy sums kept - docs: Pipkin relaxation and KKT partition; truncated TFT non-variational - tests: exact-solve hardening; homogeneous wrinkled patch test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d exact solve - gsMaterialMatrixBase: eval3D_energy / eval3D_energy_C virtuals, MaterialOutput::Energy through gsMaterialMatrixEval. - W for gsMaterialMatrixLinear and every gsMaterialMatrixNonlinear variant (NH, MR, NH_ext, OG; compressible/incompressible; all implementations). - gsMaterialMatrixTFTSplit: relaxed energy W_eff (NaN where no potential exists) and a globalised minimisation of Phi(v) = W(E + v⊗v) for the Exact mode, option ExactLocalSolve (0 legacy, 1 minimise where the legacy solve hands off (default), 2 minimise only). - Tests: S = dW/dE by finite differences for every variant, W(0) = 0, W_eff gradient, KKT and brute-force global-minimum checks on anisotropic inputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecks to tests - gsMaterialMatrixTFT::eval3D_energy: wrapped W where taut, slack factor times W where slack (same factor as the stress), NaN where wrinkled (no potential). - gsMaterialMatrixComposite::eval3D_energy: thickness-integrated energy per unit reference area, 1/2 e.A.e + e.B.k + 1/2 k.D.k, from the class's own A, B, D. - gsMaterialMatrixBase: energy doc lists the new implementations. - Tests: TFT energy (taut/slack/wrinkled/mixed/FD/shape, both variants); new gsMaterialMatrixComposite_test; 3D, large-strain and VectorN energy FD for Nonlinear and Linear; TFTSplit class-level W_eff FD, NaN case and ExactLocalSolve modes 1/2/3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…etch flat-state test - gsMaterialMatrixNonlinear: remove the unreachable Material::SvK path (getMaterialMatrix maps SvK to gsMaterialMatrixLinear); static_assert against it; fix swapped compressible/incompressible doc labels. - gsMaterialMatrixTFT / TFTSplit: SlackMultiplier >= 0 (both) and Eta in [0,1] (TFTSplit) are checked at the first evaluation; option docs state the ranges. - gsMaterialMatrixBaseDim::_evalStretch: the flat-state shortcut tested the trace of the Cartesian 2x2 block and fired for any state with l1^2 + l2^2 = 2; it now tests B against the tangent-plane projector (frame-invariant). - TFTSplit docs: start rules, polish/stall/budget conditions of the exact solve. - Tests for the option checks and the stretch shortcut. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hverhelst
commented
Nov 18, 2026
| > | ||
| class gsMaterialMatrixNonlinear : public gsMaterialMatrixBaseDim<dim,T> | ||
| { | ||
| static_assert(mat != Material::SvK, "gsMaterialMatrixNonlinear does not implement Material::SvK; use gsMaterialMatrixLinear (getMaterialMatrix maps Material::SvK to it)"); |
Member
Author
There was a problem hiding this comment.
Let s just remove SvK enum (then it fails loudly during compilation)
…-patch oracle - Three more places stored or read the covariant metric/basis where the contravariant one belongs: the dim-2 deformed Acon_def read and the dim-3 m_acon_def / m_acon_ori stores. Nothing reads these values today, so no result changes. - gsMaterialMatrixLinear_test: the 2D SvK tensor on a sheared planar patch against the closed-form plane-stress tensor in contravariant components, built from the patch Jacobian alone, plus a unit-square control. On main (covariant metric used) the skewed check fails with relative error 4.78. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
…espace inside the suite Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gsMaterialMatrixTFTSplit: the split tension-field model of Zhang & Kiendl, with an exact local solve (ExactLocalSolve0/1/2) and a relaxed energy W_eff.gsMaterialMatrixTFT(truncated TFT):Etaregularisation, on stress and tangent or tangent only;eval3D_energy/eval3D_energy_C: Linear, Nonlinear (exceptMaterial::SvK), TFTSplit, truncated TFT (NaN where wrinkled) and Composite (per unit area).The wrinkling drivers that use this are in gismo/gsStructuralAnalysis (branch
tft-membranes).Update: contravariant metric in gsMaterialMatrixBaseDim
FIXED: gsMaterialMatrixBaseDim, three more places where contravariant data was read from or stored as the covariant metric/basis (dim-2 deformed read, dim-3
m_acon_ori/m_acon_defstores); no reader today, no result changesNEW: gsMaterialMatrixLinear_test: 2D SvK tensor on a sheared planar patch against the closed-form plane-stress tensor in contravariant components, plus a unit-square control
Behaviour change: 2D SvK on non-orthonormal planar patches
This branch reads the 2D undeformed contravariant metric from the contravariant storage. On
main, that read tookthe covariant metric. As a result,
gsMaterialMatrixLinear<2>, andgetMaterialMatrix<2>with Material = SvK, givedifferent results on every planar patch whose metric is not the identity, for example a scaled or sheared plate.
Example:
example_shell2Dwith defaults (a 2 × 1 plate) gives a minimum deformation of −0.0633172, wheremaingives−0.00244949. The new value equals the result of the same case with
--composite, a material that never used thatmember.
The new oracle test fails on
mainwith relative error 4.78 and passes on this branch. Full suite on this branch:582 tests pass (measured before 8396fc9).
Code in other modules that runs 2D SvK membranes on non-unit planar patches will see changed results. This was not
checked: only gsKLShell was built.
Interplay with #37
#37 (gsMaterialMatrixComposite fixes) also adds
unittests/gsMaterialMatrixComposite_test.cpp, so merging the twogives one add/add conflict. Resolve it by keeping both halves in one suite. With both merged, the full suite passes:
585 tests. Measured before 8396fc9, which rewrote
unittests/gsMaterialMatrixComposite_test.cppand touchedgsMaterialMatrixComposite.h: the conflict resolution and the count need re-checking. After the merge, reword theeval3D_energydoxygen remark "dW/dε equals VectorN only for B = 0": with #37,VectorN includes B.
Update: review fixes (8396fc9, 503a41a)
IMPROVED: gsMaterialMatrixTFTSplit evaluation batches the wrapped law: two calls (
eval3D_vector,eval3D_matrix) over all points and fibres, instead of one call per point. Single-point calls remain only fordmatrixat wrinkled points,energy_Cand the exact-mode providers. The class doxygen states the call count. The speed-up was not timed.IMPROVED: TFTSplit checks. The public
wrinkle()keeps all of its option and provider checks; its contract is unchanged. Theeval3D_*path calls an unchecked core instead, and theExact*option relation is validated once per evaluation, inwrinkleOptions().API: new protected member
gsMaterialMatrixTFTSplit::_wrinkleCore<bool Checked>, which subclasses can see. Insideeval3D_*, the per-point invariants (provider present, sizes) are now asserts only, so release builds do not check them.FIXED: the central-difference step in the
eval3D_*_Cpath of TFTSplit is now relative to the metric scale, h = 1e-5·max|C_ij|, instead of a fixed 1e-5. Results change only for metrics far from unit scale.FIXED: doxygen comments of
MaterialOutput::Thetaand::Gamma, which were copies of theTensionFieldcomment.IMPROVED: doxygen
\ref→@ref; file header forgsMaterialMatrixTFTSplit_.cpp.IMPROVED: tests. Every test the PR adds states its property, oracle and the origin of its tolerance. The exact float comparisons are commented as exact by construction; no CHECK changed. Helpers now sit inside their suites, in an anonymous namespace (503a41a for the wrinkle-assembler suite), and the
gsInfostream state is restored after the wrinkle-assembler tests.Tests: the full suite passed 582/582 on the working tree before the last comment-only edits and helper moves. After those, the Nonlinear, TFT and TFTSplit suites pass (162 tests). After 503a41a, the wrinkle-assembler suite passes (4 tests). The full suite has not been re-run on 8396fc9 or 503a41a.
🤖 Generated with Claude Code