Repository navigation
Conversation
Introduce sim.condensation_serves to query whether a material law's condensed state is validated. Declares the function in the header, implements the decision logic in umat.cpp (using predefined rate/total/exact law sets, kinematic form and condense checks, and invalid-state handling), and exposes it to Python via pybind11. Update docs to document the new API. Extend and adapt unit tests to cover new law fixtures, TOTAL_LAWS/EXACT_LAWS/HYPER entries, and test cases that verify true/false responses and error handling for invalid inputs and unknown options.
Simplify condensation_serves API by removing the redundant "condense" argument (approximate vs exact serve the same set of laws). Updated C++ header and implementation, and adjusted the Python binding documentation accordingly. Tests updated to reflect this: EXACT_LAWS now equals TOTAL_LAWS, small tolerance and finite-difference step changes to account for near-incompressible laws, removed invalid condense-related checks, and added a new test (test_small_strain_exact_is_approximate) that verifies condense='exact' and 'approximate' produce identical results at small strain.
Replace the condense modes 'approximate'/'exact' with clearer 'spatial_face'/'material_face' across docs, C++ sources, Python bindings and tests. Update documentation to explain which face is freed for plates/shells, beams and trusses and note performance/requirements (F0/F1 and material tangent) for the material_face option. Rename/internalize helper condense_exact -> condense_material_face and adjust conditionals, error messages and behavior accordingly; change the Python API defaults to 'spatial_face'. Update unit tests and examples to use the new names and adapt assertions about which conditions coincide or differ.
This branch has not been deployed
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.
This pull request updates the terminology and documentation for the stress condensation options in the Python UMAT interface and underlying implementation. The previous terms
'approximate'and'exact'have been replaced with'spatial_face'and'material_face'to more accurately reflect the physical meaning of the options. Related documentation, code comments, and logic have been updated accordingly. Additionally, a new function is introduced to check if a condensed point is validated for a given law.Key changes:
Terminology and Documentation Updates
condense='approximate'/'exact'withcondense='spatial_face'/'material_face'in user-facing documentation, docstrings, and code comments, providing more detailed explanations of the physical meaning and use cases for each option. [1] [2] [3] [4] [5]Code Logic and API Changes
'spatial_face'and'material_face'options, including renaming helper functions and error messages to match the new terminology. [1] [2] [3] [4] [5]New Functionality
condensation_servesto check if a condensed stress state is validated for a given material law, number of directions, and kinematic form. This helps finite element codes determine if a condensed point is supported. [1] [2]Minor Technical Updates
<set>for the new function.These changes improve clarity for users and developers, ensure consistency in terminology, and provide a more robust API for checking condensation support.