burnman-cpp 0.1.0__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.
- burnman_cpp-0.1.0/.clang-format +8 -0
- burnman_cpp-0.1.0/.github/workflows/benchmarks.yml +123 -0
- burnman_cpp-0.1.0/.github/workflows/format.yml +32 -0
- burnman_cpp-0.1.0/.github/workflows/tests.yml +149 -0
- burnman_cpp-0.1.0/.gitignore +30 -0
- burnman_cpp-0.1.0/CMakeLists.txt +107 -0
- burnman_cpp-0.1.0/LICENSE +674 -0
- burnman_cpp-0.1.0/Makefile +171 -0
- burnman_cpp-0.1.0/PKG-INFO +204 -0
- burnman_cpp-0.1.0/README.md +188 -0
- burnman_cpp-0.1.0/benchmarks/README.md +71 -0
- burnman_cpp-0.1.0/benchmarks/core/benchmark_assemblage.cpp +392 -0
- burnman_cpp-0.1.0/benchmarks/core/benchmark_mineral.cpp +174 -0
- burnman_cpp-0.1.0/benchmarks/cpp_python_speedup.py +81 -0
- burnman_cpp-0.1.0/benchmarks/eos/benchmark_property_modifiers.cpp +109 -0
- burnman_cpp-0.1.0/benchmarks/parse_benchmarks.py +660 -0
- burnman_cpp-0.1.0/benchmarks/python_benchmarks.py +461 -0
- burnman_cpp-0.1.0/benchmarks/requirements.txt +3 -0
- burnman_cpp-0.1.0/examples/example_basalt_phase_diagram.py +153 -0
- burnman_cpp-0.1.0/examples/example_composition.py +43 -0
- burnman_cpp-0.1.0/examples/example_equilibrate.py +565 -0
- burnman_cpp-0.1.0/examples/example_forsterite_thermodynamic_sections.py +228 -0
- burnman_cpp-0.1.0/examples/example_green2025_at1.py +54 -0
- burnman_cpp-0.1.0/examples/example_green2025_klb1.py +53 -0
- burnman_cpp-0.1.0/examples/example_green2025_mix1g.py +52 -0
- burnman_cpp-0.1.0/examples/example_green2025_re46.py +54 -0
- burnman_cpp-0.1.0/examples/example_green2025_ton101s.py +54 -0
- burnman_cpp-0.1.0/examples/example_green2025_ton101u.py +53 -0
- burnman_cpp-0.1.0/examples/example_harzburgite_basalt_px.py +137 -0
- burnman_cpp-0.1.0/examples/example_iron_hematite_tx.py +99 -0
- burnman_cpp-0.1.0/examples/example_metasediment_contours.py +143 -0
- burnman_cpp-0.1.0/examples/example_metasediment_phase_diagram.py +164 -0
- burnman_cpp-0.1.0/examples/example_olivine_px.py +113 -0
- burnman_cpp-0.1.0/examples/example_olivine_tx.py +37 -0
- burnman_cpp-0.1.0/examples/example_olivine_vx.py +35 -0
- burnman_cpp-0.1.0/examples/example_patch_phase_diagram.py +193 -0
- burnman_cpp-0.1.0/examples/example_phase_diagram_grid.py +176 -0
- burnman_cpp-0.1.0/examples/example_plot_pyrolite_sp_relaxed_properties.py +322 -0
- burnman_cpp-0.1.0/examples/example_pyrolite_phase_diagram.py +309 -0
- burnman_cpp-0.1.0/examples/example_pyrolite_phase_diagram_zoom.py +77 -0
- burnman_cpp-0.1.0/examples/example_pyrolite_sp_phase_diagram.py +153 -0
- burnman_cpp-0.1.0/examples/example_refine_phase_diagram.py +120 -0
- burnman_cpp-0.1.0/examples/example_single_point_equilibrium.py +77 -0
- burnman_cpp-0.1.0/examples/example_solution_equilibrium.py +86 -0
- burnman_cpp-0.1.0/examples/green2025.py +295 -0
- burnman_cpp-0.1.0/examples/green2025_reference.md +62 -0
- burnman_cpp-0.1.0/include/burnman/core/assemblage.hpp +372 -0
- burnman_cpp-0.1.0/include/burnman/core/combined_mineral.hpp +30 -0
- burnman_cpp-0.1.0/include/burnman/core/composite_material.hpp +221 -0
- burnman_cpp-0.1.0/include/burnman/core/composition.hpp +94 -0
- burnman_cpp-0.1.0/include/burnman/core/equation_of_state.hpp +347 -0
- burnman_cpp-0.1.0/include/burnman/core/material.hpp +737 -0
- burnman_cpp-0.1.0/include/burnman/core/mineral.hpp +166 -0
- burnman_cpp-0.1.0/include/burnman/core/relaxed_solution.hpp +45 -0
- burnman_cpp-0.1.0/include/burnman/core/solution.hpp +511 -0
- burnman_cpp-0.1.0/include/burnman/core/solution_model.hpp +44 -0
- burnman_cpp-0.1.0/include/burnman/core/solution_models/asymmetric_regular_solution.hpp +124 -0
- burnman_cpp-0.1.0/include/burnman/core/solution_models/ideal_solution.hpp +113 -0
- burnman_cpp-0.1.0/include/burnman/core/solution_models/solution_model_base.hpp +349 -0
- burnman_cpp-0.1.0/include/burnman/core/solution_models/symmetric_regular_solution.hpp +47 -0
- burnman_cpp-0.1.0/include/burnman/eos/birch_murnaghan.hpp +172 -0
- burnman_cpp-0.1.0/include/burnman/eos/components/bukowinski_electronic.hpp +106 -0
- burnman_cpp-0.1.0/include/burnman/eos/components/debye.hpp +79 -0
- burnman_cpp-0.1.0/include/burnman/eos/components/einstein.hpp +56 -0
- burnman_cpp-0.1.0/include/burnman/eos/components/excess_params.hpp +138 -0
- burnman_cpp-0.1.0/include/burnman/eos/components/gsl_params.hpp +77 -0
- burnman_cpp-0.1.0/include/burnman/eos/components/property_modifiers.hpp +250 -0
- burnman_cpp-0.1.0/include/burnman/eos/hp.hpp +178 -0
- burnman_cpp-0.1.0/include/burnman/eos/hp_liquid.hpp +40 -0
- burnman_cpp-0.1.0/include/burnman/eos/make_eos.hpp +32 -0
- burnman_cpp-0.1.0/include/burnman/eos/mie_grueneisen_debye.hpp +223 -0
- burnman_cpp-0.1.0/include/burnman/eos/modified_tait.hpp +144 -0
- burnman_cpp-0.1.0/include/burnman/eos/slb.hpp +272 -0
- burnman_cpp-0.1.0/include/burnman/eos/vinet.hpp +110 -0
- burnman_cpp-0.1.0/include/burnman/minerals/datasets.hpp +1494 -0
- burnman_cpp-0.1.0/include/burnman/minerals/model_sets.hpp +37 -0
- burnman_cpp-0.1.0/include/burnman/minerals/phase_aliases.hpp +23 -0
- burnman_cpp-0.1.0/include/burnman/minerals/water.hpp +43 -0
- burnman_cpp-0.1.0/include/burnman/optim/roots/bracket.hpp +75 -0
- burnman_cpp-0.1.0/include/burnman/optim/roots/brent.hpp +112 -0
- burnman_cpp-0.1.0/include/burnman/optim/roots/damped_newton_solver.hpp +216 -0
- burnman_cpp-0.1.0/include/burnman/optim/roots/damped_newton_state.hpp +72 -0
- burnman_cpp-0.1.0/include/burnman/optim/roots/damped_newton_types.hpp +144 -0
- burnman_cpp-0.1.0/include/burnman/tools/averaging/averaging_base.hpp +110 -0
- burnman_cpp-0.1.0/include/burnman/tools/averaging/averaging_schemes.hpp +46 -0
- burnman_cpp-0.1.0/include/burnman/tools/averaging/averaging_utils.hpp +100 -0
- burnman_cpp-0.1.0/include/burnman/tools/averaging/hs.hpp +45 -0
- burnman_cpp-0.1.0/include/burnman/tools/averaging/hs_lower.hpp +52 -0
- burnman_cpp-0.1.0/include/burnman/tools/averaging/hs_upper.hpp +52 -0
- burnman_cpp-0.1.0/include/burnman/tools/averaging/reuss.hpp +46 -0
- burnman_cpp-0.1.0/include/burnman/tools/averaging/voigt.hpp +46 -0
- burnman_cpp-0.1.0/include/burnman/tools/averaging/vrh.hpp +45 -0
- burnman_cpp-0.1.0/include/burnman/tools/equilibration/equality_constraint_base.hpp +86 -0
- burnman_cpp-0.1.0/include/burnman/tools/equilibration/equality_constraint_helpers.hpp +146 -0
- burnman_cpp-0.1.0/include/burnman/tools/equilibration/equality_constraint_variants.hpp +178 -0
- burnman_cpp-0.1.0/include/burnman/tools/equilibration/equality_constraints.hpp +21 -0
- burnman_cpp-0.1.0/include/burnman/tools/equilibration/equilibrate.hpp +39 -0
- burnman_cpp-0.1.0/include/burnman/tools/equilibration/equilibrate_impl.hpp +79 -0
- burnman_cpp-0.1.0/include/burnman/tools/equilibration/equilibrate_lambda_bounds.hpp +39 -0
- burnman_cpp-0.1.0/include/burnman/tools/equilibration/equilibrate_objective.hpp +71 -0
- burnman_cpp-0.1.0/include/burnman/tools/equilibration/equilibrate_types.hpp +68 -0
- burnman_cpp-0.1.0/include/burnman/tools/equilibration/equilibrate_utils.hpp +98 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/boundary_repair.hpp +43 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/calculation.hpp +106 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/common.hpp +206 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/consistency.hpp +71 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/continuation.hpp +172 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/contours.hpp +78 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/critical.hpp +58 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/domain.hpp +47 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/polygons.hpp +42 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/properties.hpp +136 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/refinement.hpp +63 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/stability.hpp +251 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/tracing.hpp +262 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/types.hpp +353 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram/verification.hpp +44 -0
- burnman_cpp-0.1.0/include/burnman/tools/phase_diagram.hpp +22 -0
- burnman_cpp-0.1.0/include/burnman/tools/polytope.hpp +99 -0
- burnman_cpp-0.1.0/include/burnman/utils/chemistry_utils.hpp +97 -0
- burnman_cpp-0.1.0/include/burnman/utils/constants.hpp +150 -0
- burnman_cpp-0.1.0/include/burnman/utils/exceptions.hpp +44 -0
- burnman_cpp-0.1.0/include/burnman/utils/index_utils.hpp +35 -0
- burnman_cpp-0.1.0/include/burnman/utils/math_utils.hpp +73 -0
- burnman_cpp-0.1.0/include/burnman/utils/matrix_utils.hpp +260 -0
- burnman_cpp-0.1.0/include/burnman/utils/polygon_utils.hpp +74 -0
- burnman_cpp-0.1.0/include/burnman/utils/string_utils.hpp +108 -0
- burnman_cpp-0.1.0/include/burnman/utils/types/mineral_params.hpp +124 -0
- burnman_cpp-0.1.0/include/burnman/utils/types/ndarray.hpp +142 -0
- burnman_cpp-0.1.0/include/burnman/utils/types/simple_types.hpp +121 -0
- burnman_cpp-0.1.0/include/burnman/utils/types/types.hpp +46 -0
- burnman_cpp-0.1.0/include/burnman/utils/utils.hpp +37 -0
- burnman_cpp-0.1.0/include/burnman/utils/validate_optionals.hpp +102 -0
- burnman_cpp-0.1.0/include/burnman/utils/vector_utils.hpp +79 -0
- burnman_cpp-0.1.0/include/burnman/utils/warnings.hpp +42 -0
- burnman_cpp-0.1.0/pyproject.toml +36 -0
- burnman_cpp-0.1.0/python/bindings/bindings.hpp +98 -0
- burnman_cpp-0.1.0/python/bindings/combined.cpp +32 -0
- burnman_cpp-0.1.0/python/bindings/composition.cpp +141 -0
- burnman_cpp-0.1.0/python/bindings/equilibration.cpp +337 -0
- burnman_cpp-0.1.0/python/bindings/materials.cpp +258 -0
- burnman_cpp-0.1.0/python/bindings/minerals.cpp +1469 -0
- burnman_cpp-0.1.0/python/bindings/model_sets.cpp +60 -0
- burnman_cpp-0.1.0/python/bindings/modifiers.cpp +94 -0
- burnman_cpp-0.1.0/python/bindings/module.cpp +43 -0
- burnman_cpp-0.1.0/python/bindings/params.cpp +111 -0
- burnman_cpp-0.1.0/python/bindings/phase_diagram.cpp +1269 -0
- burnman_cpp-0.1.0/python/bindings/polytope.cpp +63 -0
- burnman_cpp-0.1.0/python/bindings/solutions.cpp +240 -0
- burnman_cpp-0.1.0/python/bindings/utils.cpp +42 -0
- burnman_cpp-0.1.0/python/burnman_cpp/__init__.py +364 -0
- burnman_cpp-0.1.0/python/burnman_cpp/adapters.py +116 -0
- burnman_cpp-0.1.0/python/burnman_cpp/constants.py +39 -0
- burnman_cpp-0.1.0/python/burnman_cpp/minerals/__init__.py +59 -0
- burnman_cpp-0.1.0/python/burnman_cpp/tools/__init__.py +103 -0
- burnman_cpp-0.1.0/python/burnman_cpp/tools/aspect.py +290 -0
- burnman_cpp-0.1.0/python/burnman_cpp/tools/contours.py +148 -0
- burnman_cpp-0.1.0/python/burnman_cpp/tools/phase_diagram.py +1524 -0
- burnman_cpp-0.1.0/python/burnman_cpp/tools/phase_diagram_helpers.py +297 -0
- burnman_cpp-0.1.0/python/burnman_cpp/tools/phase_diagram_workflow.py +599 -0
- burnman_cpp-0.1.0/python/burnman_cpp/tools/polytope.py +30 -0
- burnman_cpp-0.1.0/python/burnman_cpp/tools/potential_grid.py +1029 -0
- burnman_cpp-0.1.0/python/burnman_cpp/tools/properties.py +397 -0
- burnman_cpp-0.1.0/python/tests/conftest.py +85 -0
- burnman_cpp-0.1.0/python/tests/data/basalt_field_verification.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/basalt_local_amphibole.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/basalt_local_plagioclase.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/basalt_nearby_bivariant_junctions.json +11868 -0
- burnman_cpp-0.1.0/python/tests/data/forsterite_latent_interval.json +1469 -0
- burnman_cpp-0.1.0/python/tests/data/green_provisional_loops.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/harzburgite_garnet_composition_boundary.json +443 -0
- burnman_cpp-0.1.0/python/tests/data/harzburgite_thin_composition_field.json +466 -0
- burnman_cpp-0.1.0/python/tests/data/metasediment_contour_field.json +847 -0
- burnman_cpp-0.1.0/python/tests/data/metasediment_contour_ordering_field.json +615 -0
- burnman_cpp-0.1.0/python/tests/data/metasediment_curve_edit.json +4016 -0
- burnman_cpp-0.1.0/python/tests/data/metasediment_curved_mica_field.json +7593 -0
- burnman_cpp-0.1.0/python/tests/data/metasediment_curved_node_connections.json +23451 -0
- burnman_cpp-0.1.0/python/tests/data/metasediment_endpoints.json +1457 -0
- burnman_cpp-0.1.0/python/tests/data/metasediment_missing_melt_connection.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/metasediment_ordering_segment.json +445 -0
- burnman_cpp-0.1.0/python/tests/data/metasediment_parallel_fields.json +11722 -0
- burnman_cpp-0.1.0/python/tests/data/metasediment_thin_finite_field.json +2684 -0
- burnman_cpp-0.1.0/python/tests/data/metasediment_univariant_loop.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/metasediment_univariant_segments.json +2173 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_cold_endpoints.json +1070 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_critical_endpoints.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_crossed_loops.json +10306 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_duplicate_curve.json +1174 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_duplicate_invariant.json +8832 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_duplicate_junctions.json +40035 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_endpoints.json +775 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_exchanged_junction_zeros.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_frame_order.json +2566 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_limiting_neighbours.json +2230 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_local_opx.json +16585 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_missing_solution_branch.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_model_limit.json +288 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_narrow_curves.json +138 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_narrow_solution_replacement.json +571 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_nearby_junctions.json +1134 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_nearby_univariant_junctions.json +9236 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_neighbouring_branches.json +1737 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_partial_duplicate.json +5912 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_perimeter_neighbours.json +3491 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_pt_equivalent_reaction_curves.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_pt_garnet_stability.json +1085 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_pt_model_limit_duplicates.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_pt_repair_regressions.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_reaction_extents.json +6325 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_refinement_segment.json +1033 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_retired_junction_geometry.json +1215 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_short_branch_labels.json +922 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_solution_replacement.json +1208 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_solvus_seeds.json +363 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_ak_branch_switch.json +185 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_cf_copy_junctions.json +2447 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_enthalpy_branch.json +2290 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_failed_bracket.json +679 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_false_cpx_junction.json +2967 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_false_junction.json +1820 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_junction.json +2473 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_missing_ak_boundary.json +3255 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_reaction_classification.json +1 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_soft_grid_point.json +596 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_trace_site_junctions.json +10802 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_unconnected_junctions.json +2981 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_sp_wrong_branch_junction.json +1110 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_stable_vertex_loop.json +468 -0
- burnman_cpp-0.1.0/python/tests/data/pyrolite_zoom_reaction_limits.json +1 -0
- burnman_cpp-0.1.0/python/tests/test_adapters.py +229 -0
- burnman_cpp-0.1.0/python/tests/test_aspect_table.py +367 -0
- burnman_cpp-0.1.0/python/tests/test_bindings.py +173 -0
- burnman_cpp-0.1.0/python/tests/test_complete_datasets.py +412 -0
- burnman_cpp-0.1.0/python/tests/test_composition.py +289 -0
- burnman_cpp-0.1.0/python/tests/test_composition_phase_diagram.py +384 -0
- burnman_cpp-0.1.0/python/tests/test_composition_reference.py +133 -0
- burnman_cpp-0.1.0/python/tests/test_constants.py +53 -0
- burnman_cpp-0.1.0/python/tests/test_contour_tools.py +199 -0
- burnman_cpp-0.1.0/python/tests/test_enthalpy_ps_infill.py +171 -0
- burnman_cpp-0.1.0/python/tests/test_equilibration.py +252 -0
- burnman_cpp-0.1.0/python/tests/test_forsterite_sections.py +222 -0
- burnman_cpp-0.1.0/python/tests/test_gaussian_moment_corrected.py +183 -0
- burnman_cpp-0.1.0/python/tests/test_green2025.py +96 -0
- burnman_cpp-0.1.0/python/tests/test_melt.py +47 -0
- burnman_cpp-0.1.0/python/tests/test_mineral_catalogue_reference.py +192 -0
- burnman_cpp-0.1.0/python/tests/test_model_sets.py +186 -0
- burnman_cpp-0.1.0/python/tests/test_modifiers.py +61 -0
- burnman_cpp-0.1.0/python/tests/test_native_failure_reference.py +367 -0
- burnman_cpp-0.1.0/python/tests/test_native_minerals.py +100 -0
- burnman_cpp-0.1.0/python/tests/test_phase_diagram.py +1356 -0
- burnman_cpp-0.1.0/python/tests/test_phase_diagram_branch_identity.py +105 -0
- burnman_cpp-0.1.0/python/tests/test_phase_diagram_consistency.py +109 -0
- burnman_cpp-0.1.0/python/tests/test_phase_diagram_contours.py +560 -0
- burnman_cpp-0.1.0/python/tests/test_phase_diagram_critical_endpoints.py +105 -0
- burnman_cpp-0.1.0/python/tests/test_phase_diagram_line_resolution.py +1625 -0
- burnman_cpp-0.1.0/python/tests/test_phase_diagram_partial_duplicates.py +102 -0
- burnman_cpp-0.1.0/python/tests/test_phase_diagram_patching.py +487 -0
- burnman_cpp-0.1.0/python/tests/test_phase_diagram_perimeter_labels.py +183 -0
- burnman_cpp-0.1.0/python/tests/test_phase_diagram_plot.py +1674 -0
- burnman_cpp-0.1.0/python/tests/test_phase_diagram_workflow.py +606 -0
- burnman_cpp-0.1.0/python/tests/test_polygon_utils.py +39 -0
- burnman_cpp-0.1.0/python/tests/test_polytope.py +295 -0
- burnman_cpp-0.1.0/python/tests/test_potential_grid.py +131 -0
- burnman_cpp-0.1.0/python/tests/test_property_grid.py +1362 -0
- burnman_cpp-0.1.0/python/tests/test_reference_tools.py +57 -0
- burnman_cpp-0.1.0/python/tests/test_slb2024.py +638 -0
- burnman_cpp-0.1.0/python/tests/test_slb_reference.py +577 -0
- burnman_cpp-0.1.0/python/tests/test_stable_equilibrium.py +70 -0
- burnman_cpp-0.1.0/python/tests/test_thermodynamic_phase_diagram.py +976 -0
- burnman_cpp-0.1.0/src/core/assemblage.cpp +443 -0
- burnman_cpp-0.1.0/src/core/combined_mineral.cpp +149 -0
- burnman_cpp-0.1.0/src/core/composite_material.cpp +276 -0
- burnman_cpp-0.1.0/src/core/composition.cpp +463 -0
- burnman_cpp-0.1.0/src/core/equation_of_state.cpp +149 -0
- burnman_cpp-0.1.0/src/core/material.cpp +352 -0
- burnman_cpp-0.1.0/src/core/mineral.cpp +255 -0
- burnman_cpp-0.1.0/src/core/relaxed_solution.cpp +168 -0
- burnman_cpp-0.1.0/src/core/solution.cpp +434 -0
- burnman_cpp-0.1.0/src/core/solution_models/asymmetric_regular_solution.cpp +176 -0
- burnman_cpp-0.1.0/src/core/solution_models/ideal_solution.cpp +176 -0
- burnman_cpp-0.1.0/src/core/solution_models/solution_model_base.cpp +330 -0
- burnman_cpp-0.1.0/src/core/solution_models/symmetric_regular_solution.cpp +28 -0
- burnman_cpp-0.1.0/src/eos/birch_murnaghan.cpp +218 -0
- burnman_cpp-0.1.0/src/eos/components/bukowinski_electronic.cpp +55 -0
- burnman_cpp-0.1.0/src/eos/components/debye.cpp +115 -0
- burnman_cpp-0.1.0/src/eos/components/einstein.cpp +85 -0
- burnman_cpp-0.1.0/src/eos/components/property_modifiers.cpp +460 -0
- burnman_cpp-0.1.0/src/eos/hp.cpp +295 -0
- burnman_cpp-0.1.0/src/eos/hp_liquid.cpp +89 -0
- burnman_cpp-0.1.0/src/eos/make_eos.cpp +58 -0
- burnman_cpp-0.1.0/src/eos/mie_grueneisen_debye.cpp +278 -0
- burnman_cpp-0.1.0/src/eos/modified_tait.cpp +176 -0
- burnman_cpp-0.1.0/src/eos/slb.cpp +567 -0
- burnman_cpp-0.1.0/src/eos/vinet.cpp +172 -0
- burnman_cpp-0.1.0/src/minerals/datasets.cpp +32959 -0
- burnman_cpp-0.1.0/src/minerals/model_sets.cpp +145 -0
- burnman_cpp-0.1.0/src/minerals/phase_aliases.cpp +51 -0
- burnman_cpp-0.1.0/src/minerals/water.cpp +217 -0
- burnman_cpp-0.1.0/src/optim/roots/damped_newton_solver.cpp +387 -0
- burnman_cpp-0.1.0/src/tools/averaging/averaging_base.cpp +40 -0
- burnman_cpp-0.1.0/src/tools/averaging/averaging_utils.cpp +109 -0
- burnman_cpp-0.1.0/src/tools/averaging/hs.cpp +36 -0
- burnman_cpp-0.1.0/src/tools/averaging/hs_lower.cpp +31 -0
- burnman_cpp-0.1.0/src/tools/averaging/hs_upper.cpp +31 -0
- burnman_cpp-0.1.0/src/tools/averaging/reuss.cpp +33 -0
- burnman_cpp-0.1.0/src/tools/averaging/voigt.cpp +33 -0
- burnman_cpp-0.1.0/src/tools/averaging/vrh.cpp +34 -0
- burnman_cpp-0.1.0/src/tools/equilibration/equality_constraint_variants.cpp +310 -0
- burnman_cpp-0.1.0/src/tools/equilibration/equilibrate_impl.cpp +362 -0
- burnman_cpp-0.1.0/src/tools/equilibration/equilibrate_lambda_bounds.cpp +46 -0
- burnman_cpp-0.1.0/src/tools/equilibration/equilibrate_objective.cpp +161 -0
- burnman_cpp-0.1.0/src/tools/equilibration/equilibrate_utils.cpp +265 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/boundary_repair.cpp +724 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/calculation.cpp +403 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/common.cpp +76 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/consistency.cpp +326 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/continuation.cpp +1096 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/contours.cpp +718 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/critical.cpp +199 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/domain.cpp +379 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/polygons.cpp +1321 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/potential.cpp +555 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/properties.cpp +1068 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/refinement.cpp +253 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/stability.cpp +1850 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/tracing.cpp +2862 -0
- burnman_cpp-0.1.0/src/tools/phase_diagram/verification.cpp +338 -0
- burnman_cpp-0.1.0/src/tools/polytope.cpp +309 -0
- burnman_cpp-0.1.0/src/tools/solution_simplification.cpp +404 -0
- burnman_cpp-0.1.0/src/utils/chemistry_utils.cpp +85 -0
- burnman_cpp-0.1.0/src/utils/polygon_utils.cpp +133 -0
- burnman_cpp-0.1.0/tests/core/test_assemblage.cpp +359 -0
- burnman_cpp-0.1.0/tests/core/test_composition.cpp +152 -0
- burnman_cpp-0.1.0/tests/core/test_material.cpp +105 -0
- burnman_cpp-0.1.0/tests/core/test_mineral.cpp +356 -0
- burnman_cpp-0.1.0/tests/core/test_solution.cpp +299 -0
- burnman_cpp-0.1.0/tests/core/test_solution_model.cpp +537 -0
- burnman_cpp-0.1.0/tests/eos/test_birch_murnaghan.cpp +332 -0
- burnman_cpp-0.1.0/tests/eos/test_bukowinski_electronic.cpp +80 -0
- burnman_cpp-0.1.0/tests/eos/test_debye.cpp +177 -0
- burnman_cpp-0.1.0/tests/eos/test_einstein.cpp +128 -0
- burnman_cpp-0.1.0/tests/eos/test_excess_params.cpp +49 -0
- burnman_cpp-0.1.0/tests/eos/test_hp.cpp +362 -0
- burnman_cpp-0.1.0/tests/eos/test_mie_grueneisen_debye.cpp +493 -0
- burnman_cpp-0.1.0/tests/eos/test_modified_tait.cpp +251 -0
- burnman_cpp-0.1.0/tests/eos/test_property_modifiers.cpp +423 -0
- burnman_cpp-0.1.0/tests/eos/test_slb.cpp +579 -0
- burnman_cpp-0.1.0/tests/eos/test_vinet.cpp +269 -0
- burnman_cpp-0.1.0/tests/eos/test_volume_accuracy.cpp +48 -0
- burnman_cpp-0.1.0/tests/include/eos_names.hpp +47 -0
- burnman_cpp-0.1.0/tests/include/equilibration_fixtures.hpp +61 -0
- burnman_cpp-0.1.0/tests/include/ps1994_reference.hpp +108 -0
- burnman_cpp-0.1.0/tests/include/solution_fixtures.hpp +301 -0
- burnman_cpp-0.1.0/tests/include/thermocalc_reference.hpp +313 -0
- burnman_cpp-0.1.0/tests/include/tolerances.hpp +28 -0
- burnman_cpp-0.1.0/tests/minerals/test_native_datasets.cpp +148 -0
- burnman_cpp-0.1.0/tests/minerals/test_thermocalc_reference.cpp +96 -0
- burnman_cpp-0.1.0/tests/minerals/test_water.cpp +181 -0
- burnman_cpp-0.1.0/tests/optim/roots/test_roots.cpp +130 -0
- burnman_cpp-0.1.0/tests/reference/burnman.json +5 -0
- burnman_cpp-0.1.0/tests/reference/ps1994.json +6 -0
- burnman_cpp-0.1.0/tests/reference/thermocalc_metapelite.json +19 -0
- burnman_cpp-0.1.0/tests/test_main.cpp +24 -0
- burnman_cpp-0.1.0/tests/tools/averaging/test_averaging_schemes.cpp +135 -0
- burnman_cpp-0.1.0/tests/tools/equilibration/test_equality_constraints.cpp +222 -0
- burnman_cpp-0.1.0/tests/tools/equilibration/test_equilibrate.cpp +100 -0
- burnman_cpp-0.1.0/tests/tools/equilibration/test_equilibrate_lambda_bounds.cpp +58 -0
- burnman_cpp-0.1.0/tests/tools/equilibration/test_equilibrate_objective.cpp +81 -0
- burnman_cpp-0.1.0/tests/tools/equilibration/test_equilibrate_utils.cpp +74 -0
- burnman_cpp-0.1.0/tests/tools/test_phase_diagram.cpp +1150 -0
- burnman_cpp-0.1.0/tests/tools/test_phase_diagram_consistency.cpp +244 -0
- burnman_cpp-0.1.0/tests/tools/test_polytope.cpp +57 -0
- burnman_cpp-0.1.0/tests/utils/test_chemistry_utils.cpp +78 -0
- burnman_cpp-0.1.0/tests/utils/test_constants.cpp +25 -0
- burnman_cpp-0.1.0/tests/utils/test_exceptions.cpp +46 -0
- burnman_cpp-0.1.0/tests/utils/test_index_utils.cpp +35 -0
- burnman_cpp-0.1.0/tests/utils/test_math_utils.cpp +103 -0
- burnman_cpp-0.1.0/tests/utils/test_matrix_utils.cpp +284 -0
- burnman_cpp-0.1.0/tests/utils/test_polygon_utils.cpp +70 -0
- burnman_cpp-0.1.0/tests/utils/test_string_utils.cpp +54 -0
- burnman_cpp-0.1.0/tests/utils/test_types.cpp +119 -0
- burnman_cpp-0.1.0/tests/utils/test_validate_optionals.cpp +74 -0
- burnman_cpp-0.1.0/tests/utils/test_vector_utils.cpp +92 -0
- burnman_cpp-0.1.0/tests/utils/test_warnings.cpp +36 -0
- burnman_cpp-0.1.0/tools/burnman_reference.py +49 -0
- burnman_cpp-0.1.0/tools/check_reference_data.py +825 -0
- burnman_cpp-0.1.0/tools/export_example_minerals.py +450 -0
- burnman_cpp-0.1.0/tools/extract_thermocalc_reference.py +188 -0
- burnman_cpp-0.1.0/tools/generate_ps1994_reference.py +254 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
name: Benchmarks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
defaults:
|
|
16
|
+
run:
|
|
17
|
+
shell: bash
|
|
18
|
+
|
|
19
|
+
env:
|
|
20
|
+
MPLBACKEND: Agg
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
cpp:
|
|
24
|
+
name: C++ performance benchmarks
|
|
25
|
+
runs-on: ubuntu-24.04
|
|
26
|
+
timeout-minutes: 20
|
|
27
|
+
steps:
|
|
28
|
+
- name: Check out repository
|
|
29
|
+
uses: actions/checkout@v7
|
|
30
|
+
with:
|
|
31
|
+
persist-credentials: false
|
|
32
|
+
|
|
33
|
+
- name: Set up Python
|
|
34
|
+
uses: actions/setup-python@v7
|
|
35
|
+
with:
|
|
36
|
+
python-version: "3.12"
|
|
37
|
+
|
|
38
|
+
- name: Configure plotting environment
|
|
39
|
+
run: echo "MPLCONFIGDIR=$RUNNER_TEMP/matplotlib" >> "$GITHUB_ENV"
|
|
40
|
+
|
|
41
|
+
- name: Install native dependencies
|
|
42
|
+
run: |
|
|
43
|
+
sudo apt-get update
|
|
44
|
+
sudo apt-get install -y --no-install-recommends \
|
|
45
|
+
cmake g++ catch2 libeigen3-dev libgsl-dev \
|
|
46
|
+
libcdd-dev libgmp-dev libnlopt-cxx-dev
|
|
47
|
+
|
|
48
|
+
- name: Configure benchmarks
|
|
49
|
+
run: |
|
|
50
|
+
cmake -S . -B build/ci-benchmarks \
|
|
51
|
+
-DCMAKE_BUILD_TYPE=Release \
|
|
52
|
+
-DBURNMAN_BUILD_PYTHON=OFF \
|
|
53
|
+
-DBURNMAN_BUILD_TESTS=OFF \
|
|
54
|
+
-DBURNMAN_BUILD_BENCHMARKS=ON \
|
|
55
|
+
-DBURNMAN_WARNINGS_AS_ERRORS=ON
|
|
56
|
+
|
|
57
|
+
- name: Build benchmarks
|
|
58
|
+
run: cmake --build build/ci-benchmarks --parallel 2
|
|
59
|
+
|
|
60
|
+
- name: Run benchmarks
|
|
61
|
+
run: ctest --test-dir build/ci-benchmarks --output-on-failure -L benchmarks
|
|
62
|
+
|
|
63
|
+
- name: Install reporting dependencies
|
|
64
|
+
run: python -m pip install -r benchmarks/requirements.txt
|
|
65
|
+
|
|
66
|
+
- name: Process benchmark report
|
|
67
|
+
run: |
|
|
68
|
+
python benchmarks/parse_benchmarks.py \
|
|
69
|
+
build/ci-benchmarks/benchmark-report.xml ci \
|
|
70
|
+
--output-dir build/ci-benchmarks/results --no-plots
|
|
71
|
+
|
|
72
|
+
- name: Upload benchmark reports
|
|
73
|
+
if: always()
|
|
74
|
+
uses: actions/upload-artifact@v7
|
|
75
|
+
with:
|
|
76
|
+
name: cpp-benchmark-reports
|
|
77
|
+
path: |
|
|
78
|
+
build/ci-benchmarks/benchmark-report.xml
|
|
79
|
+
build/ci-benchmarks/results/
|
|
80
|
+
build/ci-benchmarks/Testing/Temporary/LastTest.log
|
|
81
|
+
if-no-files-found: ignore
|
|
82
|
+
|
|
83
|
+
python:
|
|
84
|
+
name: Python BurnMan reference benchmarks
|
|
85
|
+
runs-on: ubuntu-24.04
|
|
86
|
+
timeout-minutes: 20
|
|
87
|
+
env:
|
|
88
|
+
PYTHONDONTWRITEBYTECODE: "1"
|
|
89
|
+
steps:
|
|
90
|
+
- name: Check out repository
|
|
91
|
+
uses: actions/checkout@v7
|
|
92
|
+
with:
|
|
93
|
+
persist-credentials: false
|
|
94
|
+
|
|
95
|
+
- name: Check out reference BurnMan
|
|
96
|
+
uses: actions/checkout@v7
|
|
97
|
+
with:
|
|
98
|
+
repository: geodynamics/burnman
|
|
99
|
+
ref: 39b582cd23954fabd3bdbbee6526a522b1d97bc9
|
|
100
|
+
path: build/python-burnman-reference
|
|
101
|
+
persist-credentials: false
|
|
102
|
+
|
|
103
|
+
- name: Set up Python
|
|
104
|
+
uses: actions/setup-python@v7
|
|
105
|
+
with:
|
|
106
|
+
python-version: "3.12"
|
|
107
|
+
|
|
108
|
+
- name: Configure plotting environment
|
|
109
|
+
run: echo "MPLCONFIGDIR=$RUNNER_TEMP/matplotlib" >> "$GITHUB_ENV"
|
|
110
|
+
|
|
111
|
+
- name: Install reference BurnMan
|
|
112
|
+
run: python -m pip install ./build/python-burnman-reference
|
|
113
|
+
|
|
114
|
+
- name: Run Python reference benchmarks
|
|
115
|
+
run: python benchmarks/python_benchmarks.py --output-dir build/ci-python-benchmarks
|
|
116
|
+
|
|
117
|
+
- name: Upload Python benchmark reports
|
|
118
|
+
if: always()
|
|
119
|
+
uses: actions/upload-artifact@v7
|
|
120
|
+
with:
|
|
121
|
+
name: python-benchmark-reports
|
|
122
|
+
path: build/ci-python-benchmarks/*.csv
|
|
123
|
+
if-no-files-found: ignore
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Check formatting
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
format:
|
|
13
|
+
runs-on: ubuntu-24.04
|
|
14
|
+
defaults:
|
|
15
|
+
run:
|
|
16
|
+
shell: bash
|
|
17
|
+
steps:
|
|
18
|
+
- name: Check out repository
|
|
19
|
+
uses: actions/checkout@v7
|
|
20
|
+
with:
|
|
21
|
+
persist-credentials: false
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
uses: actions/setup-python@v7
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.12"
|
|
27
|
+
|
|
28
|
+
- name: Install formatters
|
|
29
|
+
run: python -m pip install -r contrib/utilities/requirements-format.txt
|
|
30
|
+
|
|
31
|
+
- name: Check source formatting
|
|
32
|
+
run: ./contrib/utilities/indent.sh --check --tracked
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
defaults:
|
|
16
|
+
run:
|
|
17
|
+
shell: bash
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
cpp:
|
|
21
|
+
name: C++ tests
|
|
22
|
+
runs-on: ubuntu-24.04
|
|
23
|
+
timeout-minutes: 20
|
|
24
|
+
steps:
|
|
25
|
+
- name: Check out repository
|
|
26
|
+
uses: actions/checkout@v7
|
|
27
|
+
with:
|
|
28
|
+
persist-credentials: false
|
|
29
|
+
|
|
30
|
+
- name: Install native dependencies
|
|
31
|
+
run: |
|
|
32
|
+
sudo apt-get update
|
|
33
|
+
sudo apt-get install -y --no-install-recommends \
|
|
34
|
+
cmake g++ catch2 libeigen3-dev libgsl-dev \
|
|
35
|
+
libcdd-dev libgmp-dev libnlopt-cxx-dev
|
|
36
|
+
|
|
37
|
+
- name: Configure C++ tests
|
|
38
|
+
run: |
|
|
39
|
+
cmake -S . -B build/ci-cpp \
|
|
40
|
+
-DCMAKE_BUILD_TYPE=Release \
|
|
41
|
+
-DBURNMAN_BUILD_PYTHON=OFF \
|
|
42
|
+
-DBURNMAN_BUILD_TESTS=ON \
|
|
43
|
+
-DBURNMAN_WARNINGS_AS_ERRORS=ON
|
|
44
|
+
|
|
45
|
+
- name: Build C++ tests
|
|
46
|
+
run: cmake --build build/ci-cpp --parallel 2
|
|
47
|
+
|
|
48
|
+
- name: Run C++ unit tests
|
|
49
|
+
run: ctest --test-dir build/ci-cpp --output-on-failure
|
|
50
|
+
|
|
51
|
+
python:
|
|
52
|
+
name: Python ${{ matrix.python-version }} tests
|
|
53
|
+
runs-on: ubuntu-24.04
|
|
54
|
+
timeout-minutes: 20
|
|
55
|
+
strategy:
|
|
56
|
+
fail-fast: false
|
|
57
|
+
matrix:
|
|
58
|
+
python-version: ["3.10", "3.12", "3.14"]
|
|
59
|
+
env:
|
|
60
|
+
CMAKE_BUILD_PARALLEL_LEVEL: "2"
|
|
61
|
+
MPLBACKEND: Agg
|
|
62
|
+
steps:
|
|
63
|
+
- name: Check out repository
|
|
64
|
+
uses: actions/checkout@v7
|
|
65
|
+
with:
|
|
66
|
+
persist-credentials: false
|
|
67
|
+
|
|
68
|
+
- name: Configure plotting environment
|
|
69
|
+
run: echo "MPLCONFIGDIR=$RUNNER_TEMP/matplotlib" >> "$GITHUB_ENV"
|
|
70
|
+
|
|
71
|
+
- name: Set up Python
|
|
72
|
+
uses: actions/setup-python@v7
|
|
73
|
+
with:
|
|
74
|
+
python-version: ${{ matrix.python-version }}
|
|
75
|
+
cache: pip
|
|
76
|
+
cache-dependency-path: pyproject.toml
|
|
77
|
+
|
|
78
|
+
- name: Install native dependencies
|
|
79
|
+
run: |
|
|
80
|
+
sudo apt-get update
|
|
81
|
+
sudo apt-get install -y --no-install-recommends \
|
|
82
|
+
cmake g++ libeigen3-dev libgsl-dev \
|
|
83
|
+
libcdd-dev libgmp-dev libnlopt-cxx-dev
|
|
84
|
+
|
|
85
|
+
- name: Build and install Python package
|
|
86
|
+
run: python -m pip install '.[test,examples]' -Ccmake.define.BURNMAN_WARNINGS_AS_ERRORS=ON
|
|
87
|
+
|
|
88
|
+
# Keep the ordinary package jobs independent of the optional reference.
|
|
89
|
+
- name: Run Python package tests
|
|
90
|
+
run: python -m pytest -q -ra python/tests
|
|
91
|
+
|
|
92
|
+
reference:
|
|
93
|
+
name: Pinned Python BurnMan reference
|
|
94
|
+
runs-on: ubuntu-24.04
|
|
95
|
+
timeout-minutes: 20
|
|
96
|
+
env:
|
|
97
|
+
CMAKE_BUILD_PARALLEL_LEVEL: "2"
|
|
98
|
+
MPLBACKEND: Agg
|
|
99
|
+
PYTHONDONTWRITEBYTECODE: "1"
|
|
100
|
+
steps:
|
|
101
|
+
- name: Check out repository
|
|
102
|
+
uses: actions/checkout@v7
|
|
103
|
+
with:
|
|
104
|
+
persist-credentials: false
|
|
105
|
+
|
|
106
|
+
- name: Configure plotting environment
|
|
107
|
+
run: echo "MPLCONFIGDIR=$RUNNER_TEMP/matplotlib" >> "$GITHUB_ENV"
|
|
108
|
+
|
|
109
|
+
- name: Check out reference BurnMan
|
|
110
|
+
uses: actions/checkout@v7
|
|
111
|
+
with:
|
|
112
|
+
repository: geodynamics/burnman
|
|
113
|
+
ref: 39b582cd23954fabd3bdbbee6526a522b1d97bc9
|
|
114
|
+
path: build/python-burnman-reference
|
|
115
|
+
persist-credentials: false
|
|
116
|
+
|
|
117
|
+
- name: Set up Python
|
|
118
|
+
uses: actions/setup-python@v7
|
|
119
|
+
with:
|
|
120
|
+
python-version: "3.12"
|
|
121
|
+
cache: pip
|
|
122
|
+
cache-dependency-path: |
|
|
123
|
+
pyproject.toml
|
|
124
|
+
build/python-burnman-reference/pyproject.toml
|
|
125
|
+
|
|
126
|
+
- name: Install native dependencies
|
|
127
|
+
run: |
|
|
128
|
+
sudo apt-get update
|
|
129
|
+
sudo apt-get install -y --no-install-recommends \
|
|
130
|
+
cmake g++ clang-format libeigen3-dev libgsl-dev \
|
|
131
|
+
libcdd-dev libgmp-dev libnlopt-cxx-dev
|
|
132
|
+
|
|
133
|
+
- name: Install wrapper and reference dependencies
|
|
134
|
+
run: |
|
|
135
|
+
python -m pip install '.[test,examples]' -Ccmake.define.BURNMAN_WARNINGS_AS_ERRORS=ON
|
|
136
|
+
python -m pip install -e 'build/python-burnman-reference[dev]'
|
|
137
|
+
|
|
138
|
+
- name: Audit stored reference values and mineral catalogue
|
|
139
|
+
env:
|
|
140
|
+
PYTHONPATH: ${{ github.workspace }}/build/python-burnman-reference
|
|
141
|
+
run: |
|
|
142
|
+
python tools/check_reference_data.py
|
|
143
|
+
python tools/export_example_minerals.py --check
|
|
144
|
+
python tools/generate_ps1994_reference.py --reference build/python-burnman-reference
|
|
145
|
+
|
|
146
|
+
- name: Run complete Python suite with the pinned reference
|
|
147
|
+
env:
|
|
148
|
+
PYTHONPATH: ${{ github.workspace }}/build/python-burnman-reference
|
|
149
|
+
run: python -m pytest -q -ra python/tests
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Temp files
|
|
2
|
+
*~
|
|
3
|
+
|
|
4
|
+
# Contrib files
|
|
5
|
+
contrib/
|
|
6
|
+
|
|
7
|
+
# Build files
|
|
8
|
+
build/
|
|
9
|
+
bin/
|
|
10
|
+
|
|
11
|
+
# Dev testing
|
|
12
|
+
dev-testing/
|
|
13
|
+
.DS_Store
|
|
14
|
+
|
|
15
|
+
# VS code configs
|
|
16
|
+
.vscode/
|
|
17
|
+
.venv/
|
|
18
|
+
__pycache__/
|
|
19
|
+
*.py[cod]
|
|
20
|
+
*.so
|
|
21
|
+
*.pyd
|
|
22
|
+
*.egg-info/
|
|
23
|
+
.pytest_cache/
|
|
24
|
+
dist/
|
|
25
|
+
|
|
26
|
+
# Output files
|
|
27
|
+
examples/*_output/
|
|
28
|
+
/benchmark-report.xml
|
|
29
|
+
/python_assemblage_benchmarks.csv
|
|
30
|
+
/python_mineral_benchmarks.csv
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.18)
|
|
2
|
+
|
|
3
|
+
# Match native dependency builds unless the caller selects a deployment target.
|
|
4
|
+
if(APPLE AND NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET AND
|
|
5
|
+
"$ENV{MACOSX_DEPLOYMENT_TARGET}" STREQUAL "")
|
|
6
|
+
execute_process(COMMAND sw_vers -productVersion
|
|
7
|
+
OUTPUT_VARIABLE BURNMAN_HOST_MACOS_VERSION
|
|
8
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
9
|
+
set(CMAKE_OSX_DEPLOYMENT_TARGET "${BURNMAN_HOST_MACOS_VERSION}"
|
|
10
|
+
CACHE STRING "Minimum supported macOS version")
|
|
11
|
+
endif()
|
|
12
|
+
project(burnman_cpp VERSION 0.1.0 LANGUAGES CXX)
|
|
13
|
+
|
|
14
|
+
option(BURNMAN_BUILD_PYTHON "Build the Python extension" ON)
|
|
15
|
+
option(BURNMAN_BUILD_TESTS "Build the C++ unit tests" OFF)
|
|
16
|
+
option(BURNMAN_BUILD_BENCHMARKS "Build the C++ performance benchmarks" OFF)
|
|
17
|
+
option(BURNMAN_WARNINGS_AS_ERRORS "Treat project compiler warnings as errors" OFF)
|
|
18
|
+
|
|
19
|
+
function(burnman_compiler_warnings target)
|
|
20
|
+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
|
21
|
+
target_compile_options(${target} PRIVATE -Wall -Wextra -Wpedantic -Wshadow -Wconversion)
|
|
22
|
+
if(BURNMAN_WARNINGS_AS_ERRORS)
|
|
23
|
+
target_compile_options(${target} PRIVATE -Werror)
|
|
24
|
+
endif()
|
|
25
|
+
elseif(MSVC)
|
|
26
|
+
target_compile_options(${target} PRIVATE /W4)
|
|
27
|
+
if(BURNMAN_WARNINGS_AS_ERRORS)
|
|
28
|
+
target_compile_options(${target} PRIVATE /WX)
|
|
29
|
+
endif()
|
|
30
|
+
endif()
|
|
31
|
+
endfunction()
|
|
32
|
+
|
|
33
|
+
# Let CMake find standard Homebrew installations as well as system packages.
|
|
34
|
+
if(APPLE)
|
|
35
|
+
list(APPEND CMAKE_PREFIX_PATH /opt/homebrew /usr/local)
|
|
36
|
+
endif()
|
|
37
|
+
find_package(Eigen3 REQUIRED NO_MODULE)
|
|
38
|
+
if(Eigen3_VERSION VERSION_LESS 3.4)
|
|
39
|
+
message(FATAL_ERROR "BurnMan requires Eigen >= 3.4 (found ${Eigen3_VERSION})")
|
|
40
|
+
endif()
|
|
41
|
+
find_package(GSL REQUIRED)
|
|
42
|
+
find_path(NLOPT_INCLUDE_DIR NAMES nlopt.hpp REQUIRED)
|
|
43
|
+
find_library(NLOPT_LIBRARY NAMES nlopt REQUIRED)
|
|
44
|
+
find_path(CDD_INCLUDE_DIR NAMES cdd.h PATH_SUFFIXES cddlib cdd REQUIRED)
|
|
45
|
+
find_library(CDD_GMP_LIBRARY NAMES cddgmp REQUIRED)
|
|
46
|
+
find_path(GMP_INCLUDE_DIR NAMES gmp.h REQUIRED)
|
|
47
|
+
find_library(GMP_LIBRARY NAMES gmp REQUIRED)
|
|
48
|
+
|
|
49
|
+
file(GLOB_RECURSE BURNMAN_SOURCES CONFIGURE_DEPENDS src/*.cpp)
|
|
50
|
+
add_library(burnman_core STATIC ${BURNMAN_SOURCES})
|
|
51
|
+
target_compile_features(burnman_core PUBLIC cxx_std_17)
|
|
52
|
+
target_include_directories(burnman_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
53
|
+
target_link_libraries(burnman_core PUBLIC Eigen3::Eigen GSL::gsl GSL::gslcblas)
|
|
54
|
+
target_include_directories(burnman_core SYSTEM PRIVATE ${CDD_INCLUDE_DIR} ${GMP_INCLUDE_DIR} ${NLOPT_INCLUDE_DIR})
|
|
55
|
+
target_link_libraries(burnman_core PUBLIC ${CDD_GMP_LIBRARY} ${GMP_LIBRARY} ${NLOPT_LIBRARY})
|
|
56
|
+
set_target_properties(burnman_core PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
57
|
+
burnman_compiler_warnings(burnman_core)
|
|
58
|
+
|
|
59
|
+
if(BURNMAN_BUILD_PYTHON)
|
|
60
|
+
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
|
|
61
|
+
find_package(pybind11 3.0 CONFIG REQUIRED)
|
|
62
|
+
pybind11_add_module(_core
|
|
63
|
+
python/bindings/module.cpp
|
|
64
|
+
python/bindings/params.cpp
|
|
65
|
+
python/bindings/materials.cpp
|
|
66
|
+
python/bindings/composition.cpp
|
|
67
|
+
python/bindings/combined.cpp
|
|
68
|
+
python/bindings/modifiers.cpp
|
|
69
|
+
python/bindings/solutions.cpp
|
|
70
|
+
python/bindings/minerals.cpp
|
|
71
|
+
python/bindings/utils.cpp
|
|
72
|
+
python/bindings/model_sets.cpp
|
|
73
|
+
python/bindings/polytope.cpp
|
|
74
|
+
python/bindings/phase_diagram.cpp
|
|
75
|
+
python/bindings/equilibration.cpp)
|
|
76
|
+
target_link_libraries(_core PRIVATE burnman_core)
|
|
77
|
+
target_compile_definitions(_core PRIVATE BURNMAN_VERSION="${PROJECT_VERSION}")
|
|
78
|
+
burnman_compiler_warnings(_core)
|
|
79
|
+
install(TARGETS _core LIBRARY DESTINATION burnman_cpp RUNTIME DESTINATION burnman_cpp)
|
|
80
|
+
endif()
|
|
81
|
+
|
|
82
|
+
if(BURNMAN_BUILD_TESTS OR BURNMAN_BUILD_BENCHMARKS)
|
|
83
|
+
enable_testing()
|
|
84
|
+
find_package(Catch2 3.4 REQUIRED)
|
|
85
|
+
endif()
|
|
86
|
+
|
|
87
|
+
if(BURNMAN_BUILD_TESTS)
|
|
88
|
+
file(GLOB_RECURSE BURNMAN_TEST_SOURCES CONFIGURE_DEPENDS tests/*.cpp)
|
|
89
|
+
add_executable(burnman_tests ${BURNMAN_TEST_SOURCES})
|
|
90
|
+
target_include_directories(burnman_tests PRIVATE tests/include)
|
|
91
|
+
target_link_libraries(burnman_tests PRIVATE burnman_core Catch2::Catch2WithMain)
|
|
92
|
+
burnman_compiler_warnings(burnman_tests)
|
|
93
|
+
add_test(NAME burnman_tests COMMAND burnman_tests)
|
|
94
|
+
endif()
|
|
95
|
+
|
|
96
|
+
if(BURNMAN_BUILD_BENCHMARKS)
|
|
97
|
+
file(GLOB_RECURSE BURNMAN_BENCHMARK_SOURCES CONFIGURE_DEPENDS benchmarks/*.cpp)
|
|
98
|
+
add_executable(burnman_benchmarks ${BURNMAN_BENCHMARK_SOURCES} tests/test_main.cpp)
|
|
99
|
+
target_include_directories(burnman_benchmarks PRIVATE tests/include)
|
|
100
|
+
target_link_libraries(burnman_benchmarks PRIVATE burnman_core Catch2::Catch2WithMain)
|
|
101
|
+
burnman_compiler_warnings(burnman_benchmarks)
|
|
102
|
+
add_test(NAME burnman_benchmarks COMMAND burnman_benchmarks "[!benchmark]"
|
|
103
|
+
--benchmark-samples 20 --benchmark-resamples 1000 --benchmark-warmup-time 10
|
|
104
|
+
--reporter "xml::out=${CMAKE_CURRENT_BINARY_DIR}/benchmark-report.xml"
|
|
105
|
+
--reporter console)
|
|
106
|
+
set_tests_properties(burnman_benchmarks PROPERTIES LABELS benchmarks TIMEOUT 300)
|
|
107
|
+
endif()
|