autopdex.models.forward_backward_euler_weak
- autopdex.models.forward_backward_euler_weak(inertia_coeff_fun)[source]
Constructs a weak form time discretization function using the Forward or Backward Euler method.
For an examplary use, see the examples with explicit and implicit time integration.
- Parameters:
inertia_coeff_fun (callable) – Function to compute the inertia coefficient given spatial coordinates and settings.
- Returns:
A function that evaluates the weak form time discretization for the PDE.
- 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
The primary field is evaluated at both time steps n and n+1.
The time derivative is computed using the Forward or Backward Euler method, depending on the use case.
The inertia coefficient is used to scale the time derivative term.
This models works for DOFs as a jnp.ndarray.