math
¶
extract_coeff(expr, vec)
¶
Extract the coefficient of vec from expr.
Dispatches to extract_from_scalar / extract_from_vector / extract_from_matrix based on expr.type.
Source code in geomech/core/math/extract.py
extract_from_matrix(expr, vec)
¶
Extract the coefficient of vec from a matrix expression.
Partial — only limited cases supported.
Source code in geomech/core/math/extract.py
extract_from_scalar(expr, vec)
¶
Extract the coefficient of vec from a scalar expression.
Source code in geomech/core/math/extract.py
extract_from_vector(expr, vec)
¶
Extract the coefficient of vec from a vector expression.
Source code in geomech/core/math/extract.py
integrate_by_parts(expr, targets)
¶
Expand, simplify, then apply collect + IBP for each target.
targets is a list of variation vector time-derivatives (e.g. dot_eta) that should be integrated by parts to remove the time derivative.