Skip to content

Feature/serve condense - #145

Open
chemiskyy wants to merge 3 commits into
masterfrom
feature/serve-condense
Open

chemiskyy wants to merge 3 commits into
masterfrom
feature/serve-condense

Conversation

@chemiskyy

Copy link
Copy Markdown
Member

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

  • Replaced all references to condense='approximate'/'exact' with condense='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

  • Updated the logic in the UMAT Python wrapper and C++ implementation to use the new '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

  • Added a new function condensation_serves to 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

  • Updated includes to add <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.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant