autopdex.models.central_differences
- autopdex.models.central_differences(density_fun, damping)[source]
Constructs weak form contributions for acceleration (and optional damping) term based on central differences.
- Parameters:
density_fun (callable) – Function to compute the density coefficient given spatial coordinates and settings.
damping (bool) – Whether to turn on damping. Damping requires settings[‘damping coefficient’] to be set.
- Returns:
A function that evaluates the weak form contributions.
- Return type:
callable
- The returned function has the following parameters:
x (jnp.ndarray): Spatial coordinates at the integration point.
ansatz (callable): Ansatz function representing the primary field at time step n+1.
test_ansatz (callable): Test ansatz function representing the test function.
settings (dict): Settings for the computation, including: - ‘dofs n’: Degrees of freedom at the previous time step. - ‘connectivity’: Connectivity information for the elements. - ‘time increment’: Time increment delta_t.
static_settings (dict): Static settings for the computation.
int_point_number (int): Integration point number.
set: Number of domain
Notes
Requires settings[‘dofs n], settings[‘dofs n-1’] and settings[‘time increment’].
This models works for DOFs as a jnp.ndarray.