Adjoint class
Adjoint solve
- class HydrOpTop.Adjoints.Adjoint_Solve(algo=None)
Solve matrix equation Ax=B
Steady state sensitivity
- class HydrOpTop.Adjoints.No_Adjoint(parametrized_mat_props, p_ids)
A dummy adjoint class that solve no adjoint…
- class HydrOpTop.Adjoints.Sensitivity_Steady_Simple(solved_vars, parametrized_mat_props, solver, p_ids)
Compute the derivative of the cost function according to the material distribution parameter p considering a steady-state simulation with only one equality constraint (g(x,p) = 0) Arguments: Note: vector derivative should be numpy array, and matrix in (I,J,data) format as output by solver.get_sensitivity() method. I,J are 0 based indexing If cost_deriv_mat_prop is None, assume the cost function does not depend on the material property distribution.
- compute_sensitivity(p, dc_dYi, dc_dXi, Xi_name)
Compute the total cost function derivative according to material density parameter p.
- Parameters:
p – the material parameter
dc_dYi – derivative of the function wrt solved variable (Solver ordering)
dc_dXi – derivative of the function wrt input variable (p ordering)
Xi_name – name of the function input variables