Repository navigation
Host-neutral errors.h and external_state_source.h out of umat/ (#212) - #222
Merged
Merged
Conversation
fatal_error and cutback_error move to core/errors.h in numsim::materials; umat/ keeps them as using-declarations next to the Abaqus fatal path. The external sources move to driver/, with a forwarding header at the old path. The strain source binds tensors only; the UMAT evaluator converts its Voigt buffers.
This was referenced Oct 28, 2026
…he forwarder's transitive include A TU that includes only core/errors.h and driver/external_state_source.h checks that umat/errors.h stays out and that the guards are NUMSIM_MATERIALS_*. The forwarder is compiled and again includes umat/tensor_conversion.h. The tensor bind of the strain source gets a positive requires check.
Member
Author
|
Review findings, addressed in b20e77d:
Gate: GCC 14 -O1, build 0 warnings, 1446/1446 tests pass. |
This was referenced Oct 29, 2026
…headers # Conflicts: # tests/test_j2_kinematic_plasticity.cpp
The return-map and convergence failures from #231 included umat/errors.h and threw umat::cutback_error; the same type now comes from core/errors.h, so no material header pulls in umat/. test_host_neutral_includes covers the six headers.
Member
Author
|
Merged main (#231) into this branch. The only conflict was the include block of Follow-up commit bc4cac5: the six materials #231 changed (J2, J2-RK, J2 kinematic, Drucker-Prager, neo_hooke, mean-field kernels) now include Gate: GCC 14 -O1, BUILD=0 TEST=0, 0 warnings, 1460 tests. |
This was referenced Oct 29, 2026
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.
Part of #212 (does not close it:
driver/material_point.hstill pullsumat/in, see below). Part of #221: the engine will throwcutback_erroritself for a fixed point that does not converge (#214), so the error types cannot live underumat/.What
core/errors.h(new):fatal_errorandcutback_errorinnumsim::materials. The header comment now describes any host; Abaqus is one example. It sits incore/, notdriver/, because the property engine is its next user.umat/errors.h: includescore/errors.hand keepsumat::fatal_error/umat::cutback_erroras using-declarations, so every UMAT catch site and downstream user keeps compiling. The Abaqus fatal path (xit_,set_fatal_handler,invoke_fatal) stays here because it is UMAT-specific.driver/external_state_source.h(moved fromumat/):external_strain_source,external_deformation_gradient_source,external_scalar_source.umat/external_state_source.hremains as a forwarding header, because numsim-fft-homogenization includes it.external_strain_source::binddecoded the UMAT's canonical Voigt order and pulledumat/tensor_conversion.hinto the source. The evaluator now converts withumat::strain_from_bufferand binds tensors. The 9-slot row-major overload of the deformation-gradient source involves no Voigt convention, so it stays.driver/throwsfatal_error/cutback_errorfromnumsim::materialsand includes neitherumat/errors.hnorumat/external_state_source.h.Decided here
umat/json_model.hstays inumat/. It includesumat_interface.hand binds the deck's*USER MATERIALconstants to parameters.report/case_runner.huses only its builder; separating that builder from the constants binding is a separate change, if it is ever needed.driver/material_point.hstill includesumat/statev_map.h, which includesumat/errors.h(and its weakxit_declaration) andumat/tensor_conversion.h. Somaterial_point.his not yet free ofumat/;core/errors.handdriver/external_state_source.hare. The remaining step is to movestatev_mapout ofumat/(noted on Move the host-neutral headers errors.h and external_state_source.h out of umat/ #212, which stays open).Tests
test_host_neutral_headers, written first (red:core/errors.hmissing):umat::fatal_error/umat::cutback_errorare the same types as thenumsim::materialsones;external_strain_sourcehas no raw-bufferbind(arequirescheck);std::runtime_errors;bind(tensor2, tensor2)of the strain source stays callable (positiverequirescheck);umat/external_state_source.his compiled in this test.test_host_neutral_includesincludes onlycore/errors.handdriver/external_state_source.hand#errors ifUMAT_ERRORS_His defined or the guards are notNUMSIM_MATERIALS_CORE_ERRORS_H/NUMSIM_MATERIALS_DRIVER_EXTERNAL_STATE_SOURCE_H.test_umat_forwarder_includesincludes only the forwarder and#errors unlessumat/tensor_conversion.hcame with it.test_external_state_source's buffer case now converts throughumat::strain_from_bufferand checks the same values.Gate
GCC 14, reports on,
-DNUMSIM_PREFER_SIBLINGS=OFF: -O1 build 0 warnings, 1446/1446 tests pass.