matto.state#
The nonlinear state problem: displacement space, boundary conditions, load constants, the free-energy density supplied by the material file, the residual built from it, and the load-stepped Newton solve. No material-specific or optimization-specific code is in this module.
- matto.state.set_constant(constant, value, scale=1.0)[source]#
Write scale * value into a dolfinx Constant, shape-checked.
- class matto.state.StateProblem(problem, design_variables)[source]#
Bases:
objectQuasi-static equilibrium of a stimulus-responsive solid on a mesh.
Built once from the input-file dictionary and the DesignVariable objects. solve(load_case, load_steps) then finds the equilibrium displacement for one load case; the sensitivity code reads the forms.
- u_field, lambda_field displacement and adjoint fields on V
- test_function the test function the forms are built on
- dx, ds measures with the requested quadrature
- body_force, traction_constants, stimuli
the load Constants solve() ramps
- W, F, P energy density, deformation gradient, PK1
- residual_form L - a, the weak equilibrium statement
- internal_force_form d
- Type:
W dx
- external_work_form loads dotted with u, for work objectives
- solver_options resolved {state, adjoint, filter} blocks
- solve(load_case, load_steps)[source]#
Find the equilibrium displacement for one load case.
Starts from the undeformed state and ramps the body force, tractions and stimuli of the load case together from zero in load_steps equal increments, Newton-solving at each. Loads the case does not mention are held at zero. Leaves u_field at the converged state and the load Constants at their full values.
Returns the maximum absolute displacement over all ranks.