Davout 0.1.1.dev170__tar.gz → 0.1.1.dev172__tar.gz
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.
- {davout-0.1.1.dev170/source/Davout.egg-info → davout-0.1.1.dev172}/PKG-INFO +1 -1
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/pyproject.toml +1 -1
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/mecsol_2026_quotient_space/neural_network_trainer.py +16 -7
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/loss_assembler_classes.py +160 -2
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/training_tools.py +156 -8
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/programming_tools.py +91 -7
- {davout-0.1.1.dev170 → davout-0.1.1.dev172/source/Davout.egg-info}/PKG-INFO +1 -1
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/LICENSE +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/README.md +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/setup.cfg +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/setup.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/RVEs/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/RVEs/non_transfinite/RVE_artery.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/RVEs/non_transfinite/RVE_matrix_with_fiber.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/RVEs/non_transfinite/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/RVEs/non_transfinite/elastin_fiber_creator.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/RVEs/transfinite/RVE_artery_transfinite.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/RVEs/transfinite/RVE_matrix_with_fiber_transfinite.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/RVEs/transfinite/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/RVEs/transfinite/elastin_fiber_creator.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/RVEs/transfinite/spherical_RVE.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/artery/artery_macroscale.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/artery/artery_macroscale_ellipsoid.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/micropolar_meshes/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/micropolar_meshes/beam_micropolar_case_1.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/periodic_meshes/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/periodic_meshes/artery_parameters.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/periodic_meshes/fiber_matrix_parameters.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/periodic_meshes/periodic_structure.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/solids/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/solids/intervertebral_disc.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/solids/whole_ensemble_of_geometries.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/solids/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/solids/cuboid_cylinders.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/solids/cuboid_ellipsoids.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/solids/cuboid_generator.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/solids/cuboid_helicoids.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/solids/cuboid_prisms.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/tool_box/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/tool_box/geometric_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/tool_box/mesh_data_retriever.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/tool_box/meshing_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/tool_box/region_finder.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/tool_box/verification_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/PINNs/Physics/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/PINNs/Physics/elasticity_equation.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/PINNs/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/SVD_framework/box_with_imposed_displacement_gradient.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/SVD_framework/box_with_young_modulus_field.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/SVD_framework/dataset_generator.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/SVD_framework/input_data_filler.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/SVD_framework/kinematics_surrogate_model.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/SVD_framework/young_modulus_field_generator.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/heat_equation.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/mecsol_2026_quotient_space/box_with_imposed_displacement_gradient.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/mecsol_2026_quotient_space/box_with_young_modulus_field.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/mecsol_2026_quotient_space/dataset_generator.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/mecsol_2026_quotient_space/input_data_filler.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/mecsol_2026_quotient_space/young_modulus_field_generator.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/tests_tool_box/test_ANN_optimization.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/tests_tool_box/test_ANN_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/tests_tool_box/test_SVD_based_NNs.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/tests_tool_box/test_SVD_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/tests_tool_box/test_convex_and_partially_convex_input_NNs.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/tests_tool_box/test_math_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/tests_tool_box/test_quotient_space_NNs.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/aa_tests/tests_tool_box/test_tensor_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/custom_architectures/SVD_quotient_space.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/custom_architectures/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/custom_architectures/convexity_concerned_NNs.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/custom_architectures/gated_quotient_space.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/custom_architectures/generic_feed_forward.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/ANN_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/SVD_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/activation_function_utilities.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/custom_activation_functions.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/differentiation_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/loss_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/math_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/numerical_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/parameters_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/tensor_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/aa_tests/REPL_experiments.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/aa_tests/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/aa_tests/optimization/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/aa_tests/optimization/tests_optimization_methods.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/aa_tests/tests_batching.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/aa_tests/tests_finite_elements.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/aa_tests/tests_loss_function.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/aa_tests/tests_physics.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/aa_tests/unidimensional/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/aa_tests/unidimensional/bar_fea.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/aa_tests/unidimensional/hyperelastic_1D_energies.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/aa_tests/unidimensional/variational_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/assembly/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/assembly/body_forces_work.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/assembly/dirichlet_boundary_conditions_enforcer.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/assembly/hyperelastic_internal_work.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/assembly/surface_forces_work.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/constitutive_models/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/constitutive_models/hyperelastic_isotropic_models.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/finite_elements/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/finite_elements/elements_manager.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/finite_elements/finite_element_dispatcher.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/finite_elements/surface_elements/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/finite_elements/surface_elements/triangles.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/finite_elements/volume_elements/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/finite_elements/volume_elements/tetrahedrons.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/optimization/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/optimization/conditioning_matrices.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/optimization/loss_functions.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/optimization/neural_network_assembler.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/optimization/objective_function.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/physics/compressible_cauchy_hyperelasticy.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/tool_box/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/tool_box/constitutive_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/tool_box/dirichlet_loading_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/tool_box/math_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/tool_box/mesh_info_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/tool_box/mesh_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/tool_box/neumann_loading_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/tool_box/node_ordering.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/tool_box/optimization_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/tool_box/parametric_curves_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/tool_box/sensitivity_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/FENN/tool_box/tensorflow_utilities.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/aa_tests/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/aa_tests/cauchy_tetrahedron.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/aa_tests/continuum_mechanics_potato_collage.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/aa_tests/fake_book_spines.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/aa_tests/null_space_architecture.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/aa_tests/strain_tensors.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/aa_tests/tests_collage_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/aa_tests/tests_delaunay.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/aa_tests/tests_paraview_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/aa_tests/tests_plotting_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/collage_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/paraview_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/plotting_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/tool_box/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/tool_box/arrows_lines_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/tool_box/box_and_markers_classes.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/tool_box/box_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/tool_box/collage_classes.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/tool_box/curves_setter.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/tool_box/image_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/tool_box/interactivity_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/tool_box/paraview_scripts.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/tool_box/perspective_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/GraphUtilities/tool_box/text_excerpt_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/LaTeXUtilities/LaTeXUtilities.sty +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/LaTeXUtilities/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/LaTeXUtilities/aa_tests/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/LaTeXUtilities/aa_tests/latex_parser_tests.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/LaTeXUtilities/latex_parser.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/LaTeXUtilities/tool_box/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/LaTeXUtilities/tool_box/command_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/LaTeXUtilities/tool_box/parsing_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/LaTeXUtilities/tool_box/sty_file_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/heat_transfer/heat_box.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/beam_with_fibers.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/box_with_young_modulus_field.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/disc_HGO.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/disc_neo_hookean.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/disc_neo_hookean_incompressible.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/hyperelastic_box.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/incompressible_hyperelastic_box.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/intervertebral_disc/cylindrical_coordinates_material_property.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/intervertebral_disc/disc_HGO.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/intervertebral_disc/local_coordinate_system_generation.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/parallel_hyperelastic_box.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/parallel_incompressible_box.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/read_dofs_in_volume.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/hyperelasticity/young_modulus_field.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/bending_case/beam_with_fibers_macroscale.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/bending_case/beam_with_fibers_microscale.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/deformation_laboratory/microscale_deformation_lab.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/disc_micropolar_neo_hookean.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/old_tests/Bauer_et_al/beam.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/old_tests/Bauer_et_al/beam_neo_hookean.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/old_tests/Bauer_et_al/beam_neo_hookean_pure_dolfin.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/old_tests/Bauer_et_al/beam_neo_hookean_pure_dolfin_old.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/old_tests/Suh_et_al/suh_implementation.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/old_tests/micropolar_with_homogenization.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/old_tests/micropolar_with_homogenization_original.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/old_tests/tools_homogenization.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/old_tests/tools_io.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/stress_plots.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/tangent_operators/numerical_differentiation.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/tangent_operators/numerical_differentiation_second_elasticity_tensor.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/tangent_operators/tangent_operator_plotter.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/torsion_case/beam_with_fibers_macroscale.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/torsion_case/beam_with_fibers_microscale.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/traction_case/beam_with_fibers_macroscale.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/micropolar/traction_case/beam_with_fibers_microscale.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/minimal_working_examples_forum/curve_fitting.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/minimal_working_examples_forum/cylindrical_coordinates_field.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/minimal_working_examples_forum/cylindrical_coordinates_material_property.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/minimal_working_examples_forum/elasticity_tensor.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/minimal_working_examples_forum/incompressible.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/minimal_working_examples_forum/linear_expression_test.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/minimal_working_examples_forum/petsc_2D.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/minimal_working_examples_forum/test_periodic.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/minimal_working_examples_forum/test_periodic_class.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/minimal_working_examples_forum/test_shifted_field.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/minimal_working_examples_forum/teste_afim.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/minimal_working_examples_forum/working_example_dictionaries.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/multiscale/hyperelasticity/beam_with_fibers_microscale.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/physics_prototypes/compressible_hyperelasticity.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/physics_prototypes/incompressible_hyperelasticity.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/test_meshes/beam_gmsh.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/test_meshes_paths.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/aa_tests_and_examples/various_physics_tests.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/constitutive_models/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/constitutive_models/heat_transfer/isotropic_heat_conduction.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/constitutive_models/hyperelasticity/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/constitutive_models/hyperelasticity/anisotropic_hyperelasticity.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/constitutive_models/hyperelasticity/isotropic_hyperelasticity.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/constitutive_models/hyperelasticity/micropolar_hyperelasticity.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/multiscale/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/multiscale/multiscale_boundary_conditions/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/multiscale/multiscale_boundary_conditions/multiscale_classes.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/multiscale/multiscale_boundary_conditions/multiscale_expressions.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/multiscale/multiscale_hyperelasticity.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/multiscale/multiscale_micropolar.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/physics/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/physics/hyperelastic_cauchy_continuum.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/physics/hyperelastic_incompressible_cauchy_continuum.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/physics/hyperelastic_micropolar_continuum.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/physics/steady_state_heat_transfer.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/post_processes/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/post_processes/post_processes_classes.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/post_processes/post_processes_functions.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/binary_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/body_forces_loading_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/boundary_conditions_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/constitutive_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/dirichlet_load_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/expressions_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/functional_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/homogenization_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/mesh_handling_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/multiscale_boundary_conditions_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/numerical_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/parallelization_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/post_processing_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/pseudotime_stepping_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/read_write_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/surface_loading_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/tensor_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/variational_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/MultiMech/tool_box/weak_boundary_conditions_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/aa_tests/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/aa_tests/tests_template.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/aa_tests/txt_tests.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/coordinate_systems_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/dictionary_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/file_handling_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/fonts/CMU_Serif_Roman.ttf +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/function_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/interpolation_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/math_experiments.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/numpy_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/package_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/path_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/recursion_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/string_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/tensor_and_math_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/testing_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/user_interaction_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/StochasticUtilities/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/StochasticUtilities/aa_tests/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/StochasticUtilities/aa_tests/test_delaunay_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/StochasticUtilities/domain_decomposition/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/StochasticUtilities/tool_box/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/StochasticUtilities/tool_box/delaunay_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/StochasticUtilities/tool_box/sampling_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/StochasticUtilities/tool_box/statistics_tools.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/__init__.py +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout.egg-info/SOURCES.txt +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout.egg-info/dependency_links.txt +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout.egg-info/requires.txt +0 -0
- {davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout.egg-info/top_level.txt +0 -0
|
@@ -24,7 +24,8 @@ class SurrogateModel:
|
|
|
24
24
|
def __init__(self, displacement_data_file, input_data_file,
|
|
25
25
|
saved_model_file, results_path, n_training_samples,
|
|
26
26
|
quotient_space_dimension, n_monte_carlo_realizations, n_best_models,
|
|
27
|
-
n_best_samples, mesh_file_name, screenshots_path, optimizer
|
|
27
|
+
n_best_samples, mesh_file_name, screenshots_path, optimizer,
|
|
28
|
+
loss_metric):
|
|
28
29
|
|
|
29
30
|
# Stores the data
|
|
30
31
|
|
|
@@ -52,6 +53,8 @@ class SurrogateModel:
|
|
|
52
53
|
|
|
53
54
|
self.optimizer = optimizer
|
|
54
55
|
|
|
56
|
+
self.loss_metric = loss_metric
|
|
57
|
+
|
|
55
58
|
# Reads the two files
|
|
56
59
|
|
|
57
60
|
self.output_data = np.load(self.results_path+"//"+
|
|
@@ -110,9 +113,8 @@ class SurrogateModel:
|
|
|
110
113
|
# Sets the optimization class for training
|
|
111
114
|
|
|
112
115
|
training_class = training_tools.ModelCustomTraining(custom_model,
|
|
113
|
-
training_data, training_true_values,
|
|
114
|
-
|
|
115
|
-
maximum_iterations, verbose_deltaIterations=
|
|
116
|
+
training_data, training_true_values, self.loss_metric, verbose=
|
|
117
|
+
True, n_iterations=maximum_iterations, verbose_deltaIterations=
|
|
116
118
|
verbose_delta_iterations, save_model_file=self.saved_model_file,
|
|
117
119
|
match_data_float_type_to_trainables=True, parent_path=
|
|
118
120
|
self.results_path, optimizer=self.optimizer)
|
|
@@ -129,7 +131,8 @@ class SurrogateModel:
|
|
|
129
131
|
|
|
130
132
|
training_class.monte_carlo_training(n_realizations=
|
|
131
133
|
self.n_monte_carlo_realizations, best_models_rank_size=
|
|
132
|
-
self.n_best_models, show_reinitialization_distance=True
|
|
134
|
+
self.n_best_models, show_reinitialization_distance=True,
|
|
135
|
+
model_base_name=self.saved_model_file)
|
|
133
136
|
|
|
134
137
|
# Checks the loss again with the best model of the Monte Carlo
|
|
135
138
|
# training
|
|
@@ -503,7 +506,9 @@ if __name__=="__main__":
|
|
|
503
506
|
input_data_file = ("00_successful_complete_data_matrix_pc_matheus."+
|
|
504
507
|
"npy")
|
|
505
508
|
|
|
506
|
-
|
|
509
|
+
Lp_norm_exponent = 12
|
|
510
|
+
|
|
511
|
+
saved_model_file = "saved_model_lp_norm_"+str(Lp_norm_exponent)
|
|
507
512
|
|
|
508
513
|
n_training_samples = 10000
|
|
509
514
|
|
|
@@ -519,6 +524,9 @@ if __name__=="__main__":
|
|
|
519
524
|
|
|
520
525
|
optimizer = "Adam"
|
|
521
526
|
|
|
527
|
+
loss_metric = {"name": "LpNormError", "p": Lp_norm_exponent,
|
|
528
|
+
"use_stable_implementation": True}
|
|
529
|
+
|
|
522
530
|
training_flag = True
|
|
523
531
|
|
|
524
532
|
test_flag = False
|
|
@@ -536,7 +544,8 @@ if __name__=="__main__":
|
|
|
536
544
|
surrogate_model_class = SurrogateModel(displacement_data_file,
|
|
537
545
|
input_data_file, saved_model_file, results_path, n_training_samples,
|
|
538
546
|
quotient_space_dimension, n_monte_carlo_realizations, n_best_models,
|
|
539
|
-
n_best_samples, mesh_file_name, screenshots_path, optimizer
|
|
547
|
+
n_best_samples, mesh_file_name, screenshots_path, optimizer,
|
|
548
|
+
loss_metric)
|
|
540
549
|
|
|
541
550
|
# Sets training forth if it is the case
|
|
542
551
|
|
|
@@ -951,7 +951,7 @@ class QuadraticLossOverAnyResidualAssembler(tf.keras.losses.Loss):
|
|
|
951
951
|
# Conventional losses #
|
|
952
952
|
########################################################################
|
|
953
953
|
|
|
954
|
-
# Defines a
|
|
954
|
+
# Defines a class for the maximum absolute error
|
|
955
955
|
|
|
956
956
|
class MaximumAbsoluteError(tf.keras.losses.Loss):
|
|
957
957
|
|
|
@@ -965,4 +965,162 @@ class MaximumAbsoluteError(tf.keras.losses.Loss):
|
|
|
965
965
|
|
|
966
966
|
def minimum_absolute_error(self, y_true, y_pred):
|
|
967
967
|
|
|
968
|
-
return tf.reduce_min(tf.abs(y_true - y_pred))
|
|
968
|
+
return tf.reduce_min(tf.abs(y_true - y_pred))
|
|
969
|
+
|
|
970
|
+
# Defines a class for the Lp norm of the absolute error
|
|
971
|
+
|
|
972
|
+
class LpNormError(tf.keras.losses.Loss):
|
|
973
|
+
|
|
974
|
+
"""
|
|
975
|
+
Lp norm of the error. This loss evaluates the following expression,
|
|
976
|
+
|
|
977
|
+
L = (E_ij^p)^(1/p),
|
|
978
|
+
|
|
979
|
+
where E_ij is the error measured at the j-th component of the i-th
|
|
980
|
+
sample.
|
|
981
|
+
|
|
982
|
+
Parameters
|
|
983
|
+
----------
|
|
984
|
+
p : float, default=2.0
|
|
985
|
+
p exponent of the Lp norm.
|
|
986
|
+
|
|
987
|
+
name : str, default="lp_norm_loss"
|
|
988
|
+
Name of the loss function instance.
|
|
989
|
+
"""
|
|
990
|
+
|
|
991
|
+
def __init__(self, p=2.0, epsilon=1E-7, dtype=tf.float32, name="lp"+
|
|
992
|
+
"_norm_loss", use_stable_implementation=False, **kwargs):
|
|
993
|
+
|
|
994
|
+
super().__init__(name=name, dtype=tf.as_dtype(dtype), **kwargs)
|
|
995
|
+
|
|
996
|
+
# Saves the original rawly given objects
|
|
997
|
+
|
|
998
|
+
self.raw_p = float(p)
|
|
999
|
+
|
|
1000
|
+
self.raw_epsilon = float(epsilon)
|
|
1001
|
+
|
|
1002
|
+
self.raw_dtype = tf.as_dtype(dtype).name
|
|
1003
|
+
|
|
1004
|
+
self.use_stable_implementation = use_stable_implementation
|
|
1005
|
+
|
|
1006
|
+
# Saves the live object
|
|
1007
|
+
|
|
1008
|
+
self.epsilon = tf.cast(epsilon, dtype=self.dtype)
|
|
1009
|
+
|
|
1010
|
+
# Verifies if the stable implementation is to be used
|
|
1011
|
+
|
|
1012
|
+
if self.use_stable_implementation:
|
|
1013
|
+
|
|
1014
|
+
self.p = tf.cast(self.raw_p, dtype=self.dtype)
|
|
1015
|
+
|
|
1016
|
+
# Selects the call method that scales and rescales the loss
|
|
1017
|
+
# function to avoid numerical instabilities
|
|
1018
|
+
|
|
1019
|
+
self.call_method = self.scale_evaluate_and_rescale_method
|
|
1020
|
+
|
|
1021
|
+
# Verifies if the exponent p is an even positive integer
|
|
1022
|
+
|
|
1023
|
+
elif self.raw_p%2==0 and self.raw_p>1.0:
|
|
1024
|
+
|
|
1025
|
+
self.p = tf.cast(self.raw_p, dtype=self.dtype)
|
|
1026
|
+
|
|
1027
|
+
# Selects the call method to avoid evaluating the absolute
|
|
1028
|
+
# value
|
|
1029
|
+
|
|
1030
|
+
self.call_method = self.even_exponent_loss
|
|
1031
|
+
|
|
1032
|
+
# Otherwise, changes p to half of p to compensate for the smooth
|
|
1033
|
+
# absolute value
|
|
1034
|
+
|
|
1035
|
+
elif self.raw_p>=1.0:
|
|
1036
|
+
|
|
1037
|
+
self.p = tf.cast(self.raw_p*0.5, dtype=self.dtype)
|
|
1038
|
+
|
|
1039
|
+
# Selects the call method to ensure evaluating the absolute
|
|
1040
|
+
# value before evaluating the Lp norm
|
|
1041
|
+
|
|
1042
|
+
self.call_method = self.non_even_exponent_loss
|
|
1043
|
+
|
|
1044
|
+
else:
|
|
1045
|
+
|
|
1046
|
+
raise ValueError("The 'p' exponent in 'LpNormError' loss c"+
|
|
1047
|
+
"lass must be greater than or equal to 1. Currently, it is"+
|
|
1048
|
+
": "+str(p))
|
|
1049
|
+
|
|
1050
|
+
# Sets the reciprocal of the original p exponent
|
|
1051
|
+
|
|
1052
|
+
self.p_reciprocal = tf.cast(1.0/self.raw_p, dtype=self.dtype)
|
|
1053
|
+
|
|
1054
|
+
# Defines the generic call method to be differentiated using AD
|
|
1055
|
+
|
|
1056
|
+
def call(self, y_true, y_model):
|
|
1057
|
+
|
|
1058
|
+
return self.call_method(y_true, y_model)
|
|
1059
|
+
|
|
1060
|
+
# Defines the call method to evaluate the loss function when the ex-
|
|
1061
|
+
# ponent is an even integer
|
|
1062
|
+
|
|
1063
|
+
def even_exponent_loss(self, y_true, y_model):
|
|
1064
|
+
|
|
1065
|
+
# Computes the Lp norm of the error tensor. Adds a constant epsi-
|
|
1066
|
+
# lon to the computation of the p-th root to avoid exploding gra-
|
|
1067
|
+
# dients when the p-th root tends to zero
|
|
1068
|
+
|
|
1069
|
+
return tf.pow(tf.reduce_sum(tf.pow(y_true-y_model, self.p),
|
|
1070
|
+
axis=-1)+self.epsilon, self.p_reciprocal)
|
|
1071
|
+
|
|
1072
|
+
# Defines the call method to evaluate the loss function when the ex-
|
|
1073
|
+
# ponent is not an integer or when it is an odd integer. Thus, the
|
|
1074
|
+
# absolute value is taken first
|
|
1075
|
+
|
|
1076
|
+
def non_even_exponent_loss(self, y_true, y_model):
|
|
1077
|
+
|
|
1078
|
+
# Evaluates the smooth absolute value of the error tensor first
|
|
1079
|
+
|
|
1080
|
+
absolute_error = tf.square(y_true-y_model)+self.epsilon
|
|
1081
|
+
|
|
1082
|
+
# Computes the Lp norm of the error tensor
|
|
1083
|
+
|
|
1084
|
+
return tf.pow(tf.reduce_sum(tf.pow(absolute_error, self.p),
|
|
1085
|
+
axis=-1), self.p_reciprocal)
|
|
1086
|
+
|
|
1087
|
+
# Defines a safe and numerically stable evaluation of this loss
|
|
1088
|
+
# function common to both even and odd exponents. With the caveat
|
|
1089
|
+
# that the absolute value is calculated using tf.abs
|
|
1090
|
+
|
|
1091
|
+
def scale_evaluate_and_rescale_method(self, y_true, y_model):
|
|
1092
|
+
|
|
1093
|
+
# Evaluates the absolute error tensor
|
|
1094
|
+
|
|
1095
|
+
absolute_error_tensor = tf.abs(y_true-y_model)
|
|
1096
|
+
|
|
1097
|
+
# Gets the maximum error per sample as a tensor
|
|
1098
|
+
|
|
1099
|
+
maximum_per_sample = tf.reduce_max(absolute_error_tensor, axis=
|
|
1100
|
+
-1, keepdims=True)
|
|
1101
|
+
|
|
1102
|
+
# Divides the error tensor by the maximum absolute error. But
|
|
1103
|
+
# care is taken to avoid division by zero
|
|
1104
|
+
|
|
1105
|
+
absolute_error_tensor = tf.math.divide_no_nan(
|
|
1106
|
+
absolute_error_tensor, maximum_per_sample)
|
|
1107
|
+
|
|
1108
|
+
# Evaluates the Lp norm by computing the powers with the scaled
|
|
1109
|
+
# components then muliplying by the scale factor
|
|
1110
|
+
|
|
1111
|
+
return tf.squeeze(maximum_per_sample, axis=-1)*tf.pow(
|
|
1112
|
+
tf.reduce_sum(tf.pow(absolute_error_tensor, self.p), axis=-1),
|
|
1113
|
+
self.p_reciprocal)
|
|
1114
|
+
|
|
1115
|
+
# Defines the get-config method to ensure serialization when saving
|
|
1116
|
+
# and loading models
|
|
1117
|
+
|
|
1118
|
+
def get_config(self):
|
|
1119
|
+
|
|
1120
|
+
config = super().get_config()
|
|
1121
|
+
|
|
1122
|
+
config.update({"p": self.raw_p, "dtype": self.raw_dtype, "epsi"+
|
|
1123
|
+
"lon": self.raw_epsilon, "use_stable_implementation":
|
|
1124
|
+
self.use_stable_implementation})
|
|
1125
|
+
|
|
1126
|
+
return config
|
{davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/DeepMech/tool_box/training_tools.py
RENAMED
|
@@ -24,6 +24,8 @@ from ..tool_box import loss_tools
|
|
|
24
24
|
|
|
25
25
|
from ..tool_box import parameters_tools
|
|
26
26
|
|
|
27
|
+
from ..tool_box import loss_assembler_classes
|
|
28
|
+
|
|
27
29
|
from ...PythonicUtilities import path_tools
|
|
28
30
|
|
|
29
31
|
from ...PythonicUtilities import string_tools
|
|
@@ -32,6 +34,10 @@ from ...PythonicUtilities.function_tools import verify_dictionary_as_function_ar
|
|
|
32
34
|
|
|
33
35
|
from ...PythonicUtilities.user_interaction_tools import PrintForLoopInfo
|
|
34
36
|
|
|
37
|
+
from ...PythonicUtilities.programming_tools import dispatch_classes
|
|
38
|
+
|
|
39
|
+
from ...PythonicUtilities.dictionary_tools import delete_dictionary_keys
|
|
40
|
+
|
|
35
41
|
# Defines a class to optimize the model's parameters
|
|
36
42
|
|
|
37
43
|
class ModelTraining:
|
|
@@ -48,8 +54,6 @@ class ModelTraining:
|
|
|
48
54
|
|
|
49
55
|
self.model = model
|
|
50
56
|
|
|
51
|
-
self.loss_metric = loss_metric
|
|
52
|
-
|
|
53
57
|
self.optimizer = optimizer
|
|
54
58
|
|
|
55
59
|
self.n_iterations = n_iterations
|
|
@@ -60,6 +64,11 @@ class ModelTraining:
|
|
|
60
64
|
|
|
61
65
|
self.verbose = verbose
|
|
62
66
|
|
|
67
|
+
# Transforms the loss metric to a live loss class instance if it
|
|
68
|
+
# were given as a string or dictionary
|
|
69
|
+
|
|
70
|
+
self.loss_metric = verify_loss_metric(loss_metric)
|
|
71
|
+
|
|
63
72
|
# Gets the number of trainable parameters of the model
|
|
64
73
|
|
|
65
74
|
self.number_trainable_parameters = self.model.count_params()
|
|
@@ -233,7 +242,10 @@ class ModelCustomTraining:
|
|
|
233
242
|
|
|
234
243
|
self.verbose = verbose
|
|
235
244
|
|
|
236
|
-
|
|
245
|
+
# Transforms the loss metric to a live loss class instance if it
|
|
246
|
+
# were given as a string or dictionary
|
|
247
|
+
|
|
248
|
+
self.loss_metric = verify_loss_metric(loss_metric)
|
|
237
249
|
|
|
238
250
|
# Gets the number of trainable parameters of the model
|
|
239
251
|
|
|
@@ -766,6 +778,12 @@ class ModelCustomTraining:
|
|
|
766
778
|
|
|
767
779
|
max_digits = len(str(self.n_iterations))
|
|
768
780
|
|
|
781
|
+
# Initializes the recorders for the gradient statistics
|
|
782
|
+
|
|
783
|
+
gradient_value = None
|
|
784
|
+
|
|
785
|
+
gradient_maximum_component = None
|
|
786
|
+
|
|
769
787
|
# Sets the initial time
|
|
770
788
|
|
|
771
789
|
self.initial_time = time.time()
|
|
@@ -881,11 +899,20 @@ class ModelCustomTraining:
|
|
|
881
899
|
"#########################################################"+
|
|
882
900
|
"\n")
|
|
883
901
|
|
|
884
|
-
print("Initial loss
|
|
902
|
+
print("Initial loss.......................: "+format(
|
|
903
|
+
initial_loss, '.5e'))
|
|
885
904
|
|
|
886
|
-
print("Final loss
|
|
905
|
+
print("Final loss.........................: "+format(
|
|
906
|
+
final_loss, '.5e'))
|
|
887
907
|
|
|
888
|
-
print("
|
|
908
|
+
print("Gradient norm......................: "+format(
|
|
909
|
+
gradient_value, '.5e'))
|
|
910
|
+
|
|
911
|
+
print("Gradient maximum absolute component: "+format(
|
|
912
|
+
gradient_value, '.5e'))
|
|
913
|
+
|
|
914
|
+
print("Training time......................: "+str(
|
|
915
|
+
self.elapsed_time)+" seconds.\n")
|
|
889
916
|
|
|
890
917
|
# Gets the trained parameters and reassigns them to the model if
|
|
891
918
|
# the model was trained using optimizers from scipy
|
|
@@ -1113,7 +1140,7 @@ class ModelCustomTraining:
|
|
|
1113
1140
|
print("Loads the best model")
|
|
1114
1141
|
|
|
1115
1142
|
self.model = tf.keras.models.load_model(self.parent_path+"//1_"+
|
|
1116
|
-
"
|
|
1143
|
+
"best_"+model_base_name+".keras")
|
|
1117
1144
|
|
|
1118
1145
|
########################################################################
|
|
1119
1146
|
# Utilities #
|
|
@@ -1136,4 +1163,125 @@ def integer_toString(number, maximum_digits):
|
|
|
1136
1163
|
|
|
1137
1164
|
number_string = " "+number_string
|
|
1138
1165
|
|
|
1139
|
-
return number_string
|
|
1166
|
+
return number_string
|
|
1167
|
+
|
|
1168
|
+
# Defines a function to verify if a given loss metric is a valid Keras'
|
|
1169
|
+
# loss or whether it is a custom loss
|
|
1170
|
+
|
|
1171
|
+
def verify_loss_metric(loss_metric):
|
|
1172
|
+
|
|
1173
|
+
# Assembles a dictionary of all natively available Keras' losses
|
|
1174
|
+
|
|
1175
|
+
available_keras_losses = {}
|
|
1176
|
+
|
|
1177
|
+
for loss_name, loss_class in inspect.getmembers(tf.keras.losses):
|
|
1178
|
+
|
|
1179
|
+
# Verifies if the object is indeed a class and if it is a sub-
|
|
1180
|
+
# class of the Keras' Loss parent class. Also excludes objects
|
|
1181
|
+
# starting with _
|
|
1182
|
+
|
|
1183
|
+
if inspect.isclass(loss_class) and issubclass(loss_class,
|
|
1184
|
+
tf.keras.losses.Loss) and (not loss_name.startswith("_")):
|
|
1185
|
+
|
|
1186
|
+
# Saves the object's name in lower case
|
|
1187
|
+
|
|
1188
|
+
available_keras_losses[loss_name.lower()] = loss_class
|
|
1189
|
+
|
|
1190
|
+
# Verifies if the loss metric is a string
|
|
1191
|
+
|
|
1192
|
+
if isinstance(loss_metric, str):
|
|
1193
|
+
|
|
1194
|
+
# Converts it to a dictionary first
|
|
1195
|
+
|
|
1196
|
+
loss_metric = {"name": loss_metric}
|
|
1197
|
+
|
|
1198
|
+
# Verifies if the loss metric is a dictionary
|
|
1199
|
+
|
|
1200
|
+
if isinstance(loss_metric, dict):
|
|
1201
|
+
|
|
1202
|
+
# Verifies if this dictionary has the key name
|
|
1203
|
+
|
|
1204
|
+
if not ("name" in loss_metric):
|
|
1205
|
+
|
|
1206
|
+
raise ValueError("'loss_metric' is a dictionary, but it do"+
|
|
1207
|
+
"es not have the key 'name'. This key is essential to find"+
|
|
1208
|
+
"ing the loss metric. Check the given 'loss_metric':\n"+str(
|
|
1209
|
+
loss_metric))
|
|
1210
|
+
|
|
1211
|
+
# Recovers the name of the loss metric and removes this key-value
|
|
1212
|
+
# pair from the dictionary
|
|
1213
|
+
|
|
1214
|
+
loss_metric_name = loss_metric["name"]
|
|
1215
|
+
|
|
1216
|
+
loss_metric_info = delete_dictionary_keys(loss_metric, "name")
|
|
1217
|
+
|
|
1218
|
+
# Verifies if this loss is a Keras' loss
|
|
1219
|
+
|
|
1220
|
+
if loss_metric_name.lower() in available_keras_losses:
|
|
1221
|
+
|
|
1222
|
+
# Recovers the loss class
|
|
1223
|
+
|
|
1224
|
+
loss_metric = available_keras_losses[
|
|
1225
|
+
loss_metric_name.lower()]
|
|
1226
|
+
|
|
1227
|
+
# Verifies if the input dictionary has valid arguments for
|
|
1228
|
+
# the instantiation of the class
|
|
1229
|
+
|
|
1230
|
+
verify_dictionary_as_function_argument(loss_metric.__init__,
|
|
1231
|
+
loss_metric_info, list_of_arguments_not_to_be_verified=["s"+
|
|
1232
|
+
"elf", "kwargs"])
|
|
1233
|
+
|
|
1234
|
+
# Instantiates the class
|
|
1235
|
+
|
|
1236
|
+
return loss_metric(**loss_metric_info)
|
|
1237
|
+
|
|
1238
|
+
# Otherwise, verifies if they are a custom loss function defined
|
|
1239
|
+
# in loss_assembler_class.py
|
|
1240
|
+
|
|
1241
|
+
else:
|
|
1242
|
+
|
|
1243
|
+
# Verifies if the given loss name is a valid class
|
|
1244
|
+
|
|
1245
|
+
loss_metric_result = dispatch_classes([loss_metric_name],
|
|
1246
|
+
loss_assembler_classes, class_input=loss_metric_info,
|
|
1247
|
+
class_kind_name_for_error_message="loss class",
|
|
1248
|
+
return_error_message=True)
|
|
1249
|
+
|
|
1250
|
+
# If the result is a string, it means the loss class was not
|
|
1251
|
+
# found
|
|
1252
|
+
|
|
1253
|
+
if isinstance(loss_metric_result, str):
|
|
1254
|
+
|
|
1255
|
+
keras_losses = ""
|
|
1256
|
+
|
|
1257
|
+
for name in available_keras_losses:
|
|
1258
|
+
|
|
1259
|
+
keras_losses += "\n'"+str(name)+"'"
|
|
1260
|
+
|
|
1261
|
+
raise ValueError("'loss_metric' was not found in Keras"+
|
|
1262
|
+
"' native loss functions nor in the custom-built ones."+
|
|
1263
|
+
"\nThe given name is '"+str(loss_metric_name)+"'. Chec"+
|
|
1264
|
+
"k the available Keras' loss functions:\n"+keras_losses+
|
|
1265
|
+
"\n\nCheck the error for the custom-built losses:\n"+
|
|
1266
|
+
loss_metric_result)
|
|
1267
|
+
|
|
1268
|
+
# Otherwise, takes the loss class instance from the result
|
|
1269
|
+
# dictionary
|
|
1270
|
+
|
|
1271
|
+
return loss_metric_result[loss_metric_name]
|
|
1272
|
+
|
|
1273
|
+
# Otherwise, verifies if the loss metric is a Keras' loss instance
|
|
1274
|
+
|
|
1275
|
+
elif not isinstance(loss_metric, tf.keras.losses.Loss):
|
|
1276
|
+
|
|
1277
|
+
raise TypeError("'loss_metric' can be a string with the name o"+
|
|
1278
|
+
"f a loss function from\nKeras or from the custom-built loss f"+
|
|
1279
|
+
"unctions. It can also be a dictio-\nnary with the name of the"+
|
|
1280
|
+
" loss function and additional information. Fi-\nnally, 'loss_"+
|
|
1281
|
+
"metric' can be an instance of a Keras' native loss. Curren-\n"+
|
|
1282
|
+
"tly, it is neither. Check the provided 'loss_metric':\n"+str(
|
|
1283
|
+
loss_metric))
|
|
1284
|
+
|
|
1285
|
+
# If no error has been risen, just returns the loss instance
|
|
1286
|
+
|
|
1287
|
+
return loss_metric
|
{davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/PythonicUtilities/programming_tools.py
RENAMED
|
@@ -41,6 +41,17 @@ sys.modules["dictionary_tools"] = dictionary_tools
|
|
|
41
41
|
|
|
42
42
|
specifications.loader.exec_module(dictionary_tools)
|
|
43
43
|
|
|
44
|
+
# Imports function tools
|
|
45
|
+
|
|
46
|
+
specifications = util.spec_from_file_location("function_tools",
|
|
47
|
+
broken_path[1]/"PythonicUtilities"/"function_tools.py")
|
|
48
|
+
|
|
49
|
+
function_tools = util.module_from_spec(specifications)
|
|
50
|
+
|
|
51
|
+
sys.modules["function_tools"] = function_tools
|
|
52
|
+
|
|
53
|
+
specifications.loader.exec_module(function_tools)
|
|
54
|
+
|
|
44
55
|
########################################################################
|
|
45
56
|
# Progress bar #
|
|
46
57
|
########################################################################
|
|
@@ -688,7 +699,9 @@ None, searched_entity="classes"):
|
|
|
688
699
|
@optional_argumentsInitializer({'reserved_entities': lambda: []})
|
|
689
700
|
|
|
690
701
|
def dispatch_classes(methods_names, searched_file, parent_class=None,
|
|
691
|
-
class_input=None, reserved_entities=None
|
|
702
|
+
class_input=None, reserved_entities=None,
|
|
703
|
+
class_kind_name_for_error_message="class method", return_error_message=
|
|
704
|
+
False):
|
|
692
705
|
|
|
693
706
|
# Assures methods_names is a list, or a tuple or a dictionary
|
|
694
707
|
|
|
@@ -732,9 +745,18 @@ class_input=None, reserved_entities=None):
|
|
|
732
745
|
|
|
733
746
|
available_list += "'"+name+"'\n"
|
|
734
747
|
|
|
748
|
+
# If the error message is to be returned instead of au-
|
|
749
|
+
# tomatically risen
|
|
750
|
+
|
|
751
|
+
if return_error_message:
|
|
752
|
+
|
|
753
|
+
return ("'"+str(method_name)+"' is not an availabl"+
|
|
754
|
+
"e "+class_kind_name_for_error_message+". Find one"+
|
|
755
|
+
" in the list:"+available_list)
|
|
756
|
+
|
|
735
757
|
raise NameError("'"+str(method_name)+"' is not an avai"+
|
|
736
|
-
"lable
|
|
737
|
-
available_list)
|
|
758
|
+
"lable "+class_kind_name_for_error_message+". Find one"+
|
|
759
|
+
" in the list:"+available_list)
|
|
738
760
|
|
|
739
761
|
elif isinstance(class_input, tuple):
|
|
740
762
|
|
|
@@ -756,9 +778,62 @@ class_input=None, reserved_entities=None):
|
|
|
756
778
|
|
|
757
779
|
available_list += "'"+name+"'\n"
|
|
758
780
|
|
|
781
|
+
# If the error message is to be returned instead of au-
|
|
782
|
+
# tomatically risen
|
|
783
|
+
|
|
784
|
+
if return_error_message:
|
|
785
|
+
|
|
786
|
+
return ("'"+str(method_name)+"' is not an availabl"+
|
|
787
|
+
"e "+class_kind_name_for_error_message+". Find one"+
|
|
788
|
+
" in the list:"+available_list)
|
|
789
|
+
|
|
759
790
|
raise NameError("'"+str(method_name)+"' is not an avai"+
|
|
760
|
-
"lable
|
|
761
|
-
available_list)
|
|
791
|
+
"lable "+class_kind_name_for_error_message+". Find one"+
|
|
792
|
+
" in the list:"+available_list)
|
|
793
|
+
|
|
794
|
+
# If the class input is a dictionary
|
|
795
|
+
|
|
796
|
+
elif isinstance(class_input, dict):
|
|
797
|
+
|
|
798
|
+
for method_name in methods_names:
|
|
799
|
+
|
|
800
|
+
# If the name is in the list of available methods, updates
|
|
801
|
+
# the dictionary of classes
|
|
802
|
+
|
|
803
|
+
if method_name in available_methodsNames:
|
|
804
|
+
|
|
805
|
+
# Verifies if the given class input has all the necessary
|
|
806
|
+
# positional arguments and possible keyword arguments
|
|
807
|
+
|
|
808
|
+
function_tools.verify_dictionary_as_function_argument(
|
|
809
|
+
methods_classesDict[method_name].__init__, class_input,
|
|
810
|
+
list_of_arguments_not_to_be_verified=["self", "kwargs"])
|
|
811
|
+
|
|
812
|
+
# Instantiates the class by unpacking the dictionary
|
|
813
|
+
|
|
814
|
+
methods_classes[method_name] = methods_classesDict[
|
|
815
|
+
method_name](**class_input)
|
|
816
|
+
|
|
817
|
+
else:
|
|
818
|
+
|
|
819
|
+
available_list = "\n"
|
|
820
|
+
|
|
821
|
+
for name in available_methodsNames:
|
|
822
|
+
|
|
823
|
+
available_list += "'"+name+"'\n"
|
|
824
|
+
|
|
825
|
+
# If the error message is to be returned instead of au-
|
|
826
|
+
# tomatically risen
|
|
827
|
+
|
|
828
|
+
if return_error_message:
|
|
829
|
+
|
|
830
|
+
return ("'"+str(method_name)+"' is not an availabl"+
|
|
831
|
+
"e "+class_kind_name_for_error_message+". Find one"+
|
|
832
|
+
" in the list:"+available_list)
|
|
833
|
+
|
|
834
|
+
raise NameError("'"+str(method_name)+"' is not an avai"+
|
|
835
|
+
"lable "+class_kind_name_for_error_message+". Find one"+
|
|
836
|
+
" in the list:"+available_list)
|
|
762
837
|
|
|
763
838
|
else:
|
|
764
839
|
|
|
@@ -780,9 +855,18 @@ class_input=None, reserved_entities=None):
|
|
|
780
855
|
|
|
781
856
|
available_list += "'"+name+"'\n"
|
|
782
857
|
|
|
858
|
+
# If the error message is to be returned instead of au-
|
|
859
|
+
# tomatically risen
|
|
860
|
+
|
|
861
|
+
if return_error_message:
|
|
862
|
+
|
|
863
|
+
return ("'"+str(method_name)+"' is not an availabl"+
|
|
864
|
+
"e "+class_kind_name_for_error_message+". Find one"+
|
|
865
|
+
" in the list:"+available_list)
|
|
866
|
+
|
|
783
867
|
raise NameError("'"+str(method_name)+"' is not an avai"+
|
|
784
|
-
"lable
|
|
785
|
-
available_list)
|
|
868
|
+
"lable "+class_kind_name_for_error_message+". Find one"+
|
|
869
|
+
" in the list:"+available_list)
|
|
786
870
|
|
|
787
871
|
# Returns the dictionary of classes that will be used given the na-
|
|
788
872
|
# mes and the available classes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{davout-0.1.1.dev170 → davout-0.1.1.dev172}/source/Davout/CuboidGmsh/aa_tests/RVEs/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|