Repository navigation
Factorized FEM, per-point quadrature data, and variable-length summations (1.1.1) - #4
Open
w1th0utnam3 wants to merge 7 commits into
Open
w1th0utnam3 wants to merge 7 commits into
w1th0utnam3 wants to merge 7 commits into
Conversation
Advanced FEM and integration: - Add factorized FEM potentials (add_potential_fem, FemEnergySplit) with exact derivatives for node-local position maps, including dedicated scalar codegen (compile_factorized*) and solver paths. - Add per-point quadrature data (make_quadrature_*) and variable-length summations per element (make_summation(offsets)). - Add symbolic substitution for scalars, vectors, and matrices. - Only count branches reachable from requested outputs in Sequence, so unused branches left by substitution don't use up the branch limit. - Keep compiled artifacts of factorized and standard potentials separate (checksum and artifact suffixes). - Add fem_shape_gradients and fem_deformation_gradient_B. - Rubber extrusion example: select shared-rule, indexed-quadrature, or factorized FEM definitions via RubberExtrusionMode. Solver: - Add per-potential energy and gradient breakdowns (evaluate_P_components, evaluate_P__dP_du_components) and expose FirstOrderOptimizer::get_compiled(). - Direct LLT: build the CSR directly from the blocked Hessian, reuse storage and symbolic analysis while the block pattern is unchanged, and refresh values in parallel. - Memoize Expressions::eval over shared subexpressions. Build: - SYMX_ENABLE_MKL is now AUTO/ON/OFF (default AUTO) with discovery of standard and versioned oneAPI installations. - Add SYMX_USE_SYSTEM_FMT (default OFF); prefer the bundled fmt so that unrelated installations (e.g. Conda) are not linked. - Use CMAKE_DL_LIBS and read the Eigen version from Eigen/Version. Docs and tests: - Add the "Advanced FEM and Integration" page and cross-links, the energy breakdown section, and updated MKL/fmt setup instructions. - Add tests for substitution, quadrature data, dynamic summation, factorized FEM, energy breakdowns, and direct LLT pattern reuse. - Add the gallery generation script and captions, plus a Sphinx helper script.
w1th0utnam3
force-pushed
the
advanced-fem
branch
4 times, most recently
from
November 2, 2026 20:49
69df6e5 to
68d418b
Compare
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.
Features
add_potential_fem,FemEnergySplit): the material density is differentiated with respect to an abstractF, and the nodal gradient and Hessian come from compact loop kernels. The results matchadd_potentialup to round-off, with much smaller generated code and much faster compilation for high-order elements.B(n×r, r = 1/2/3) for lines, membranes, and shells.fem_shape_gradients,fem_deformation_gradient_B.make_quadrature_scalar/vector/matrix()bind element-specific data to each integration point.make_summation(offsets)/add_for_each(offsets, …)allow a different number of points per element (scalar kernels only).substitute.h).evaluate_P_components(),evaluate_P__dP_du_components(), andFirstOrderOptimizer::get_compiled().Performance and fixes
Expressions::evalmemoizes shared subexpressions (previously exponential on shared graphs).Build
SYMX_ENABLE_MKLis nowAUTO/ON/OFF(defaultAUTO, previouslyOFF), with automatic discovery of oneAPI installations.SYMX_USE_SYSTEM_FMT(defaultOFF), so an installed fmt is no longer used automatically.base.hand falls back tocore.h.CMAKE_DL_LIBSfor platform loader libraries; Eigen version read fromEigen/Version.Docs, examples, tests
RubberExtrusionModeselects shared-rule, indexed-quadrature, or factorized FEM definitions.test_factorized_fem,test_quadrature_data,test_dynamic_summation,test_substitute, plus energy-breakdown and direct-LLT pattern-reuse tests.