autopdex.solution_structures.precompile

autopdex.solution_structures.precompile(dofs0, settings, static_settings, max_diff_order=1)[source]

Manually precompiles solution structures by evaluating and storing shape functions, boundary conditions, and projection operators for different integration points and domains.

Parameters:
  • dofs0 (jnp.ndarray) – Initial degrees of freedom.

  • settings (dict) – Settings for the computation.

  • static_settings (dict) – Static settings for the computation.

  • max_diff_order (int, optional) – Maximum order of derivatives to precompute. Default is 1.

Returns:

Updated settings with precomputed shape functions, boundary conditions, and projections.

Return type:

dict

Notes

This function loops over all sets of integration points or domains and compiles the necessary components for different solution structures. The supported solution structures include:

  • ‘first order set’: Compiles shape functions, boundary conditions, and projection operators with first derivatives.

  • ‘second order set’: Compiles shape functions, boundary conditions, and projection operators with second derivatives.

  • ‘dirichlet’: Compiles shape functions, boundary conditions, and projection operators with second derivatives.

  • ‘nodal imposition’ or ‘off’: Compiles shape functions with derivatives up to max_diff_order.

The precomputed components are stored in the settings dictionary under ‘compiled shape functions’, ‘compiled bc’, and ‘compiled projection’.

Warning: The compiled shape function mode does currently not support implicit differentiation, since only the derivatives with respect to the coordinates (and not other quantities in the settings) are set.