ANYfeSolver 0.5.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- anyfesolver/__init__.py +1075 -0
- anyfesolver/_b2_attachment_elimination_dev.py +261 -0
- anyfesolver/_b2_f10_f11_point_attachment.py +163 -0
- anyfesolver/_b2_loaded_point_trace_dev.py +173 -0
- anyfesolver/_b2_physical_flexibility_linear.py +707 -0
- anyfesolver/_b2_physical_linear_batch_dev.py +491 -0
- anyfesolver/_b2_physical_linear_definition.py +415 -0
- anyfesolver/_b2_physical_load_bubbles.py +282 -0
- anyfesolver/_compensated_contractions.py +497 -0
- anyfesolver/_compensated_native.py +437 -0
- anyfesolver/_corotational_batch.py +219 -0
- anyfesolver/_director_trace.py +214 -0
- anyfesolver/_dyadic_bilinear.py +76 -0
- anyfesolver/_dyadic_factor_chain.py +25 -0
- anyfesolver/_ge_beam3_adaptive_arc_program.py +286 -0
- anyfesolver/_ge_beam3_analysis_combined.py +102 -0
- anyfesolver/_ge_beam3_analysis_fibre_translation.py +130 -0
- anyfesolver/_ge_beam3_analysis_modal_snapshot.py +27 -0
- anyfesolver/_ge_beam3_analysis_nodal_program.py +140 -0
- anyfesolver/_ge_beam3_analysis_translation.py +147 -0
- anyfesolver/_ge_beam3_analysis_translation_modal.py +84 -0
- anyfesolver/_ge_beam3_arc_geometry.py +89 -0
- anyfesolver/_ge_beam3_arc_program.py +304 -0
- anyfesolver/_ge_beam3_authoritative_cell_seed.py +25 -0
- anyfesolver/_ge_beam3_cell_identity.py +52 -0
- anyfesolver/_ge_beam3_centered_batched_finite_inertia.py +132 -0
- anyfesolver/_ge_beam3_centered_finite_inertia.py +171 -0
- anyfesolver/_ge_beam3_centered_mixed.py +104 -0
- anyfesolver/_ge_beam3_centered_reference.py +187 -0
- anyfesolver/_ge_beam3_centered_so3_strain.py +76 -0
- anyfesolver/_ge_beam3_complementary_section.py +122 -0
- anyfesolver/_ge_beam3_compliance_snapshot_guard.py +20 -0
- anyfesolver/_ge_beam3_connected_dynamic.py +486 -0
- anyfesolver/_ge_beam3_connected_trajectory.py +258 -0
- anyfesolver/_ge_beam3_conservative_backtrack.py +26 -0
- anyfesolver/_ge_beam3_controlled_fibre_modes.py +105 -0
- anyfesolver/_ge_beam3_coupled_beam_subdomain.py +128 -0
- anyfesolver/_ge_beam3_coupled_modes.py +256 -0
- anyfesolver/_ge_beam3_deterministic_reduction.py +264 -0
- anyfesolver/_ge_beam3_displacement_program.py +255 -0
- anyfesolver/_ge_beam3_durable_coupled.py +251 -0
- anyfesolver/_ge_beam3_dynamic_elastic_state.py +461 -0
- anyfesolver/_ge_beam3_effective_deadline.py +58 -0
- anyfesolver/_ge_beam3_elastic_seed_continuation.py +223 -0
- anyfesolver/_ge_beam3_elastic_seed_modal.py +139 -0
- anyfesolver/_ge_beam3_equilibrium_line_program.py +98 -0
- anyfesolver/_ge_beam3_equilibrium_schur_solver.py +96 -0
- anyfesolver/_ge_beam3_factor_chain_modes.py +103 -0
- anyfesolver/_ge_beam3_fibre_cell.py +408 -0
- anyfesolver/_ge_beam3_fibre_distributed_couples.py +191 -0
- anyfesolver/_ge_beam3_fibre_kinematic_cell.py +75 -0
- anyfesolver/_ge_beam3_fibre_line_program.py +157 -0
- anyfesolver/_ge_beam3_fibre_line_work.py +87 -0
- anyfesolver/_ge_beam3_fibre_reference_modal.py +104 -0
- anyfesolver/_ge_beam3_fibre_schur_solver.py +134 -0
- anyfesolver/_ge_beam3_fibre_section.py +286 -0
- anyfesolver/_ge_beam3_fibre_static_boundary.py +113 -0
- anyfesolver/_ge_beam3_g1_analysis.py +307 -0
- anyfesolver/_ge_beam3_g1_elastic.py +161 -0
- anyfesolver/_ge_beam3_g1_element.py +185 -0
- anyfesolver/_ge_beam3_g1_operator.py +137 -0
- anyfesolver/_ge_beam3_g2_analysis.py +176 -0
- anyfesolver/_ge_beam3_g2_constraints.py +162 -0
- anyfesolver/_ge_beam3_g3_analysis.py +385 -0
- anyfesolver/_ge_beam3_g3_constraints.py +168 -0
- anyfesolver/_ge_beam3_g3b_owner.py +296 -0
- anyfesolver/_ge_beam3_g3b_q4_reference.py +186 -0
- anyfesolver/_ge_beam3_g3b_reference.py +206 -0
- anyfesolver/_ge_beam3_g3b_result_schema.py +107 -0
- anyfesolver/_ge_beam3_g3b_s3_reference.py +185 -0
- anyfesolver/_ge_beam3_g3b_weighted_reference.py +193 -0
- anyfesolver/_ge_beam3_g3c_affine_q4_chart.py +58 -0
- anyfesolver/_ge_beam3_g3c_affine_q4_increment_chart.py +257 -0
- anyfesolver/_ge_beam3_g3c_affine_q4_recovery.py +434 -0
- anyfesolver/_ge_beam3_g3c_affine_q4_registry.py +127 -0
- anyfesolver/_ge_beam3_g3c_b2_physical.py +153 -0
- anyfesolver/_ge_beam3_g3c_b2_physical_adapter.py +160 -0
- anyfesolver/_ge_beam3_g3c_definition.py +117 -0
- anyfesolver/_ge_beam3_g3c_local_beam.py +188 -0
- anyfesolver/_ge_beam3_g3c_local_shell.py +371 -0
- anyfesolver/_ge_beam3_g3c_owner.py +400 -0
- anyfesolver/_ge_beam3_g3c_physical_authority.py +203 -0
- anyfesolver/_ge_beam3_g3c_physical_owner.py +556 -0
- anyfesolver/_ge_beam3_g3c_recovery.py +91 -0
- anyfesolver/_ge_beam3_g3c_so3_numerics.py +81 -0
- anyfesolver/_ge_beam3_g3c_stable/__init__.py +1 -0
- anyfesolver/_ge_beam3_g3c_stable/authority.py +152 -0
- anyfesolver/_ge_beam3_g3c_stable/beam.py +196 -0
- anyfesolver/_ge_beam3_g3c_stable/boundary.py +38 -0
- anyfesolver/_ge_beam3_g3c_stable/chart.py +23 -0
- anyfesolver/_ge_beam3_g3c_stable/compensated.py +46 -0
- anyfesolver/_ge_beam3_g3c_stable/element.py +190 -0
- anyfesolver/_ge_beam3_g3c_stable/fit.py +54 -0
- anyfesolver/_ge_beam3_g3c_stable/joint.py +255 -0
- anyfesolver/_ge_beam3_g3c_stable/line_work.py +92 -0
- anyfesolver/_ge_beam3_g3c_stable/operator.py +147 -0
- anyfesolver/_ge_beam3_g3c_stable/owner.py +415 -0
- anyfesolver/_ge_beam3_g3c_stable/shell.py +358 -0
- anyfesolver/_ge_beam3_g4_completion.py +186 -0
- anyfesolver/_ge_beam3_g4a_station_transaction.py +385 -0
- anyfesolver/_ge_beam3_g5_completion.py +68 -0
- anyfesolver/_ge_beam3_g6_domain.py +354 -0
- anyfesolver/_ge_beam3_generalized_cell.py +172 -0
- anyfesolver/_ge_beam3_generalized_ellipsoid_section.py +215 -0
- anyfesolver/_ge_beam3_generalized_static_boundary.py +233 -0
- anyfesolver/_ge_beam3_lifted_kinetic_factor.py +26 -0
- anyfesolver/_ge_beam3_line_fibre_modes.py +121 -0
- anyfesolver/_ge_beam3_load_program.py +275 -0
- anyfesolver/_ge_beam3_loaded_modal.py +225 -0
- anyfesolver/_ge_beam3_mixed_ad.py +286 -0
- anyfesolver/_ge_beam3_native_analysis.py +484 -0
- anyfesolver/_ge_beam3_native_arc.py +269 -0
- anyfesolver/_ge_beam3_native_arc_adaptive.py +251 -0
- anyfesolver/_ge_beam3_native_arc_restart.py +88 -0
- anyfesolver/_ge_beam3_native_arc_source.py +62 -0
- anyfesolver/_ge_beam3_native_buckling.py +206 -0
- anyfesolver/_ge_beam3_native_combined_couples.py +179 -0
- anyfesolver/_ge_beam3_native_combined_restart.py +205 -0
- anyfesolver/_ge_beam3_native_definition.py +238 -0
- anyfesolver/_ge_beam3_native_distributed_element.py +220 -0
- anyfesolver/_ge_beam3_native_distributed_loading.py +92 -0
- anyfesolver/_ge_beam3_native_distributed_program.py +165 -0
- anyfesolver/_ge_beam3_native_distributed_recovery.py +34 -0
- anyfesolver/_ge_beam3_native_distributed_restart.py +221 -0
- anyfesolver/_ge_beam3_native_dynamic_analysis.py +149 -0
- anyfesolver/_ge_beam3_native_dynamic_restart.py +261 -0
- anyfesolver/_ge_beam3_native_fibre_current_modal.py +104 -0
- anyfesolver/_ge_beam3_native_fibre_recovery.py +34 -0
- anyfesolver/_ge_beam3_native_fibre_restart.py +211 -0
- anyfesolver/_ge_beam3_native_fibre_static_element.py +193 -0
- anyfesolver/_ge_beam3_native_force_adaptation.py +56 -0
- anyfesolver/_ge_beam3_native_generalized_combined_couples.py +188 -0
- anyfesolver/_ge_beam3_native_generalized_combined_restart.py +207 -0
- anyfesolver/_ge_beam3_native_generalized_element.py +222 -0
- anyfesolver/_ge_beam3_native_generalized_factor_modal.py +122 -0
- anyfesolver/_ge_beam3_native_generalized_loading.py +92 -0
- anyfesolver/_ge_beam3_native_generalized_modal.py +274 -0
- anyfesolver/_ge_beam3_native_generalized_paired_modal.py +13 -0
- anyfesolver/_ge_beam3_native_generalized_parameter.py +89 -0
- anyfesolver/_ge_beam3_native_generalized_program.py +196 -0
- anyfesolver/_ge_beam3_native_generalized_recovery.py +34 -0
- anyfesolver/_ge_beam3_native_generalized_restart.py +243 -0
- anyfesolver/_ge_beam3_native_history_profile.py +53 -0
- anyfesolver/_ge_beam3_native_line_loading.py +93 -0
- anyfesolver/_ge_beam3_native_line_program.py +150 -0
- anyfesolver/_ge_beam3_native_line_recovery.py +34 -0
- anyfesolver/_ge_beam3_native_line_restart.py +197 -0
- anyfesolver/_ge_beam3_native_line_static_element.py +220 -0
- anyfesolver/_ge_beam3_native_load_admission.py +37 -0
- anyfesolver/_ge_beam3_native_midpoint.py +1004 -0
- anyfesolver/_ge_beam3_native_multi_shell_contact.py +539 -0
- anyfesolver/_ge_beam3_native_pair_contact.py +236 -0
- anyfesolver/_ge_beam3_native_shell_contact.py +357 -0
- anyfesolver/_ge_beam3_native_spatial_couples.py +176 -0
- anyfesolver/_ge_beam3_native_spatial_restart.py +204 -0
- anyfesolver/_ge_beam3_native_transient.py +467 -0
- anyfesolver/_ge_beam3_native_translation.py +225 -0
- anyfesolver/_ge_beam3_native_translation_restart.py +54 -0
- anyfesolver/_ge_beam3_operator_validation_scope.py +53 -0
- anyfesolver/_ge_beam3_p5/__init__.py +11 -0
- anyfesolver/_ge_beam3_p5/algebra.py +91 -0
- anyfesolver/_ge_beam3_p5/arrays.py +29 -0
- anyfesolver/_ge_beam3_p5/chart.py +45 -0
- anyfesolver/_ge_beam3_p5/codec.py +82 -0
- anyfesolver/_ge_beam3_p5/committed_modal.py +191 -0
- anyfesolver/_ge_beam3_p5/compensated.py +118 -0
- anyfesolver/_ge_beam3_p5/compensated_coordinates.py +44 -0
- anyfesolver/_ge_beam3_p5/core.py +159 -0
- anyfesolver/_ge_beam3_p5/element.py +207 -0
- anyfesolver/_ge_beam3_p5/factors.py +61 -0
- anyfesolver/_ge_beam3_p5/inertia.py +120 -0
- anyfesolver/_ge_beam3_p5/mass.py +70 -0
- anyfesolver/_ge_beam3_p5/mixed.py +256 -0
- anyfesolver/_ge_beam3_p5/reference_modal.py +73 -0
- anyfesolver/_ge_beam3_p5/section.py +139 -0
- anyfesolver/_ge_beam3_p5/typed_schema.py +111 -0
- anyfesolver/_ge_beam3_p5_centered/__init__.py +6 -0
- anyfesolver/_ge_beam3_p5_centered/codec.py +84 -0
- anyfesolver/_ge_beam3_p5_centered/committed_modal.py +192 -0
- anyfesolver/_ge_beam3_p5_centered/core.py +171 -0
- anyfesolver/_ge_beam3_p5_centered/element.py +216 -0
- anyfesolver/_ge_beam3_p5_centered/mass.py +99 -0
- anyfesolver/_ge_beam3_p5_centered/positions.py +34 -0
- anyfesolver/_ge_beam3_p5_centered/reference_modal.py +73 -0
- anyfesolver/_ge_beam3_p5_coordinates/__init__.py +6 -0
- anyfesolver/_ge_beam3_p5_coordinates/codec.py +84 -0
- anyfesolver/_ge_beam3_p5_coordinates/committed_modal.py +192 -0
- anyfesolver/_ge_beam3_p5_coordinates/core.py +163 -0
- anyfesolver/_ge_beam3_p5_coordinates/element.py +213 -0
- anyfesolver/_ge_beam3_p5_coordinates/positions.py +102 -0
- anyfesolver/_ge_beam3_p5_coordinates/reference_modal.py +73 -0
- anyfesolver/_ge_beam3_p5_loads/__init__.py +7 -0
- anyfesolver/_ge_beam3_p5_loads/codec.py +85 -0
- anyfesolver/_ge_beam3_p5_loads/core.py +192 -0
- anyfesolver/_ge_beam3_p5_loads/element.py +243 -0
- anyfesolver/_ge_beam3_p5_loads/state.py +120 -0
- anyfesolver/_ge_beam3_p5_loads/work.py +45 -0
- anyfesolver/_ge_beam3_p5_seeded/__init__.py +9 -0
- anyfesolver/_ge_beam3_p5_seeded/codec.py +87 -0
- anyfesolver/_ge_beam3_p5_seeded/core.py +197 -0
- anyfesolver/_ge_beam3_p5_seeded/element.py +245 -0
- anyfesolver/_ge_beam3_p5_seeded/state.py +122 -0
- anyfesolver/_ge_beam3_p5_seeded/work.py +47 -0
- anyfesolver/_ge_beam3_pose_joint.py +268 -0
- anyfesolver/_ge_beam3_precise_geometric_work.py +147 -0
- anyfesolver/_ge_beam3_reassembled_signed_modes.py +101 -0
- anyfesolver/_ge_beam3_reference_identity.py +92 -0
- anyfesolver/_ge_beam3_refined_fibre_schur_solver.py +104 -0
- anyfesolver/_ge_beam3_refinement_capacity.py +19 -0
- anyfesolver/_ge_beam3_relative_virgin_reference_modes.py +60 -0
- anyfesolver/_ge_beam3_retained_arc.py +350 -0
- anyfesolver/_ge_beam3_retained_arc_geometry.py +66 -0
- anyfesolver/_ge_beam3_retained_arc_modal.py +125 -0
- anyfesolver/_ge_beam3_retained_elastic.py +134 -0
- anyfesolver/_ge_beam3_retained_fibre.py +209 -0
- anyfesolver/_ge_beam3_retained_fibre_control.py +270 -0
- anyfesolver/_ge_beam3_retained_fibre_element.py +58 -0
- anyfesolver/_ge_beam3_retained_fibre_modal.py +155 -0
- anyfesolver/_ge_beam3_retained_fibre_modes.py +189 -0
- anyfesolver/_ge_beam3_retained_fibre_program.py +68 -0
- anyfesolver/_ge_beam3_retained_fibre_state.py +268 -0
- anyfesolver/_ge_beam3_retained_force_program.py +72 -0
- anyfesolver/_ge_beam3_retained_generalized.py +186 -0
- anyfesolver/_ge_beam3_retained_generalized_modal.py +171 -0
- anyfesolver/_ge_beam3_retained_generalized_program.py +63 -0
- anyfesolver/_ge_beam3_retained_generalized_state.py +281 -0
- anyfesolver/_ge_beam3_retained_nodal_loading.py +111 -0
- anyfesolver/_ge_beam3_retained_plastic.py +116 -0
- anyfesolver/_ge_beam3_retained_plastic_modes.py +144 -0
- anyfesolver/_ge_beam3_retained_plastic_program.py +69 -0
- anyfesolver/_ge_beam3_retained_plastic_state.py +165 -0
- anyfesolver/_ge_beam3_retained_state.py +194 -0
- anyfesolver/_ge_beam3_retained_translation_control.py +345 -0
- anyfesolver/_ge_beam3_retained_translation_modal.py +137 -0
- anyfesolver/_ge_beam3_schur_line_program.py +98 -0
- anyfesolver/_ge_beam3_seeded_fibre_control.py +175 -0
- anyfesolver/_ge_beam3_seeded_load_program.py +301 -0
- anyfesolver/_ge_beam3_seeded_loaded_modal.py +226 -0
- anyfesolver/_ge_beam3_seeded_signed_modes.py +150 -0
- anyfesolver/_ge_beam3_shared_kinematic_split.py +53 -0
- anyfesolver/_ge_beam3_shell_joint_state.py +396 -0
- anyfesolver/_ge_beam3_shell_joint_trial.py +217 -0
- anyfesolver/_ge_beam3_signed_loaded_modes.py +140 -0
- anyfesolver/_ge_beam3_spatial_fibre_program.py +113 -0
- anyfesolver/_ge_beam3_spatial_nodal_moments.py +38 -0
- anyfesolver/_ge_beam3_station_resultant_cell.py +235 -0
- anyfesolver/_ge_beam3_variational_shell.py +211 -0
- anyfesolver/_ge_beam3_virgin_reference_modes.py +60 -0
- anyfesolver/_impact_coupling.py +162 -0
- anyfesolver/_native_authority_dag.py +77 -0
- anyfesolver/_native_dyadic_interval_inertia.py +64 -0
- anyfesolver/_native_exact_shift_chain_modes.py +140 -0
- anyfesolver/_native_exact_shift_inertia.py +86 -0
- anyfesolver/_native_factor_chain_modes.py +192 -0
- anyfesolver/_native_guard.cpp +828 -0
- anyfesolver/_native_guard_dispatch.py +140 -0
- anyfesolver/_native_large_factor_chain.py +55 -0
- anyfesolver/_native_material_protocol.py +51 -0
- anyfesolver/_native_midpoint_controller.py +90 -0
- anyfesolver/_native_modal_capacity.py +26 -0
- anyfesolver/_native_paired_factor_chain_modes.py +244 -0
- anyfesolver/_native_reassembled_factor_modes.py +185 -0
- anyfesolver/_native_reference_factor_spectrum.py +102 -0
- anyfesolver/_native_reference_modal.py +180 -0
- anyfesolver/_native_relative_factor_chain_modes.py +204 -0
- anyfesolver/_native_relative_reference_factor_spectrum.py +110 -0
- anyfesolver/_native_retained_step.py +15 -0
- anyfesolver/_native_rotation_state.py +797 -0
- anyfesolver/_native_signed_factor_modes.py +257 -0
- anyfesolver/_native_signed_kinetic_factor_modes.py +279 -0
- anyfesolver/_native_stationary_spectrum.py +79 -0
- anyfesolver/_nonlinear_events.py +150 -0
- anyfesolver/_nonlinear_seed.py +80 -0
- anyfesolver/_paired_modal_arithmetic.py +71 -0
- anyfesolver/_plate_stability_continuation.py +171 -0
- anyfesolver/_q4_assumed_strain_plasticity.py +502 -0
- anyfesolver/_qualified_authority_epoch.py +561 -0
- anyfesolver/_relative_reference_svd.py +44 -0
- anyfesolver/_stiffened_shell_affine_endpoint.py +232 -0
- anyfesolver/_stiffened_shell_algorithmic_pullback.py +38 -0
- anyfesolver/_stiffened_shell_arc_checkpoint.py +422 -0
- anyfesolver/_stiffened_shell_arc_control.py +108 -0
- anyfesolver/_stiffened_shell_arc_metric.py +222 -0
- anyfesolver/_stiffened_shell_arc_publication.py +153 -0
- anyfesolver/_stiffened_shell_arc_trial.py +310 -0
- anyfesolver/_stiffened_shell_b2_affine_resolution.py +101 -0
- anyfesolver/_stiffened_shell_b2_assembly_diagnostics.py +172 -0
- anyfesolver/_stiffened_shell_b2_definition_ownership.py +189 -0
- anyfesolver/_stiffened_shell_b2_experimental.py +153 -0
- anyfesolver/_stiffened_shell_b2_nodal_footprint.py +273 -0
- anyfesolver/_stiffened_shell_b2_physical_rigid_footprint.py +237 -0
- anyfesolver/_stiffened_shell_b2_q4_panel_experimental.py +2447 -0
- anyfesolver/_stiffened_shell_b2_q4_point_experimental.py +251 -0
- anyfesolver/_stiffened_shell_b2_reference_buckling.py +413 -0
- anyfesolver/_stiffened_shell_b3_chart.py +70 -0
- anyfesolver/_stiffened_shell_b3_local_adapter.py +141 -0
- anyfesolver/_stiffened_shell_beam_history.py +107 -0
- anyfesolver/_stiffened_shell_bl5_local_experimental.py +173 -0
- anyfesolver/_stiffened_shell_bl5_native_elastic.py +28 -0
- anyfesolver/_stiffened_shell_branch_event_trial.py +58 -0
- anyfesolver/_stiffened_shell_consumer_capabilities.py +124 -0
- anyfesolver/_stiffened_shell_coordinate_support.py +110 -0
- anyfesolver/_stiffened_shell_displacement_adaptive.py +327 -0
- anyfesolver/_stiffened_shell_displacement_checkpoint.py +360 -0
- anyfesolver/_stiffened_shell_displacement_control.py +326 -0
- anyfesolver/_stiffened_shell_displacement_corrector.py +293 -0
- anyfesolver/_stiffened_shell_displacement_increment.py +121 -0
- anyfesolver/_stiffened_shell_distributing_footprint.py +354 -0
- anyfesolver/_stiffened_shell_distributing_pose.py +267 -0
- anyfesolver/_stiffened_shell_f06_increment_arithmetic.py +205 -0
- anyfesolver/_stiffened_shell_ge_body_load.py +300 -0
- anyfesolver/_stiffened_shell_ge_checkpoint_binary.py +472 -0
- anyfesolver/_stiffened_shell_ge_distributed_load.py +210 -0
- anyfesolver/_stiffened_shell_ge_distributed_programme.py +175 -0
- anyfesolver/_stiffened_shell_ge_distributing_finite.py +242 -0
- anyfesolver/_stiffened_shell_ge_distributing_reference.py +296 -0
- anyfesolver/_stiffened_shell_ge_experimental.py +2454 -0
- anyfesolver/_stiffened_shell_ge_finite_experimental.py +2714 -0
- anyfesolver/_stiffened_shell_ge_mixed_modal_mass.py +33 -0
- anyfesolver/_stiffened_shell_ge_point_buckling.py +723 -0
- anyfesolver/_stiffened_shell_ge_pressure_load.py +366 -0
- anyfesolver/_stiffened_shell_ge_reference_modal.py +580 -0
- anyfesolver/_stiffened_shell_generalized_recovery.py +150 -0
- anyfesolver/_stiffened_shell_increment_control.py +217 -0
- anyfesolver/_stiffened_shell_l1_assembly_experimental.py +420 -0
- anyfesolver/_stiffened_shell_l1_local_experimental.py +284 -0
- anyfesolver/_stiffened_shell_l1_supported_work_experimental.py +146 -0
- anyfesolver/_stiffened_shell_native_distributed_load.py +120 -0
- anyfesolver/_stiffened_shell_native_gravity.py +236 -0
- anyfesolver/_stiffened_shell_nodal_footprint.py +255 -0
- anyfesolver/_stiffened_shell_physical_q4_mass.py +98 -0
- anyfesolver/_stiffened_shell_physical_s3_mass.py +53 -0
- anyfesolver/_stiffened_shell_point_recovery.py +49 -0
- anyfesolver/_stiffened_shell_q4_algorithmic_pullback.py +88 -0
- anyfesolver/_stiffened_shell_q4_material_event.py +114 -0
- anyfesolver/_stiffened_shell_q4_reference.py +65 -0
- anyfesolver/_stiffened_shell_rotation_charts.py +58 -0
- anyfesolver/_stiffened_shell_s3_algorithmic_pullback.py +59 -0
- anyfesolver/_stiffened_shell_s3_conservative_buckling.py +28 -0
- anyfesolver/_stiffened_shell_s3_dead_work_candidate.py +107 -0
- anyfesolver/_stiffened_shell_s3_material_event.py +30 -0
- anyfesolver/_stiffened_shell_same_parent_trial.py +224 -0
- anyfesolver/_stiffened_shell_selected_recovery.py +113 -0
- anyfesolver/_stiffened_shell_staged_load_experimental.py +392 -0
- anyfesolver/_stiffened_shell_stress_free_reference.py +204 -0
- anyfesolver/_wire_types.py +17 -0
- anyfesolver/activity.py +1537 -0
- anyfesolver/algebraic_dynamics.py +2864 -0
- anyfesolver/analysis_session.py +897 -0
- anyfesolver/anystructure_fem_mode.py +1637 -0
- anyfesolver/arc_length.py +2587 -0
- anyfesolver/assembly.py +1830 -0
- anyfesolver/b3_ge.py +179 -0
- anyfesolver/baselines.py +303 -0
- anyfesolver/beam_sections.py +292 -0
- anyfesolver/beam_shell_verification.py +4685 -0
- anyfesolver/beam_validity.py +110 -0
- anyfesolver/benchmarks.py +495 -0
- anyfesolver/boundary.py +1680 -0
- anyfesolver/buckling.py +2136 -0
- anyfesolver/buckling_validity.py +91 -0
- anyfesolver/capacity_workflow.py +431 -0
- anyfesolver/capsule_runtime_guard.py +99 -0
- anyfesolver/cases.py +173 -0
- anyfesolver/composite_strip_verification.py +297 -0
- anyfesolver/concentrated_mass.py +84 -0
- anyfesolver/constraint_audit.py +553 -0
- anyfesolver/contact.py +4785 -0
- anyfesolver/contact_performance.py +301 -0
- anyfesolver/control.py +206 -0
- anyfesolver/corotational.py +1935 -0
- anyfesolver/corotational_performance.py +157 -0
- anyfesolver/current_state_tangent.py +2780 -0
- anyfesolver/cylinder_benchmarks.py +369 -0
- anyfesolver/damage_matrix_performance.py +617 -0
- anyfesolver/dynamics.py +2833 -0
- anyfesolver/e4_pl_element.py +8265 -0
- anyfesolver/e4_pl_enriched.py +194 -0
- anyfesolver/e4_pl_enriched_nonlinear.py +159 -0
- anyfesolver/e4_pl_s3_element.py +9752 -0
- anyfesolver/e4_pl_s3_initial_fields.py +101 -0
- anyfesolver/e4_pl_s3_state.py +4723 -0
- anyfesolver/e4_pl_s3_v2_element.py +1844 -0
- anyfesolver/e4_pl_s3_v2b_element.py +1936 -0
- anyfesolver/e4_pl_s3_v2c_element.py +2196 -0
- anyfesolver/e4_pl_s3_v2d_element.py +2621 -0
- anyfesolver/e4_pl_s3_v2d_state.py +376 -0
- anyfesolver/element_capabilities.py +159 -0
- anyfesolver/element_qualification.py +432 -0
- anyfesolver/elements.py +6327 -0
- anyfesolver/experimental_csr_assembly.py +238 -0
- anyfesolver/external_references.py +1253 -0
- anyfesolver/fe_core.py +832 -0
- anyfesolver/floating_pressure_regions.py +119 -0
- anyfesolver/floating_response.py +486 -0
- anyfesolver/floating_transient.py +1281 -0
- anyfesolver/fracture.py +621 -0
- anyfesolver/ge_beam3_curved_reference.py +725 -0
- anyfesolver/ge_beam3_element.py +885 -0
- anyfesolver/ge_beam3_mixed_element.py +1216 -0
- anyfesolver/ge_beam3_mixed_state.py +814 -0
- anyfesolver/ge_beam3_native.py +129 -0
- anyfesolver/ge_beam3_native_connected_dynamics.py +24 -0
- anyfesolver/ge_beam3_native_dynamics.py +70 -0
- anyfesolver/ge_beam3_state.py +672 -0
- anyfesolver/general_contact/__init__.py +151 -0
- anyfesolver/general_contact/_enriched_multitarget_empty.py +202 -0
- anyfesolver/general_contact/_enriched_multitarget_trial.py +183 -0
- anyfesolver/general_contact/_results_archive_common.py +65 -0
- anyfesolver/general_contact/algebraic_path.py +206 -0
- anyfesolver/general_contact/arc_contact.py +237 -0
- anyfesolver/general_contact/arc_results_archive.py +158 -0
- anyfesolver/general_contact/augmentation.py +157 -0
- anyfesolver/general_contact/automatic_domain.py +621 -0
- anyfesolver/general_contact/beam_chain_consistent.py +357 -0
- anyfesolver/general_contact/beam_chain_end_geometry.py +237 -0
- anyfesolver/general_contact/beam_chain_ends.py +220 -0
- anyfesolver/general_contact/beam_chain_pair.py +416 -0
- anyfesolver/general_contact/beam_curve_end_geometry.py +254 -0
- anyfesolver/general_contact/beam_curve_ends.py +237 -0
- anyfesolver/general_contact/beam_curve_pair.py +794 -0
- anyfesolver/general_contact/beam_curve_pair_static.py +303 -0
- anyfesolver/general_contact/beam_end_radial_geometry.py +221 -0
- anyfesolver/general_contact/beam_end_topology.py +15 -0
- anyfesolver/general_contact/beam_hemisphere_coupled_tool.py +61 -0
- anyfesolver/general_contact/beam_hemisphere_cylinder.py +134 -0
- anyfesolver/general_contact/beam_hemisphere_cylinder_motion.py +89 -0
- anyfesolver/general_contact/beam_hemisphere_cylinder_work.py +216 -0
- anyfesolver/general_contact/beam_hemisphere_plane.py +175 -0
- anyfesolver/general_contact/beam_hemisphere_s3_support.py +152 -0
- anyfesolver/general_contact/beam_hemisphere_sphere.py +135 -0
- anyfesolver/general_contact/beam_hemisphere_sphere_work.py +114 -0
- anyfesolver/general_contact/beam_hemisphere_support.py +211 -0
- anyfesolver/general_contact/beam_pair.py +523 -0
- anyfesolver/general_contact/beam_pair_end_geometry.py +269 -0
- anyfesolver/general_contact/beam_pair_ends.py +222 -0
- anyfesolver/general_contact/beam_plane.py +425 -0
- anyfesolver/general_contact/beam_radial.py +500 -0
- anyfesolver/general_contact/beam_radial_ends.py +223 -0
- anyfesolver/general_contact/beam_s3_directional_rates.py +196 -0
- anyfesolver/general_contact/beam_s3_rotational_transient.py +126 -0
- anyfesolver/general_contact/beam_s3_transient.py +139 -0
- anyfesolver/general_contact/beam_shell.py +648 -0
- anyfesolver/general_contact/beam_shell_patch.py +395 -0
- anyfesolver/general_contact/beam_temporal_bounds.py +230 -0
- anyfesolver/general_contact/capability.py +101 -0
- anyfesolver/general_contact/capped_cylinder.py +618 -0
- anyfesolver/general_contact/contact_search.py +95 -0
- anyfesolver/general_contact/core.py +1769 -0
- anyfesolver/general_contact/curved_s3_q4_work.py +238 -0
- anyfesolver/general_contact/curved_shell_skin.py +520 -0
- anyfesolver/general_contact/d1_interior_profile.py +427 -0
- anyfesolver/general_contact/deformable_beam_s3_caps.py +143 -0
- anyfesolver/general_contact/deformable_beam_s3_line.py +211 -0
- anyfesolver/general_contact/deformable_beam_s3_static.py +152 -0
- anyfesolver/general_contact/descriptor_rates.py +61 -0
- anyfesolver/general_contact/enriched_cold_predictor.py +161 -0
- anyfesolver/general_contact/enriched_moment_batch.py +337 -0
- anyfesolver/general_contact/enriched_multitarget.py +308 -0
- anyfesolver/general_contact/enriched_multitarget_gap.py +156 -0
- anyfesolver/general_contact/enriched_multitarget_moments.py +194 -0
- anyfesolver/general_contact/enriched_multitarget_topology.py +171 -0
- anyfesolver/general_contact/enriched_nonlinear.py +440 -0
- anyfesolver/general_contact/enriched_overlap.py +299 -0
- anyfesolver/general_contact/enriched_path.py +253 -0
- anyfesolver/general_contact/enriched_small_cut.py +310 -0
- anyfesolver/general_contact/enriched_static.py +481 -0
- anyfesolver/general_contact/enriched_union.py +320 -0
- anyfesolver/general_contact/equilibrated_pressure_pivot.py +140 -0
- anyfesolver/general_contact/event_subdivision.py +273 -0
- anyfesolver/general_contact/finite_mixed_state.py +133 -0
- anyfesolver/general_contact/finite_rigid_patch.py +196 -0
- anyfesolver/general_contact/finite_rigid_support.py +129 -0
- anyfesolver/general_contact/finite_rigid_sweep.py +53 -0
- anyfesolver/general_contact/finite_rotation_predictor.py +171 -0
- anyfesolver/general_contact/finite_rotation_skin.py +212 -0
- anyfesolver/general_contact/finite_rotation_state.py +106 -0
- anyfesolver/general_contact/finite_rotation_sweep.py +161 -0
- anyfesolver/general_contact/finite_v2d_state.py +104 -0
- anyfesolver/general_contact/fixed_projection_graph.py +205 -0
- anyfesolver/general_contact/fixed_projection_s3_events.py +235 -0
- anyfesolver/general_contact/free_rigid.py +134 -0
- anyfesolver/general_contact/friction_point.py +378 -0
- anyfesolver/general_contact/gap_extrema.py +119 -0
- anyfesolver/general_contact/guided_pair_transient_geometry.py +138 -0
- anyfesolver/general_contact/initial_contact_seed.py +368 -0
- anyfesolver/general_contact/linearized_pivot.py +595 -0
- anyfesolver/general_contact/material_work_diagnostics.py +159 -0
- anyfesolver/general_contact/moment_batch_ad.py +129 -0
- anyfesolver/general_contact/moment_batch_points.py +75 -0
- anyfesolver/general_contact/moving.py +1031 -0
- anyfesolver/general_contact/multiple_beam_rigid.py +248 -0
- anyfesolver/general_contact/multiple_beam_s3_caps.py +199 -0
- anyfesolver/general_contact/multiple_beam_s3_transient.py +223 -0
- anyfesolver/general_contact/multiple_projected_pairs.py +196 -0
- anyfesolver/general_contact/multiple_shell_planes.py +226 -0
- anyfesolver/general_contact/native_activation_static.py +143 -0
- anyfesolver/general_contact/native_checkpoint_results.py +213 -0
- anyfesolver/general_contact/native_curve_union.py +268 -0
- anyfesolver/general_contact/native_curved_geometry.py +374 -0
- anyfesolver/general_contact/native_curved_pair_partition.py +590 -0
- anyfesolver/general_contact/native_curved_plane_work.py +864 -0
- anyfesolver/general_contact/native_curved_s3_work.py +472 -0
- anyfesolver/general_contact/native_event_polynomial.py +164 -0
- anyfesolver/general_contact/native_fibre_context.py +173 -0
- anyfesolver/general_contact/native_fibre_results.py +74 -0
- anyfesolver/general_contact/native_initial_guess.py +122 -0
- anyfesolver/general_contact/native_material_activation.py +108 -0
- anyfesolver/general_contact/native_material_plane.py +111 -0
- anyfesolver/general_contact/native_material_s3.py +209 -0
- anyfesolver/general_contact/native_multi_s3_static.py +722 -0
- anyfesolver/general_contact/native_normal_angles.py +233 -0
- anyfesolver/general_contact/native_pair_error_budget.py +49 -0
- anyfesolver/general_contact/native_replay_arithmetic.py +103 -0
- anyfesolver/general_contact/native_replay_diagnostics.py +90 -0
- anyfesolver/general_contact/native_retained_body_junction.py +99 -0
- anyfesolver/general_contact/native_retained_body_pair.py +220 -0
- anyfesolver/general_contact/native_retained_body_projection.py +160 -0
- anyfesolver/general_contact/native_retained_body_static.py +62 -0
- anyfesolver/general_contact/native_retained_cell_pair.py +185 -0
- anyfesolver/general_contact/native_retained_curve_cell.py +102 -0
- anyfesolver/general_contact/native_retained_line_plane.py +210 -0
- anyfesolver/general_contact/native_retained_line_s3.py +440 -0
- anyfesolver/general_contact/native_retained_line_s3_work.py +91 -0
- anyfesolver/general_contact/native_retained_pair_static.py +845 -0
- anyfesolver/general_contact/native_retained_s3_static.py +554 -0
- anyfesolver/general_contact/native_retained_static.py +478 -0
- anyfesolver/general_contact/native_retained_station.py +222 -0
- anyfesolver/general_contact/native_retained_whole_pair.py +2120 -0
- anyfesolver/general_contact/native_s3_swept.py +149 -0
- anyfesolver/general_contact/native_shell_static_driver.py +144 -0
- anyfesolver/general_contact/native_surface_activation.py +391 -0
- anyfesolver/general_contact/native_surface_bounds.py +198 -0
- anyfesolver/general_contact/native_surface_contributor.py +121 -0
- anyfesolver/general_contact/native_surface_crossing.py +81 -0
- anyfesolver/general_contact/native_surface_event_sequence.py +320 -0
- anyfesolver/general_contact/native_surface_extrema.py +72 -0
- anyfesolver/general_contact/native_surface_friction_integral.py +1724 -0
- anyfesolver/general_contact/native_surface_front.py +742 -0
- anyfesolver/general_contact/native_surface_front_boundary.py +160 -0
- anyfesolver/general_contact/native_surface_front_precision.py +78 -0
- anyfesolver/general_contact/native_surface_front_work.py +118 -0
- anyfesolver/general_contact/native_surface_history.py +334 -0
- anyfesolver/general_contact/native_surface_normal.py +324 -0
- anyfesolver/general_contact/native_surface_patch.py +213 -0
- anyfesolver/general_contact/native_surface_path.py +348 -0
- anyfesolver/general_contact/native_surface_quadrature.py +212 -0
- anyfesolver/general_contact/native_surface_s3_friction.py +340 -0
- anyfesolver/general_contact/native_surface_support.py +776 -0
- anyfesolver/general_contact/native_surface_transaction.py +198 -0
- anyfesolver/general_contact/native_transient_multi_shell.py +108 -0
- anyfesolver/general_contact/native_transient_pair.py +61 -0
- anyfesolver/general_contact/native_transient_shell.py +44 -0
- anyfesolver/general_contact/normal_s3_skin_path.py +163 -0
- anyfesolver/general_contact/overlap.py +443 -0
- anyfesolver/general_contact/pair.py +466 -0
- anyfesolver/general_contact/patch_broadphase.py +111 -0
- anyfesolver/general_contact/patch_mortar.py +593 -0
- anyfesolver/general_contact/patch_sliding.py +644 -0
- anyfesolver/general_contact/plane_newmark_events.py +278 -0
- anyfesolver/general_contact/pointwise_patch.py +288 -0
- anyfesolver/general_contact/polynomial_roots.py +312 -0
- anyfesolver/general_contact/pressure_basis.py +241 -0
- anyfesolver/general_contact/pressure_diagnostics.py +155 -0
- anyfesolver/general_contact/pressure_overlay.py +182 -0
- anyfesolver/general_contact/pressure_space.py +51 -0
- anyfesolver/general_contact/q4_material_checkpoint.py +276 -0
- anyfesolver/general_contact/q4_overlap_local_bound.py +1111 -0
- anyfesolver/general_contact/q4_q4_overlap_derivatives.py +234 -0
- anyfesolver/general_contact/q4_q4_swept_bound.py +58 -0
- anyfesolver/general_contact/q4_s3_overlap_derivatives.py +1159 -0
- anyfesolver/general_contact/q4_s3_tiny_wedge.py +180 -0
- anyfesolver/general_contact/q4_skin_work.py +87 -0
- anyfesolver/general_contact/q4_source_mortar_energy.py +181 -0
- anyfesolver/general_contact/q4_source_overlap.py +401 -0
- anyfesolver/general_contact/q4_target_overlap.py +181 -0
- anyfesolver/general_contact/request_identity.py +192 -0
- anyfesolver/general_contact/rigid_translation.py +199 -0
- anyfesolver/general_contact/runtime.py +27 -0
- anyfesolver/general_contact/s3_friction_chart_interval.py +104 -0
- anyfesolver/general_contact/s3_friction_coverage.py +165 -0
- anyfesolver/general_contact/s3_friction_dyadic_interval.py +39 -0
- anyfesolver/general_contact/s3_friction_history_path.py +111 -0
- anyfesolver/general_contact/s3_friction_mesh_coverage.py +145 -0
- anyfesolver/general_contact/s3_friction_mesh_gap.py +74 -0
- anyfesolver/general_contact/s3_friction_mesh_monolithic.py +150 -0
- anyfesolver/general_contact/s3_friction_monolithic.py +121 -0
- anyfesolver/general_contact/s3_friction_moving_coverage.py +114 -0
- anyfesolver/general_contact/s3_friction_pair.py +237 -0
- anyfesolver/general_contact/s3_friction_point.py +129 -0
- anyfesolver/general_contact/s3_friction_prepared_path.py +254 -0
- anyfesolver/general_contact/s3_friction_replay.py +1094 -0
- anyfesolver/general_contact/s3_friction_rim_path.py +69 -0
- anyfesolver/general_contact/s3_friction_rim_transaction.py +23 -0
- anyfesolver/general_contact/s3_friction_static.py +267 -0
- anyfesolver/general_contact/s3_friction_swept_gap.py +112 -0
- anyfesolver/general_contact/s3_friction_touch.py +94 -0
- anyfesolver/general_contact/s3_friction_weak_pressure.py +66 -0
- anyfesolver/general_contact/s3_overlap_derivatives.py +220 -0
- anyfesolver/general_contact/s3_overlap_hermite_gap.py +180 -0
- anyfesolver/general_contact/s3_pair_static.py +343 -0
- anyfesolver/general_contact/s3_patch_augmented.py +2056 -0
- anyfesolver/general_contact/s3_patch_mortar_energy.py +545 -0
- anyfesolver/general_contact/s3_patch_static.py +1725 -0
- anyfesolver/general_contact/s3_pressure_hermite_bounds.py +395 -0
- anyfesolver/general_contact/s3_pressure_polygon_bounds.py +73 -0
- anyfesolver/general_contact/s3_q4_gap_resolution.py +191 -0
- anyfesolver/general_contact/s3_q4_overlap_derivatives.py +252 -0
- anyfesolver/general_contact/s3_q4_swept.py +56 -0
- anyfesolver/general_contact/s3_skin_work.py +101 -0
- anyfesolver/general_contact/s3_sliding_friction.py +640 -0
- anyfesolver/general_contact/s3_stable_plane_gap.py +43 -0
- anyfesolver/general_contact/seed_path_vertex_interval.py +323 -0
- anyfesolver/general_contact/semismooth.py +133 -0
- anyfesolver/general_contact/semismooth_block.py +147 -0
- anyfesolver/general_contact/semismooth_path.py +871 -0
- anyfesolver/general_contact/shell_pair_hermite_sweep.py +336 -0
- anyfesolver/general_contact/shell_sphere_temporal_bounds.py +305 -0
- anyfesolver/general_contact/skin_geometry.py +106 -0
- anyfesolver/general_contact/sliding.py +349 -0
- anyfesolver/general_contact/sphere.py +691 -0
- anyfesolver/general_contact/sphere_temporal_bounds.py +241 -0
- anyfesolver/general_contact/static_path.py +2608 -0
- anyfesolver/general_contact/static_results_archive.py +140 -0
- anyfesolver/general_contact/structural_state_bridge.py +196 -0
- anyfesolver/general_contact/supported_schur.py +594 -0
- anyfesolver/general_contact/swept_patch_broadphase.py +160 -0
- anyfesolver/general_contact/transient.py +2921 -0
- anyfesolver/general_contact/transient_results_archive.py +491 -0
- anyfesolver/general_contact/triangle_mortar_energy.py +280 -0
- anyfesolver/general_contact/triangle_pair_energy.py +211 -0
- anyfesolver/general_contact/triangulated_rigid.py +94 -0
- anyfesolver/general_contact/triangulated_rigid_static.py +399 -0
- anyfesolver/general_contact/warped_q4_plane.py +185 -0
- anyfesolver/general_contact/warped_q4_skin.py +302 -0
- anyfesolver/general_contact/warped_q4_static.py +331 -0
- anyfesolver/impact_performance.py +273 -0
- anyfesolver/impact_reduced_assembly.py +294 -0
- anyfesolver/imperfections.py +397 -0
- anyfesolver/inertia_relief.py +676 -0
- anyfesolver/initial_field_state.py +54 -0
- anyfesolver/jit_compiler.py +135 -0
- anyfesolver/kernel_warmup.py +228 -0
- anyfesolver/linalg.py +1002 -0
- anyfesolver/marine_contributions.py +634 -0
- anyfesolver/marine_coupled_equilibrium.py +292 -0
- anyfesolver/marine_equilibrium.py +405 -0
- anyfesolver/marine_hydro_coordinates.py +346 -0
- anyfesolver/marine_linear.py +549 -0
- anyfesolver/marine_link.py +306 -0
- anyfesolver/marine_mechanical.py +923 -0
- anyfesolver/marine_mooring.py +533 -0
- anyfesolver/marine_morison.py +331 -0
- anyfesolver/marine_potential_flow.py +403 -0
- anyfesolver/marine_rigid.py +397 -0
- anyfesolver/marine_seabed.py +122 -0
- anyfesolver/mass_properties.py +352 -0
- anyfesolver/material_curves.py +52 -0
- anyfesolver/materials.py +43 -0
- anyfesolver/matrix_assembly.py +7330 -0
- anyfesolver/mesh_gen.py +904 -0
- anyfesolver/mesh_load_bc_verification.py +612 -0
- anyfesolver/modal.py +2494 -0
- anyfesolver/nonlinear.py +341 -0
- anyfesolver/nonlinear_analysis_diagnostics.py +466 -0
- anyfesolver/nonlinear_element_evaluation.py +126 -0
- anyfesolver/nonlinear_performance.py +2094 -0
- anyfesolver/nonlinear_performance_batch_b.py +1173 -0
- anyfesolver/nonlinear_performance_batch_c.py +850 -0
- anyfesolver/nonlinear_performance_bootstrap.py +164 -0
- anyfesolver/nonlinear_reduced_assembly.py +806 -0
- anyfesolver/nonlinear_restart.py +1708 -0
- anyfesolver/nonlinear_state.py +2800 -0
- anyfesolver/nonlinear_static.py +9407 -0
- anyfesolver/outcomes.py +694 -0
- anyfesolver/plasticity.py +2087 -0
- anyfesolver/plasticity_qualification.py +758 -0
- anyfesolver/prepared_static.py +1129 -0
- anyfesolver/prepared_static_envelopes.py +389 -0
- anyfesolver/prepared_static_loads.py +1180 -0
- anyfesolver/prepared_static_measures.py +18 -0
- anyfesolver/prepared_static_numeric.py +247 -0
- anyfesolver/prepared_static_q4.py +297 -0
- anyfesolver/prepared_static_recovery.py +2068 -0
- anyfesolver/prepared_static_response.py +1013 -0
- anyfesolver/prepared_static_shared.py +226 -0
- anyfesolver/prepared_static_snapshot.py +323 -0
- anyfesolver/prepared_static_vectorized.py +866 -0
- anyfesolver/pressure_regions.py +287 -0
- anyfesolver/production_readiness.py +343 -0
- anyfesolver/quality_control.py +1487 -0
- anyfesolver/quantities.py +1289 -0
- anyfesolver/recovery.py +4217 -0
- anyfesolver/recovery_batches.py +1985 -0
- anyfesolver/recovery_policy.py +205 -0
- anyfesolver/recovery_s4.py +289 -0
- anyfesolver/recovery_shell_frames.py +102 -0
- anyfesolver/reference_cases.py +366 -0
- anyfesolver/result_capsule.py +2175 -0
- anyfesolver/results.py +752 -0
- anyfesolver/runtime.py +9819 -0
- anyfesolver/s3_reference_batch.py +1338 -0
- anyfesolver/s3_v2c_fast_assembly.py +544 -0
- anyfesolver/s3_v2d_fast_assembly.py +447 -0
- anyfesolver/s4_validity.py +354 -0
- anyfesolver/sections.py +67 -0
- anyfesolver/sesam_fem/__init__.py +55 -0
- anyfesolver/sesam_fem/__main__.py +80 -0
- anyfesolver/sesam_fem/diagnostics.py +5 -0
- anyfesolver/sesam_fem/document.py +39 -0
- anyfesolver/sesam_fem/exporter.py +9 -0
- anyfesolver/sesam_fem/importer.py +228 -0
- anyfesolver/sesam_fem/records.py +21 -0
- anyfesolver/sesam_fem/schema.py +35 -0
- anyfesolver/sesam_fem/sif_importer.py +9 -0
- anyfesolver/sesam_fem/validation.py +5 -0
- anyfesolver/sestra_deep_diagnostics.py +173 -0
- anyfesolver/sestra_mixed_verification.py +146 -0
- anyfesolver/sestra_structure_benchmarks.py +270 -0
- anyfesolver/sestra_three_case.py +215 -0
- anyfesolver/sestra_verification.py +523 -0
- anyfesolver/shell_benchmarks.py +367 -0
- anyfesolver/shell_formulations/director_field.py +799 -0
- anyfesolver/shell_formulations/geometry_provenance.py +921 -0
- anyfesolver/shell_formulations/mitc4_plus_d_quality.py +318 -0
- anyfesolver/shell_formulations/mitc4_plus_d_reference.py +837 -0
- anyfesolver/shell_formulations/mitc4_plus_d_scalar.py +209 -0
- anyfesolver/shell_formulations/protocol.py +222 -0
- anyfesolver/shell_formulations/q4_common.py +271 -0
- anyfesolver/shell_formulations/s4_restricted_policy.py +78 -0
- anyfesolver/shell_sections.py +394 -0
- anyfesolver/solid_submodel.py +930 -0
- anyfesolver/static_batch.py +662 -0
- anyfesolver/static_envelopes.py +250 -0
- anyfesolver/stiffened_shell.py +388 -0
- anyfesolver/submodel_transfer.py +1306 -0
- anyfesolver/test_cases.py +610 -0
- anyfesolver/threading_policy.py +431 -0
- anyfesolver/validation.py +719 -0
- anyfesolver/vectorized_beam.py +139 -0
- anyfesolver/vectorized_generalized_shell.py +448 -0
- anyfesolver/vectorized_hill48.py +956 -0
- anyfesolver/vectorized_nonlinear.py +360 -0
- anyfesolver/vectorized_stiffness.py +694 -0
- anyfesolver-0.5.0a1.dist-info/METADATA +374 -0
- anyfesolver-0.5.0a1.dist-info/RECORD +751 -0
- anyfesolver-0.5.0a1.dist-info/WHEEL +5 -0
- anyfesolver-0.5.0a1.dist-info/licenses/COPYRIGHT +1 -0
- anyfesolver-0.5.0a1.dist-info/licenses/LICENSE +373 -0
- anyfesolver-0.5.0a1.dist-info/licenses/THIRD_PARTY_NOTICES.md +32 -0
- anyfesolver-0.5.0a1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"""Private current-state physical-fibre spectra with explicit material policy.
|
|
2
|
+
|
|
3
|
+
This is an at-rest perturbation, not finite-velocity plastic dynamics. A last-
|
|
4
|
+
increment algorithmic tangent is an operator diagnostic, not vibration authority.
|
|
5
|
+
No state is advanced and no buckling load factor is inferred from a frequency.
|
|
6
|
+
"""
|
|
7
|
+
from dataclasses import dataclass
|
|
8
|
+
from decimal import Decimal as D, localcontext
|
|
9
|
+
from hashlib import sha256
|
|
10
|
+
from math import fsum
|
|
11
|
+
from time import monotonic
|
|
12
|
+
import json
|
|
13
|
+
import numpy as np
|
|
14
|
+
from scipy.linalg import block_diag
|
|
15
|
+
|
|
16
|
+
from ._ge_beam3_retained_fibre_state import Context
|
|
17
|
+
from ._ge_beam3_station_resultant_cell import zero, ident, mul, mv, tr, solve, cholesky, pair, dec
|
|
18
|
+
from ._ge_beam3_lifted_kinetic_factor import current_lifted_kinetic_factor
|
|
19
|
+
from ._native_factor_chain_modes import solve_factor_chain_modes
|
|
20
|
+
from ._native_reference_modal import _owned
|
|
21
|
+
from ._ge_beam3_p5_seeded.core import canonical, sha
|
|
22
|
+
from .control import cancellation_safe_point
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
FROZEN = 'FROZEN_PLASTIC_COORDINATES_ELASTIC_PERTURBATION'
|
|
26
|
+
ALGORITHMIC = 'ACCEPTED_INCREMENT_ALGORITHMIC_OPERATOR_DIAGNOSTIC'
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def compliance_factor(probe, response, origin, history, resultants, *, policy, check):
|
|
30
|
+
"""Reconstruct station tangents before the cell Legendre Schur operation.
|
|
31
|
+
|
|
32
|
+
Keep a split inverse-compliance root separate from the geometric derivative J.
|
|
33
|
+
Forming a rounded dense condensed tangent first loses high-contrast information.
|
|
34
|
+
"""
|
|
35
|
+
if policy not in (FROZEN, ALGORITHMIC): raise ValueError('explicit fibre spectral policy required')
|
|
36
|
+
cell = probe.cell; section = cell.section
|
|
37
|
+
with localcontext() as context:
|
|
38
|
+
context.prec = 80
|
|
39
|
+
committed = cell._origins(history); cell._origins(origin)
|
|
40
|
+
if (response['cell_identity'] != cell.identity or canonical(response['history']) != canonical(history)
|
|
41
|
+
or canonical(response['origin']) != canonical(origin)):
|
|
42
|
+
raise ValueError('spectral cell/history authority mismatch')
|
|
43
|
+
if policy == ALGORITHMIC and response['derivative_kind'] != 'CLASSICAL_SMOOTH_BRANCH':
|
|
44
|
+
raise ValueError('yield-boundary spectral derivative is not unique')
|
|
45
|
+
a = [list(row) for row in cell._elastic] if policy == FROZEN else zero(cell.size, cell.size)
|
|
46
|
+
load = [list(row) for row in cell.load_map]
|
|
47
|
+
if len(response['stations']) != len(cell.stations): raise ValueError('complete spectral station inventory required')
|
|
48
|
+
for j, ((_, weight, mapping, indices), fields) in enumerate(zip(cell.stations, response['stations'])):
|
|
49
|
+
check()
|
|
50
|
+
if policy == ALGORITHMIC:
|
|
51
|
+
# Independent strain-entry section evaluation; do not trust a
|
|
52
|
+
# claimed condensed compliance or a station modulus summary.
|
|
53
|
+
# Rebuild in Decimal from individual fibre laws. Converting
|
|
54
|
+
# the already summed high/low section tangent back to Decimal
|
|
55
|
+
# can lose small coupled terms before a high-contrast inverse.
|
|
56
|
+
strain = [dec(h)+dec(l) for h, l in zip(*fields['strain'])]
|
|
57
|
+
if len(strain) != 6: raise ValueError('complete station strain required')
|
|
58
|
+
modulus = [list(row) for row in section._background]
|
|
59
|
+
for fibre, (z0, p0) in zip(section.fibres, section._origins(origin.stations[j])):
|
|
60
|
+
check(); b = section._map(fibre)
|
|
61
|
+
_, et, branch = fibre.curve._return(dec(fibre.young), sum((v*e for v, e in zip(b, strain)), D(0)), z0, p0)
|
|
62
|
+
if branch in ('YIELD_BOUNDARY', 'HARDENING_KNOT'):
|
|
63
|
+
raise ValueError('yield-boundary station derivative is not unique')
|
|
64
|
+
for row in range(6):
|
|
65
|
+
for column in range(6): modulus[row][column] += dec(fibre.area)*et*b[row]*b[column]
|
|
66
|
+
block = mul(mul(tr(mapping), modulus), mapping)
|
|
67
|
+
for i, row in enumerate(indices):
|
|
68
|
+
for k, column in enumerate(indices): a[row][column] += weight*block[i][k]
|
|
69
|
+
cholesky(a)
|
|
70
|
+
c = mul(tr(load), solve(a, load, check))
|
|
71
|
+
if policy == ALGORITHMIC:
|
|
72
|
+
supplied = [[dec(h)+dec(l) for h, l in zip(row[0], row[1])] for row in response['hessian']]
|
|
73
|
+
if len(supplied) != 18 or any(len(row) != 18 for row in supplied): raise ValueError('complete cell compliance required')
|
|
74
|
+
error = max(abs(x-y) for row, other in zip(c, supplied) for x, y in zip(row, other))
|
|
75
|
+
scale = max(D(1), *(abs(x) for row in c for x in row))
|
|
76
|
+
if error > D('1e-26')*scale: raise ValueError('reconstructed station compliance differs from cell tangent')
|
|
77
|
+
# Holding *accepted* plastic strains fixed produces an affine elastic
|
|
78
|
+
# problem. A virgin tangent is correct only together with this offset.
|
|
79
|
+
p = [dec(float(v)) for v in resultants]
|
|
80
|
+
if len(p) != 18: raise ValueError('eighteen retained resultants required')
|
|
81
|
+
predictor = mv(load, p)
|
|
82
|
+
for (_, weight, mapping, indices), station in zip(cell.stations, committed):
|
|
83
|
+
stress_offset = [D(0)]*6
|
|
84
|
+
for fibre, (z, _) in zip(section.fibres, station):
|
|
85
|
+
for i, b in enumerate(section._map(fibre)):
|
|
86
|
+
stress_offset[i] += dec(fibre.area)*dec(fibre.young)*z*b
|
|
87
|
+
for i, value in zip(indices, mv(tr(mapping), stress_offset)): predictor[i] += weight*value
|
|
88
|
+
x = [row[0] for row in solve([list(row) for row in cell._elastic], [[v] for v in predictor], check)]
|
|
89
|
+
gh, gl = pair(mv(tr(load), x)); supplied_hi, supplied_lo = response['gradient']
|
|
90
|
+
if len(supplied_hi) != 18 or len(supplied_lo) != 18: raise ValueError('complete cell gradient required')
|
|
91
|
+
error = max(abs(fsum((h, l, -s, -t))) for h, l, s, t in zip(gh, gl, supplied_hi, supplied_lo))
|
|
92
|
+
if error > 1e-11: raise ValueError('frozen fibre history is not the accepted stationary base')
|
|
93
|
+
root = cholesky(c); factor = solve(root, ident(18), check)
|
|
94
|
+
inverse_error = max(abs(x-D(i == j)) for i, row in enumerate(mul(mul(tr(factor), factor), c)) for j, x in enumerate(row))
|
|
95
|
+
if inverse_error > D('1e-35'): raise ValueError('fibre compliance inverse-factor identity')
|
|
96
|
+
parts = [pair(row) for row in factor]; check()
|
|
97
|
+
return _owned(np.column_stack(([row[0] for row in parts], [row[1] for row in parts])))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@dataclass(frozen=True)
|
|
101
|
+
class Packet:
|
|
102
|
+
left: np.ndarray
|
|
103
|
+
right: np.ndarray
|
|
104
|
+
geometric: np.ndarray
|
|
105
|
+
kinetic: np.ndarray
|
|
106
|
+
free: tuple
|
|
107
|
+
algebraic: tuple
|
|
108
|
+
identity: str
|
|
109
|
+
material_policy: str
|
|
110
|
+
production_qualified: bool = False
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def prepare(model, program, checkpoint, section_inertias, *, material_policy, cancellation_token=None):
|
|
114
|
+
if material_policy not in (FROZEN, ALGORITHMIC): raise ValueError('explicit fibre spectral policy required')
|
|
115
|
+
started = monotonic()
|
|
116
|
+
def local_check():
|
|
117
|
+
cancellation_safe_point(cancellation_token, 'retained-fibre-modes.construct')
|
|
118
|
+
if monotonic()-started > 120.: raise TimeoutError('fibre spectral construction deadline')
|
|
119
|
+
local_check()
|
|
120
|
+
if type(checkpoint) is not bytes: raise ValueError('immutable canonical fibre checkpoint required')
|
|
121
|
+
context = Context(model, program, check=local_check); state, _ = context.restore(checkpoint)
|
|
122
|
+
def guard():
|
|
123
|
+
local_check(); context.guard()
|
|
124
|
+
layout = context.layout; n = layout.nodal_count+6*len(context.probes)
|
|
125
|
+
if n > 80: raise ValueError('small fibre spectral correctness model only')
|
|
126
|
+
if (type(section_inertias) is not dict or any(type(i) is not int for i in section_inertias)
|
|
127
|
+
or set(section_inertias) != {i for i, _ in layout.elements}):
|
|
128
|
+
raise ValueError('one explicit section inertia per element')
|
|
129
|
+
inertias = {i: _owned(value) for i, value in section_inertias.items()}
|
|
130
|
+
g = np.zeros((n, n)); lefts = []; rights = []; kinetics = []
|
|
131
|
+
mechanical = state.mechanical
|
|
132
|
+
for index, ((eid, element), probe) in enumerate(zip(layout.elements, context.probes)):
|
|
133
|
+
guard(); nodes = layout.nodes[index]
|
|
134
|
+
response = probe.evaluate(mechanical.positions[nodes], mechanical.position_low[nodes],
|
|
135
|
+
mechanical.nodal_frames[nodes], mechanical.cell_rotations[index], mechanical.resultants[index],
|
|
136
|
+
origin=state.origins[index], check=local_check)
|
|
137
|
+
left = compliance_factor(probe, json.loads(response.material), state.origins[index], state.histories[index],
|
|
138
|
+
mechanical.resultants[index], policy=material_policy, check=local_check)
|
|
139
|
+
slots = list(element.get_dof_mapping(model.mesh))+list(range(layout.nodal_count+6*index, layout.nodal_count+6*index+6))
|
|
140
|
+
j = response.hessian[24:, :24]; right = np.zeros((36, n)); right[:, slots] = np.vstack((j, j))
|
|
141
|
+
g[np.ix_(slots, slots)] += response.hessian[:24, :24]
|
|
142
|
+
local = current_lifted_kinetic_factor(probe.reference, inertias[eid], mechanical.cell_rotations[index], order=probe.order)
|
|
143
|
+
kinetic = np.zeros((len(local), n)); kinetic[:, slots] = local
|
|
144
|
+
lefts.append(left); rights.append(right); kinetics.append(kinetic)
|
|
145
|
+
nodal_free = tuple(i for i in range(layout.nodal_count) if i not in layout.fixed)
|
|
146
|
+
free = nodal_free+tuple(range(layout.nodal_count, n))
|
|
147
|
+
algebraic = tuple(i for i in nodal_free if i % 6 >= 3)
|
|
148
|
+
left, right, kinetic = block_diag(*lefts), np.vstack(rights), np.vstack(kinetics)
|
|
149
|
+
if np.any(kinetic[:, algebraic]): raise ValueError('nodal rotation traces must have zero inertia')
|
|
150
|
+
identity = sha(dict(checkpoint_sha256=sha256(checkpoint).hexdigest(), material_policy=material_policy,
|
|
151
|
+
operators=[probe.identity for probe in context.probes], left=left, right=right, geometric=g,
|
|
152
|
+
kinetic=kinetic, free=free, algebraic=algebraic, inertias=inertias))
|
|
153
|
+
guard()
|
|
154
|
+
return Packet(_owned(left), _owned(right), _owned(g), _owned(kinetic), free, algebraic, identity, material_policy), guard
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
@dataclass(frozen=True)
|
|
158
|
+
class Analysis:
|
|
159
|
+
material_policy: str
|
|
160
|
+
interpretation: str
|
|
161
|
+
eigenvalues: np.ndarray
|
|
162
|
+
full_modes: np.ndarray
|
|
163
|
+
numerical_brackets: np.ndarray
|
|
164
|
+
spectral_residual: float
|
|
165
|
+
original_ritz_residual: float
|
|
166
|
+
full_backward_residual: float
|
|
167
|
+
operator_identity: str
|
|
168
|
+
checkpoint_sha256: str
|
|
169
|
+
mass_policy: str = 'CURRENT_LIFTED_KINETIC_FIELD_LINEARIZED_AT_REST'
|
|
170
|
+
state_advanced: bool = False
|
|
171
|
+
negative_eigenvalues_retained: bool = True
|
|
172
|
+
certified_intervals: bool = False
|
|
173
|
+
buckling_factor_authorized: bool = False
|
|
174
|
+
production_qualified: bool = False
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def solve_modes(model, program, checkpoint, section_inertias, *, material_policy,
|
|
178
|
+
bounds, num_modes=6, root_width=1e-10, cancellation_token=None):
|
|
179
|
+
packet, guard = prepare(model, program, checkpoint, section_inertias,
|
|
180
|
+
material_policy=material_policy, cancellation_token=cancellation_token)
|
|
181
|
+
modes = solve_factor_chain_modes(packet.left, packet.right, packet.geometric, packet.kinetic,
|
|
182
|
+
packet.free, packet.algebraic, bounds=bounds, num_modes=num_modes, root_width=root_width,
|
|
183
|
+
cancellation_token=cancellation_token)
|
|
184
|
+
guard()
|
|
185
|
+
interpretation = ('ELASTIC_PERTURBATIONS_WITH_PLASTIC_COORDINATES_FIXED' if material_policy == FROZEN
|
|
186
|
+
else 'LAST_INCREMENT_OPERATOR_ONLY_NOT_PHYSICAL_VIBRATION_AUTHORITY')
|
|
187
|
+
return packet, Analysis(material_policy, interpretation, modes.eigenvalues, modes.full_modes,
|
|
188
|
+
modes.numerical_brackets, modes.spectral_residual, modes.original_ritz_residual,
|
|
189
|
+
modes.full_backward_residual, packet.identity, sha256(checkpoint).hexdigest())
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""Private retained physical-fibre force controller; no public registration."""
|
|
2
|
+
from dataclasses import dataclass
|
|
3
|
+
from time import monotonic
|
|
4
|
+
import numpy as np
|
|
5
|
+
from .control import cancellation_safe_point, SolveCancelled
|
|
6
|
+
from ._ge_beam3_retained_fibre_state import Context, State
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass(frozen=True)
|
|
10
|
+
class Result:
|
|
11
|
+
status: str
|
|
12
|
+
completed_targets: int
|
|
13
|
+
state: State
|
|
14
|
+
checkpoint: bytes
|
|
15
|
+
failure: str | None
|
|
16
|
+
production_qualified: bool = False
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def solve_force_program(model, program, *, checkpoint=None, expected_checkpoint_sha256=None,
|
|
20
|
+
stop_after=None, cancellation_token=None, progress=None):
|
|
21
|
+
started = monotonic(); cancellation_safe_point(cancellation_token, 'retained-fibre.start')
|
|
22
|
+
context = Context(model, program, check=lambda: cancellation_safe_point(cancellation_token, 'retained-fibre.material'))
|
|
23
|
+
layout = context.layout; end = len(program.targets) if stop_after is None else stop_after
|
|
24
|
+
if type(end) is not int or not 0 <= end <= len(program.targets): raise ValueError('bounded fibre stop target')
|
|
25
|
+
if progress is not None and not callable(progress): raise ValueError('callable fibre observer required')
|
|
26
|
+
if checkpoint is None:
|
|
27
|
+
if expected_checkpoint_sha256 is not None: raise ValueError('external hash requires a fibre checkpoint')
|
|
28
|
+
accepted, records = context.initial, (); capsule = context.checkpoint(records)
|
|
29
|
+
else:
|
|
30
|
+
accepted, records = context.restore(checkpoint, expected_sha256=expected_checkpoint_sha256); capsule = checkpoint
|
|
31
|
+
if accepted.completed_targets > end: raise ValueError('cannot rewind accepted fibre history')
|
|
32
|
+
status = 'completed' if end == len(program.targets) else 'paused'; failure = None
|
|
33
|
+
def safe(stage, target, iteration=0):
|
|
34
|
+
cancellation_safe_point(cancellation_token, stage)
|
|
35
|
+
if monotonic()-started > 120.: raise RuntimeError('retained fibre controller cooperative deadline')
|
|
36
|
+
context.guard()
|
|
37
|
+
if progress is not None: progress(dict(stage=stage, target=target, iteration=iteration))
|
|
38
|
+
context.guard(); cancellation_safe_point(cancellation_token, stage)
|
|
39
|
+
try:
|
|
40
|
+
safe('retained-fibre.initialized', accepted.completed_targets)
|
|
41
|
+
for index in range(accepted.completed_targets, end):
|
|
42
|
+
target = program.targets[index]; trial = accepted.mechanical; origins = accepted.histories
|
|
43
|
+
for iteration in range(program.max_iterations+1):
|
|
44
|
+
safe('retained-fibre.before_assembly', index+1, iteration)
|
|
45
|
+
residual, hessian, metrics, _ = context.assemble(trial, target, origins)
|
|
46
|
+
if max(metrics) <= 1e-11:
|
|
47
|
+
proposed, record = context.stage(trial, accepted, records, iteration)
|
|
48
|
+
next_records = (*records, record); staged = context.checkpoint(next_records)
|
|
49
|
+
safe('retained-fibre.before_commit', index+1, iteration)
|
|
50
|
+
accepted, records, capsule = proposed, next_records, staged
|
|
51
|
+
safe('retained-fibre.committed', accepted.completed_targets, iteration)
|
|
52
|
+
break
|
|
53
|
+
if iteration == program.max_iterations: raise RuntimeError('retained fibre Newton limit')
|
|
54
|
+
safe('retained-fibre.before_factorization', index+1, iteration)
|
|
55
|
+
step = np.zeros(layout.count)
|
|
56
|
+
step[layout.free] = np.linalg.solve(hessian[np.ix_(layout.free, layout.free)], -residual[layout.free])
|
|
57
|
+
if not np.isfinite(step).all(): raise ValueError('nonfinite retained fibre Newton step')
|
|
58
|
+
for cut in range(program.max_backtracks+1):
|
|
59
|
+
safe('retained-fibre.before_trial', index+1, iteration)
|
|
60
|
+
candidate = layout.advance(trial, step*(.5**cut))
|
|
61
|
+
_, _, changed, _ = context.assemble(candidate, target, origins)
|
|
62
|
+
if max(changed) < max(metrics): trial = candidate; break
|
|
63
|
+
else: raise RuntimeError('retained fibre line search limit')
|
|
64
|
+
except SolveCancelled as error:
|
|
65
|
+
status, failure = 'cancelled', str(error)
|
|
66
|
+
except Exception as error:
|
|
67
|
+
status, failure = 'failed', type(error).__name__+': '+str(error)
|
|
68
|
+
return Result(status, accepted.completed_targets, accepted, capsule, failure)
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
"""Private FEModel-bound physical-fibre transactions, replay and recovery.
|
|
2
|
+
|
|
3
|
+
Only geometric make/advance operations are reused from the older retained
|
|
4
|
+
layout. No old element, section, assembly, recovery or state capsule is used.
|
|
5
|
+
"""
|
|
6
|
+
from dataclasses import dataclass
|
|
7
|
+
from decimal import localcontext
|
|
8
|
+
from hashlib import sha256
|
|
9
|
+
from time import monotonic
|
|
10
|
+
import numpy as np
|
|
11
|
+
from scipy import sparse
|
|
12
|
+
|
|
13
|
+
from .assembly import build_constraint_transformation
|
|
14
|
+
from ._ge_beam3_retained_state import Context as GeometricOperations, State as MechanicalState
|
|
15
|
+
from ._ge_beam3_seeded_load_program import ForceProgram
|
|
16
|
+
from ._ge_beam3_retained_fibre_element import NativeRetainedFibreElement
|
|
17
|
+
from ._ge_beam3_retained_fibre import POLICY
|
|
18
|
+
from ._ge_beam3_fibre_cell import CellHistory
|
|
19
|
+
from ._ge_beam3_fibre_section import FibreHistory
|
|
20
|
+
from ._ge_beam3_spatial_nodal_moments import SpatialNodalMoments
|
|
21
|
+
from ._native_reference_modal import _owned
|
|
22
|
+
from ._ge_beam3_p5_seeded.core import canonical, sha
|
|
23
|
+
from ._ge_beam3_p5_seeded.codec import _load, MAX_BYTES
|
|
24
|
+
from ._ge_beam3_effective_deadline import effective_deadline_seconds
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
SCHEMA = 'GE_BEAM3_RETAINED_PHYSICAL_FIBRE_ACCEPTED_CHAIN_V1'
|
|
28
|
+
PROGRAM = 'GE_BEAM3_RETAINED_PHYSICAL_FIBRE_FORCE_PROGRAM_V1'
|
|
29
|
+
# The original default remains unchanged. The separately selected 512-coordinate
|
|
30
|
+
# budget bounds one binary64 square workspace to 2 MiB (not total process RSS).
|
|
31
|
+
MAX_RETAINED_COORDINATES = 256
|
|
32
|
+
ADMITTED_DENSE_COORDINATE_BUDGETS = (256, 512)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class Layout:
|
|
36
|
+
make = GeometricOperations.make
|
|
37
|
+
advance = GeometricOperations.advance
|
|
38
|
+
|
|
39
|
+
def __init__(self, model, program, *, max_coordinates=MAX_RETAINED_COORDINATES, nodal_moments=None):
|
|
40
|
+
if type(program) is not ForceProgram or any(type(x) is not float for x in program.targets):
|
|
41
|
+
raise ValueError('explicit binary64 retained fibre force program required')
|
|
42
|
+
self.model, self.program = model, program
|
|
43
|
+
if type(max_coordinates) is not int or max_coordinates not in ADMITTED_DENSE_COORDINATE_BUDGETS:
|
|
44
|
+
raise ValueError('explicit admitted dense coordinate budget required')
|
|
45
|
+
self.max_coordinates = max_coordinates
|
|
46
|
+
if nodal_moments is not None and type(nodal_moments) is not SpatialNodalMoments:
|
|
47
|
+
raise ValueError('exact explicit spatial nodal moment pattern required')
|
|
48
|
+
self.nodal_moments = nodal_moments
|
|
49
|
+
self.elements = tuple(sorted(model.mesh.elements.items()))
|
|
50
|
+
self.nodal_count = model.mesh.dof_manager.total_dofs
|
|
51
|
+
self.count = self.nodal_count+24*len(self.elements)
|
|
52
|
+
if not self.elements or not 1 <= self.count <= self.max_coordinates:
|
|
53
|
+
raise ValueError('bounded standalone retained fibre model required')
|
|
54
|
+
if any(type(e) is not NativeRetainedFibreElement for _, e in self.elements):
|
|
55
|
+
raise ValueError('exact retained fibre elements only; mixed formulations/joints are not admitted')
|
|
56
|
+
self.node_ids = tuple(sorted(model.mesh.nodes, key=lambda i: model.mesh.dof_manager.get_node_dofs(i)[0]))
|
|
57
|
+
if self.nodal_count != 6*len(self.node_ids): raise ValueError('complete six-DOF nodes required')
|
|
58
|
+
for i, node in enumerate(self.node_ids):
|
|
59
|
+
if type(node) is not int or tuple(model.mesh.dof_manager.get_node_dofs(node)) != tuple(range(6*i, 6*i+6)):
|
|
60
|
+
raise ValueError('exact contiguous six-DOF node blocks required')
|
|
61
|
+
_, _, transform, offset, free, info = build_constraint_transformation(
|
|
62
|
+
sparse.eye(self.nodal_count, format='csr'), np.zeros(self.nodal_count), model)
|
|
63
|
+
if (info['slave_dofs'] or np.any(offset) or len(free) == self.nodal_count
|
|
64
|
+
or transform.nnz != len(free) or np.any(transform.data != 1.)):
|
|
65
|
+
raise ValueError('homogeneous supported standalone model without MPCs required')
|
|
66
|
+
self.fixed = sorted(set(range(self.nodal_count))-set(free))
|
|
67
|
+
for i in range(len(self.node_ids)):
|
|
68
|
+
if len(set(range(6*i+3, 6*i+6)) & set(self.fixed)) not in (0, 3):
|
|
69
|
+
raise ValueError('partial rotation supports require a qualified constraint contract')
|
|
70
|
+
self.node_index = {node: i for i, node in enumerate(self.node_ids)}
|
|
71
|
+
self.force = np.zeros(self.nodal_count)
|
|
72
|
+
for node, *force in program.nodal_forces:
|
|
73
|
+
if node not in self.node_index: raise ValueError('force references an absent fibre node')
|
|
74
|
+
i = self.node_index[node]; self.force[6*i:6*i+3] = force
|
|
75
|
+
if nodal_moments is not None:
|
|
76
|
+
for node, *moment in nodal_moments.rows:
|
|
77
|
+
if node not in self.node_index: raise ValueError('moment references an absent fibre node')
|
|
78
|
+
i = self.node_index[node]; self.force[6*i+3:6*i+6] = moment
|
|
79
|
+
self.force = _owned(self.force)
|
|
80
|
+
self.probes = tuple(e.operator for _, e in self.elements)
|
|
81
|
+
self.free = [int(v) for v in free]+list(range(self.nodal_count, self.count))
|
|
82
|
+
self.equilibrium = [int(v) for v in free]; self.compatibility = []; self.slots = []; self.nodes = []
|
|
83
|
+
self.scales = np.ones(self.count); frames = [None]*len(self.node_ids)
|
|
84
|
+
length = max(float(np.linalg.norm(p.reference.coordinates[-1]-p.reference.coordinates[0])) for p in self.probes)
|
|
85
|
+
if not np.isfinite(length) or length <= 0: raise ValueError('positive characteristic beam length required')
|
|
86
|
+
for i in range(len(frames)): self.scales[6*i+3:6*i+6] = length
|
|
87
|
+
for i, (_, element) in enumerate(self.elements):
|
|
88
|
+
first = self.nodal_count+24*i; nodes = [self.node_index[node] for node in element.node_ids]
|
|
89
|
+
self.nodes.append(nodes)
|
|
90
|
+
self.slots.append(list(element.get_dof_mapping(model.mesh))+list(range(first, first+24)))
|
|
91
|
+
self.equilibrium.extend(range(first, first+6)); self.compatibility.extend(range(first+6, first+24))
|
|
92
|
+
self.scales[first:first+12] = length
|
|
93
|
+
for local, node in enumerate(nodes):
|
|
94
|
+
frame = element.operator.reference.nodal_triads[local]
|
|
95
|
+
if frames[node] is not None and not np.array_equal(frames[node], frame):
|
|
96
|
+
raise ValueError('shared-node physical material-frame authority differs')
|
|
97
|
+
frames[node] = frame
|
|
98
|
+
if any(frame is None for frame in frames): raise ValueError('unconnected fibre node not admitted')
|
|
99
|
+
self.reference_positions = _owned([model.mesh.nodes[i].coords() for i in self.node_ids])
|
|
100
|
+
self.reference_frames = _owned(frames)
|
|
101
|
+
self.identity = self.snapshot()
|
|
102
|
+
self.initial = self.make(dict(positions=self.reference_positions, position_low=np.zeros_like(self.reference_positions),
|
|
103
|
+
nodal_frames=self.reference_frames, cell_rotations=np.tile(np.eye(3), (len(self.elements), 2, 1, 1)),
|
|
104
|
+
resultants=np.zeros((len(self.elements), 18))))
|
|
105
|
+
self.guard()
|
|
106
|
+
|
|
107
|
+
def snapshot(self):
|
|
108
|
+
model = self.model
|
|
109
|
+
if (tuple(sorted(model.mesh.elements.items())) != self.elements or model.mesh.element_activity is not None
|
|
110
|
+
or model.constraint_equations or model.mesh.point_masses):
|
|
111
|
+
raise ValueError('retained fibre ownership/activity/constraint mismatch')
|
|
112
|
+
for element_id, element in self.elements:
|
|
113
|
+
element.check(model.mesh)
|
|
114
|
+
if element_id != element.element_id or model.materials.get(element.material_name) is not element.section:
|
|
115
|
+
raise ValueError('retained fibre section/model ownership changed')
|
|
116
|
+
return sha(dict(elements=[(i, e.to_dict(), list(e.get_dof_mapping(model.mesh))) for i, e in self.elements],
|
|
117
|
+
nodes=[(i, node.coords()) for i, node in sorted(model.mesh.nodes.items())],
|
|
118
|
+
boundaries=[vars(bc) for bc in model.boundary_conditions], dofs=model.mesh.dof_manager.total_dofs,
|
|
119
|
+
constrained_dofs=sorted(model.mesh.dof_manager._constrained_dofs), program=self.program.descriptor(),
|
|
120
|
+
**({'dense_coordinate_budget': self.max_coordinates} if self.max_coordinates != 256 else {}),
|
|
121
|
+
**({'nodal_moments': self.nodal_moments.descriptor()} if self.nodal_moments is not None else {})))
|
|
122
|
+
|
|
123
|
+
def guard(self):
|
|
124
|
+
if self.snapshot() != self.identity: raise ValueError('retained fibre frozen model/program changed')
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
@dataclass(frozen=True)
|
|
128
|
+
class State:
|
|
129
|
+
mechanical: MechanicalState
|
|
130
|
+
origins: tuple
|
|
131
|
+
histories: tuple
|
|
132
|
+
completed_targets: int
|
|
133
|
+
model_sha256: str
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class Context:
|
|
137
|
+
def __init__(self, model, program, *, check=None, max_coordinates=MAX_RETAINED_COORDINATES, nodal_moments=None):
|
|
138
|
+
self.started = monotonic(); self.external_check = check
|
|
139
|
+
moment_options = {} if nodal_moments is None else dict(nodal_moments=nodal_moments)
|
|
140
|
+
self.layout = Layout(model, program, max_coordinates=max_coordinates, **moment_options); self.program = program; self.probes = self.layout.probes
|
|
141
|
+
self.program_data = {**program.descriptor(), 'schema': PROGRAM,
|
|
142
|
+
'line_search': 'RETAINED_EQUILIBRIUM_COMPATIBILITY_RESIDUAL_DECREASE_V1',
|
|
143
|
+
**({'nodal_moments': nodal_moments.descriptor()} if nodal_moments is not None else {})}
|
|
144
|
+
self.identity = sha(dict(formulation_id=POLICY, captured_model=self.layout.identity,
|
|
145
|
+
operator_ids=[p.identity for p in self.probes], program=self.program_data, state_schema=SCHEMA))
|
|
146
|
+
histories = tuple(p.cell.virgin() for p in self.probes)
|
|
147
|
+
self.initial = State(self.layout.initial, histories, histories, 0, self.identity)
|
|
148
|
+
self.genesis = self._record(self.initial.mechanical, histories, 0, 0, self.identity)[1]
|
|
149
|
+
self.guard()
|
|
150
|
+
|
|
151
|
+
def check(self):
|
|
152
|
+
if self.external_check is not None: self.external_check()
|
|
153
|
+
if monotonic()-self.started > effective_deadline_seconds(120.): raise RuntimeError('retained fibre context cooperative deadline')
|
|
154
|
+
|
|
155
|
+
def guard(self):
|
|
156
|
+
self.check(); self.layout.guard()
|
|
157
|
+
for probe in self.probes: probe.guard()
|
|
158
|
+
|
|
159
|
+
def history(self, values, *, decoded=False):
|
|
160
|
+
if type(values) not in (list, tuple) or len(values) != len(self.probes):
|
|
161
|
+
raise ValueError('one complete cell fibre history per element required')
|
|
162
|
+
result = []
|
|
163
|
+
with localcontext() as context:
|
|
164
|
+
context.prec = 80
|
|
165
|
+
for value, probe in zip(values, self.probes):
|
|
166
|
+
if decoded:
|
|
167
|
+
if type(value) is not dict or set(value) != {'cell_identity', 'stations'} or type(value['stations']) is not list:
|
|
168
|
+
raise ValueError('exact decoded fibre cell history schema')
|
|
169
|
+
stations = []
|
|
170
|
+
for row in value['stations']:
|
|
171
|
+
if (type(row) is not dict or set(row) != {'section_identity', 'rows'} or type(row['rows']) is not list
|
|
172
|
+
or any(type(r) is not list for r in row['rows'])):
|
|
173
|
+
raise ValueError('exact decoded station fibre history schema')
|
|
174
|
+
stations.append(FibreHistory(row['section_identity'], tuple(map(tuple, row['rows']))))
|
|
175
|
+
value = CellHistory(value['cell_identity'], tuple(stations))
|
|
176
|
+
probe.cell._origins(value); result.append(value)
|
|
177
|
+
return tuple(result)
|
|
178
|
+
|
|
179
|
+
def assemble(self, mechanical, parameter, origins):
|
|
180
|
+
self.guard(); layout = self.layout; origins = self.history(origins)
|
|
181
|
+
residual = np.zeros(layout.count); hessian = np.zeros((layout.count, layout.count)); responses = []
|
|
182
|
+
for i, probe in enumerate(self.probes):
|
|
183
|
+
nodes = layout.nodes[i]
|
|
184
|
+
response = probe.evaluate(mechanical.positions[nodes], mechanical.position_low[nodes], mechanical.nodal_frames[nodes],
|
|
185
|
+
mechanical.cell_rotations[i], mechanical.resultants[i], origin=origins[i], check=self.check)
|
|
186
|
+
residual[layout.slots[i]] += response.residual
|
|
187
|
+
hessian[np.ix_(layout.slots[i], layout.slots[i])] += response.hessian+response.hessian_low
|
|
188
|
+
responses.append(response)
|
|
189
|
+
residual[:layout.nodal_count] -= parameter*layout.force
|
|
190
|
+
scaled = residual/layout.scales
|
|
191
|
+
metrics = (float(np.linalg.norm(scaled[layout.equilibrium])), float(np.linalg.norm(scaled[layout.compatibility])))
|
|
192
|
+
self.guard(); return residual, hessian, metrics, tuple(responses)
|
|
193
|
+
|
|
194
|
+
def recover(self, state):
|
|
195
|
+
if type(state) is not State or state.model_sha256 != self.identity: raise ValueError('fibre recovery state/model binding')
|
|
196
|
+
self.guard(); rows = []
|
|
197
|
+
origins = self.history(state.origins); histories = self.history(state.histories)
|
|
198
|
+
for i, ((element_id, _), probe) in enumerate(zip(self.layout.elements, self.probes)):
|
|
199
|
+
stations = probe.recover(state.mechanical.cell_rotations[i], state.mechanical.resultants[i], origin=origins[i], check=self.check)
|
|
200
|
+
made = CellHistory(probe.cell.identity, tuple(row['history'] for row in stations))
|
|
201
|
+
if canonical(made) != canonical(histories[i]): raise ValueError('physical fibre recovery does not reproduce accepted history')
|
|
202
|
+
rows.append(dict(element_id=element_id, stations=stations))
|
|
203
|
+
self.guard(); return tuple(rows)
|
|
204
|
+
|
|
205
|
+
def _record(self, mechanical, origins, cursor, iterations, previous):
|
|
206
|
+
if type(cursor) is not int or not 0 <= cursor <= len(self.program.targets): raise ValueError('fibre target cursor')
|
|
207
|
+
if type(iterations) is not int or not 0 <= iterations <= self.program.max_iterations: raise ValueError('fibre iteration record')
|
|
208
|
+
parameter = 0. if cursor == 0 else self.program.targets[cursor-1]
|
|
209
|
+
mechanical = self.layout.make(mechanical.descriptor()); origins = self.history(origins)
|
|
210
|
+
residual, _, metrics, responses = self.assemble(mechanical, parameter, origins)
|
|
211
|
+
if max(metrics) > 1e-11: raise ValueError('only equilibrated compatible fibre states may commit')
|
|
212
|
+
histories = self.history(tuple(r.history for r in responses))
|
|
213
|
+
state = State(mechanical, origins, histories, cursor, self.identity)
|
|
214
|
+
body = dict(target=cursor, parameter=parameter, iterations=iterations, previous_sha256=previous,
|
|
215
|
+
mechanical=mechanical.descriptor(), origins=origins, histories=histories, residual=residual, metrics=metrics,
|
|
216
|
+
material_sha256=sha([r.material.decode('ascii') for r in responses]), recovery_sha256=sha(self.recover(state)))
|
|
217
|
+
self.guard(); return state, canonical({**body, 'record_sha256': sha(body)})
|
|
218
|
+
|
|
219
|
+
def stage(self, mechanical, accepted, records, iterations):
|
|
220
|
+
if type(accepted) is not State or accepted.model_sha256 != self.identity or accepted.completed_targets != len(records):
|
|
221
|
+
raise ValueError('fibre accepted cursor differs from chain')
|
|
222
|
+
previous = _load((self.genesis if not records else records[-1]).decode('ascii'))['record_sha256']
|
|
223
|
+
return self._record(mechanical, accepted.histories, len(records)+1, iterations, previous)
|
|
224
|
+
|
|
225
|
+
def checkpoint(self, records):
|
|
226
|
+
if type(records) is not tuple or len(records) > len(self.program.targets): raise ValueError('bounded immutable fibre chain required')
|
|
227
|
+
body = dict(schema=SCHEMA, formulation_id=POLICY, model_sha256=self.identity, program=self.program_data,
|
|
228
|
+
node_ids=self.layout.node_ids, element_ids=[i for i, _ in self.layout.elements], completed_targets=len(records),
|
|
229
|
+
initial=_load(self.genesis.decode('ascii')), records=[_load(row.decode('ascii')) for row in records])
|
|
230
|
+
raw = canonical({**body, 'checkpoint_sha256': sha(body)})
|
|
231
|
+
if len(raw) > MAX_BYTES: raise ValueError('fibre checkpoint byte bound')
|
|
232
|
+
self.guard(); return raw
|
|
233
|
+
|
|
234
|
+
def restore(self, raw, *, expected_sha256=None):
|
|
235
|
+
self.guard()
|
|
236
|
+
if type(raw) is not bytes: raise ValueError('canonical fibre checkpoint bytes required')
|
|
237
|
+
if expected_sha256 is not None and (type(expected_sha256) is not str or sha256(raw).hexdigest() != expected_sha256):
|
|
238
|
+
raise ValueError('external fibre checkpoint hash mismatch')
|
|
239
|
+
value = _load(raw.decode('ascii'))
|
|
240
|
+
keys = {'schema', 'formulation_id', 'model_sha256', 'program', 'node_ids', 'element_ids',
|
|
241
|
+
'completed_targets', 'initial', 'records', 'checkpoint_sha256'}
|
|
242
|
+
if type(value) is not dict or set(value) != keys: raise ValueError('exact fibre checkpoint schema')
|
|
243
|
+
body = {key: member for key, member in value.items() if key != 'checkpoint_sha256'}
|
|
244
|
+
if (value['schema'] != SCHEMA or value['formulation_id'] != POLICY or value['model_sha256'] != self.identity
|
|
245
|
+
or value['checkpoint_sha256'] != sha(body) or canonical(value['program']) != canonical(self.program_data)
|
|
246
|
+
or canonical(value['node_ids']) != canonical(self.layout.node_ids)
|
|
247
|
+
or canonical(value['element_ids']) != canonical([i for i, _ in self.layout.elements])):
|
|
248
|
+
raise ValueError('fibre checkpoint model/program/formulation binding')
|
|
249
|
+
cursor = value['completed_targets']
|
|
250
|
+
if type(cursor) is not int or not 0 <= cursor <= len(self.program.targets): raise ValueError('fibre checkpoint cursor')
|
|
251
|
+
if type(value['records']) is not list or len(value['records']) != cursor: raise ValueError('fibre checkpoint record count')
|
|
252
|
+
if canonical(value['initial']) != self.genesis: raise ValueError('fibre virgin genesis differs')
|
|
253
|
+
accepted = self.initial; records = ()
|
|
254
|
+
record_keys = {'target', 'parameter', 'iterations', 'previous_sha256', 'mechanical', 'origins', 'histories',
|
|
255
|
+
'residual', 'metrics', 'material_sha256', 'recovery_sha256', 'record_sha256'}
|
|
256
|
+
for index, row in enumerate(value['records'], 1):
|
|
257
|
+
self.guard()
|
|
258
|
+
if (type(row) is not dict or set(row) != record_keys or type(row['target']) is not int or row['target'] != index
|
|
259
|
+
or type(row['parameter']) is not float or row['parameter'] != self.program.targets[index-1]):
|
|
260
|
+
raise ValueError('fibre checkpoint target record')
|
|
261
|
+
origins = self.history(row['origins'], decoded=True); self.history(row['histories'], decoded=True)
|
|
262
|
+
if canonical(origins) != canonical(accepted.histories): raise ValueError('fibre origin chain is broken')
|
|
263
|
+
mechanical = self.layout.make(row['mechanical'], decoded=True)
|
|
264
|
+
proposed, regenerated = self.stage(mechanical, accepted, records, row['iterations'])
|
|
265
|
+
if regenerated != canonical(row): raise ValueError('fibre state/reaction/recovery/history replay mismatch')
|
|
266
|
+
accepted, records = proposed, (*records, regenerated)
|
|
267
|
+
if self.checkpoint(records) != raw: raise ValueError('fibre canonical replay mismatch')
|
|
268
|
+
self.guard(); return accepted, records
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""Private transactional retained-resultant force controller; no public routing."""
|
|
2
|
+
from dataclasses import dataclass
|
|
3
|
+
from time import monotonic
|
|
4
|
+
import numpy as np
|
|
5
|
+
from anyfesolver.control import cancellation_safe_point, SolveCancelled
|
|
6
|
+
from anyfesolver._ge_beam3_seeded_load_program import ForceProgram
|
|
7
|
+
from anyfesolver._ge_beam3_retained_state import Context, State
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass(frozen=True)
|
|
11
|
+
class Result:
|
|
12
|
+
status: str
|
|
13
|
+
completed_targets: int
|
|
14
|
+
state: State
|
|
15
|
+
checkpoint: bytes
|
|
16
|
+
failure: str | None
|
|
17
|
+
production_qualified: bool = False
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def solve_force_program(model, program, *, checkpoint=None, stop_after=None,
|
|
21
|
+
cancellation_token=None, progress=None):
|
|
22
|
+
started = monotonic()
|
|
23
|
+
cancellation_safe_point(cancellation_token, 'retained.start')
|
|
24
|
+
context = Context(model, program)
|
|
25
|
+
end = len(program.targets) if stop_after is None else stop_after
|
|
26
|
+
if type(end) is not int or not 0 <= end <= len(program.targets): raise ValueError('bounded retained stop target')
|
|
27
|
+
if progress is not None and not callable(progress): raise ValueError('callable retained observer required')
|
|
28
|
+
if checkpoint is None:
|
|
29
|
+
accepted = context.initial; cursor = 0; records = []
|
|
30
|
+
capsule = context.checkpoint(accepted, cursor, records)
|
|
31
|
+
else:
|
|
32
|
+
accepted, cursor, records = context.restore(checkpoint); capsule = checkpoint
|
|
33
|
+
if cursor > end: raise ValueError('cannot rewind retained accepted history')
|
|
34
|
+
status = 'completed' if end == len(program.targets) else 'paused'; failure = None
|
|
35
|
+
def safe(stage, target, iteration=0):
|
|
36
|
+
cancellation_safe_point(cancellation_token, stage)
|
|
37
|
+
if monotonic()-started > 120.: raise RuntimeError('retained controller cooperative deadline')
|
|
38
|
+
context.guard()
|
|
39
|
+
if progress is not None: progress(dict(stage=stage, target=target, iteration=iteration))
|
|
40
|
+
context.guard(); cancellation_safe_point(cancellation_token, stage)
|
|
41
|
+
try:
|
|
42
|
+
safe('retained.initialized', cursor)
|
|
43
|
+
for index in range(cursor, end):
|
|
44
|
+
target = program.targets[index]; trial = accepted
|
|
45
|
+
for iteration in range(program.max_iterations+1):
|
|
46
|
+
safe('retained.before_assembly', index+1, iteration)
|
|
47
|
+
residual, hessian, metrics = context.assemble(trial, target)
|
|
48
|
+
if max(metrics) <= 1e-11:
|
|
49
|
+
next_records = [*records, dict(target=index+1, parameter=target, iterations=iteration)]
|
|
50
|
+
staged = context.checkpoint(trial, index+1, next_records)
|
|
51
|
+
safe('retained.before_commit', index+1, iteration)
|
|
52
|
+
# One publication point; every trial value is separately owned.
|
|
53
|
+
accepted, cursor, records, capsule = trial, index+1, next_records, staged
|
|
54
|
+
safe('retained.committed', cursor, iteration)
|
|
55
|
+
break
|
|
56
|
+
if iteration == program.max_iterations: raise RuntimeError('retained Newton limit')
|
|
57
|
+
safe('retained.before_factorization', index+1, iteration)
|
|
58
|
+
step = np.zeros(context.count)
|
|
59
|
+
step[context.free] = np.linalg.solve(hessian[np.ix_(context.free, context.free)], -residual[context.free])
|
|
60
|
+
if not np.isfinite(step).all(): raise ValueError('nonfinite retained Newton step')
|
|
61
|
+
for cut in range(program.max_backtracks+1):
|
|
62
|
+
safe('retained.before_trial', index+1, iteration)
|
|
63
|
+
candidate = context.advance(trial, step*(.5**cut))
|
|
64
|
+
_, _, changed = context.assemble(candidate, target)
|
|
65
|
+
if max(changed) < max(metrics):
|
|
66
|
+
trial = candidate; break
|
|
67
|
+
else: raise RuntimeError('retained line search limit')
|
|
68
|
+
except SolveCancelled as error:
|
|
69
|
+
status, failure = 'cancelled', str(error)
|
|
70
|
+
except Exception as error:
|
|
71
|
+
status, failure = 'failed', type(error).__name__+': '+str(error)
|
|
72
|
+
return Result(status, cursor, accepted, capsule, failure)
|