├── .ci
├── build_doc.bat
├── build_operators_doc.py
├── build_wheel.py
├── code_generation.py
├── run_examples.py
├── run_non_regression_examples.py
└── update_dpf_dependencies.py
├── .gitattributes
├── .github
├── ISSUE_TEMPLATE
│ ├── bug.yml
│ ├── documentation.yml
│ ├── examples.yml
│ ├── feature.yml
│ └── tutorial.yml
├── dependabot.yml
├── labeler.yml
├── release.yml
└── workflows
│ ├── ansys_lab.yml
│ ├── ci.yml
│ ├── ci_release.yml
│ ├── docs.yml
│ ├── examples.yml
│ ├── examples_docker.yml
│ ├── label.yml
│ ├── pydpf-post.yml
│ ├── releaser.yml
│ ├── scripts
│ └── separate_long_core_tests.ps1
│ ├── test_docker.yml
│ ├── tests.yml
│ └── update_operators.yml
├── .gitignore
├── .pre-commit-config.yaml
├── AUTHORS
├── CODEOWNERS
├── CODE_OF_CONDUCT.md
├── CONTRIBUTORS.md
├── LICENSE
├── Makefile
├── README.md
├── codacy.yml
├── codecov.yml
├── conftest.py
├── doc
├── .vale.ini
├── make.bat
├── source
│ ├── _static
│ │ ├── custom.css
│ │ ├── dpf_operators.html
│ │ └── simple_example.rst
│ ├── api
│ │ └── index.rst
│ ├── conf.py
│ ├── dpf_ansys_file_support_table.rst
│ ├── examples
│ │ ├── 04-advanced
│ │ │ └── 02-volume_averaged_stress
│ │ │ │ └── sphx_glr_02-volume_averaged_stress_001.png
│ │ ├── 07-python-operators
│ │ │ └── plugins
│ │ │ │ ├── README.txt
│ │ │ │ ├── average_filter_plugin
│ │ │ │ ├── __init__.py
│ │ │ │ ├── common.py
│ │ │ │ ├── operators.py
│ │ │ │ └── operators_loader.py
│ │ │ │ ├── easy_statistics.py
│ │ │ │ ├── gltf_plugin.xml
│ │ │ │ └── gltf_plugin
│ │ │ │ ├── __init__.py
│ │ │ │ ├── gltf_export.py
│ │ │ │ ├── operators.py
│ │ │ │ ├── operators_loader.py
│ │ │ │ ├── requirements.txt
│ │ │ │ └── texture.png
│ │ └── 12-fluids
│ │ │ └── 02-fluids_results
│ │ │ ├── sphx_glr_02-fluids_results_001.png
│ │ │ ├── sphx_glr_02-fluids_results_002.png
│ │ │ ├── sphx_glr_02-fluids_results_003.png
│ │ │ ├── sphx_glr_02-fluids_results_004.png
│ │ │ ├── sphx_glr_02-fluids_results_005.png
│ │ │ ├── sphx_glr_02-fluids_results_006.png
│ │ │ ├── sphx_glr_02-fluids_results_007.png
│ │ │ └── sphx_glr_02-fluids_results_thumb.png
│ ├── getting_started
│ │ ├── compatibility.rst
│ │ ├── contribute
│ │ │ ├── developer.rst
│ │ │ ├── documentarian.rst
│ │ │ ├── tox.png
│ │ │ └── user.rst
│ │ ├── contributing.rst
│ │ ├── dependencies.rst
│ │ ├── dpf_server.rst
│ │ ├── index.rst
│ │ ├── install.rst
│ │ └── licensing.rst
│ ├── images
│ │ ├── drawings
│ │ │ ├── OperatorPins.png
│ │ │ ├── Workflow1.png
│ │ │ ├── Workflow2.png
│ │ │ ├── apis_2.png
│ │ │ ├── book-logo.png
│ │ │ ├── checklist.png
│ │ │ ├── circuit.png
│ │ │ ├── connect-operators.png
│ │ │ ├── dpf-flow.png
│ │ │ ├── dpf-mech.png
│ │ │ ├── dpf-reports.png
│ │ │ ├── dpf_server_client.png
│ │ │ ├── entry_premium.png
│ │ │ ├── field-breakdown.png
│ │ │ ├── field-con-overview.png
│ │ │ ├── field-con.png
│ │ │ ├── field.png
│ │ │ ├── help-operators.png
│ │ │ ├── max_u_norm.png
│ │ │ ├── model.png
│ │ │ ├── operator-def.png
│ │ │ ├── operator_drawing.svg
│ │ │ ├── plugin-logo.png
│ │ │ ├── remote_machines.png
│ │ │ ├── scoping-eg.png
│ │ │ ├── small_operator.svg
│ │ │ ├── using-dpf.png
│ │ │ ├── values-entities.png
│ │ │ └── xml.png
│ │ └── plotting
│ │ │ ├── crankshaft_disp.png
│ │ │ ├── pontoon.png
│ │ │ ├── pontoon_strain.png
│ │ │ └── simple_example.png
│ ├── index.rst
│ ├── links.rst
│ ├── operator_reference.rst
│ ├── operator_reference_load.rst
│ ├── operator_reference_load_apis.rst
│ ├── pydpf-core_clone_install.rst
│ └── user_guide
│ │ ├── concepts
│ │ ├── concepts.rst
│ │ ├── index.rst
│ │ ├── stepbystep.rst
│ │ └── waysofusing.rst
│ │ ├── create_sites_for_python_operators.ps1
│ │ ├── create_sites_for_python_operators.sh
│ │ ├── custom_operator_example.py
│ │ ├── custom_operators.rst
│ │ ├── custom_operators_deps.rst
│ │ ├── custom_plugin.xml
│ │ ├── fields_container.rst
│ │ ├── how_to.rst
│ │ ├── index.rst
│ │ ├── install_ansys_dpf_core_in_ansys.ps1
│ │ ├── install_ansys_dpf_core_in_ansys.sh
│ │ ├── main_entities.rst
│ │ ├── model.rst
│ │ ├── operators.rst
│ │ ├── plotting.rst
│ │ ├── server_context.rst
│ │ ├── server_types.rst
│ │ ├── troubleshooting.rst
│ │ ├── uninstall_ansys_dpf_core_in_ansys.ps1
│ │ ├── uninstall_ansys_dpf_core_in_ansys.sh
│ │ └── xmlfiles.rst
└── styles
│ ├── .gitignore
│ └── config
│ └── vocabularies
│ └── ANSYS
│ ├── accept.txt
│ └── reject.txt
├── examples
├── 00-basic
│ ├── 00-basic_example.py
│ ├── 01-basic_operators.py
│ ├── 02-basic_field_containers.py
│ ├── 03-create_entities.py
│ ├── 05-use_local_data.py
│ ├── 07-use_result_helpers.py
│ ├── 08-results_over_time_subset.py
│ ├── 09-results_over_space_subset.py
│ ├── 10-math_operations.py
│ ├── 11-server_types.py
│ ├── 12-get_material_properties.py
│ └── README.txt
├── 01-mathematical-operations
│ └── matrix-operations.py
├── 01-transient_analyses
│ ├── 00-basic_transient.py
│ ├── 01-transient_easy_time_scoping.py
│ └── README.txt
├── 02-modal_analyses
│ ├── 00-compare_modes.py
│ ├── 01-plot_and_animate_modes.py
│ └── README.txt
├── 03-harmonic_analyses
│ ├── 00-multi_harmonic.py
│ ├── 01-modal_superposition.py
│ └── README.txt
├── 04-advanced
│ ├── 00-multistage_advanced_options.py
│ ├── 01-solve_harmonic_problem.py
│ ├── 02-volume_averaged_stress.py
│ ├── 03-exchange_data_between_servers.py
│ ├── 04-extrapolation_stress_3d.py
│ ├── 05-extrapolation_strain_2d.py
│ ├── 06-stress_gradient_path.py
│ ├── 07-load_plugin.py
│ ├── 10-asme_secviii_divtwo.py
│ ├── 11-cycles_to_failure.py
│ ├── 12-read_distributed_files.py
│ ├── 13-manage_licensing.py
│ ├── 14-incremental_evaluation.py
│ └── README.txt
├── 05-file-IO
│ ├── 00-hdf5_double_float_comparison.py
│ ├── 01-reduced_matrices_export.py
│ ├── 02-hdf5_serialize_and_read.py
│ ├── 04-basic-load-file.py
│ └── README.txt
├── 06-plotting
│ ├── 00-basic_plotting.py
│ ├── 01-compare_results.py
│ ├── 02-solution_combination.py
│ ├── 03-labels.py
│ ├── 04-plot_on_path.py
│ ├── 05-plot_on_warped_mesh.py
│ ├── 06-animate_results.py
│ ├── 07-plot_on_geometries.py
│ └── README.txt
├── 07-distributed-post
│ ├── 00-distributed_total_disp.py
│ ├── 01-distributed_workflows_on_remote.py
│ ├── 02-distributed-msup_expansion.py
│ ├── 03-distributed-msup_expansion_steps.py
│ ├── 06-distributed_stress_averaging.py
│ └── README.txt
├── 08-python-operators
│ ├── 00-wrapping_numpy_capabilities.py
│ ├── 01-package_python_operators.py
│ ├── 02-python_operators_with_dependencies.py
│ └── README.txt
├── 09-averaging
│ ├── 00-compute_and_average.py
│ ├── 01-average_across_bodies.py
│ └── README.txt
├── 10-mesh_operations
│ ├── 00-create_polygons_and_polyhedrons.py
│ ├── 05-skin_extraction.py
│ ├── 13-nodes_in_local_coordinate_system.py
│ └── README.txt
├── 11-cyclic-symmetry
│ ├── 01-modal_cyclic.py
│ ├── 02-modal_cyclic_no_expansion.py
│ ├── 03-cyclic_multi_stage.py
│ └── README.txt
├── 12-fluids
│ ├── 00-fluids_model.py
│ ├── 01-fluids_mesh.py
│ ├── 02-fluids_results.py
│ ├── 03-fluids_isosurface.py
│ └── README.txt
├── 13-streamlines
│ ├── 00_plot_3d_streamlines.py
│ ├── 01_plot_surface_streamlines.py
│ └── README.txt
├── 14-lsdyna
│ ├── 00-lsdyna_operators.py
│ ├── 01-lsdyna_beam.py
│ └── README.txt
├── 15-cfx
│ ├── 00-cfx_res_files.py
│ └── README.txt
├── 16-maths-ops
│ ├── 01-matrix-operations.py
│ └── README.text
└── README.txt
├── examples_notebooks
├── HDFS5_float_vs_double.ipynb
├── cyclic_simple.ipynb
├── intro.ipynb
├── reduced matrices export.ipynb
├── simple_static.ipynb
├── transient_minmax_overTime.ipynb
├── tuto_basic.ipynb
├── tuto_cyclic.ipynb
├── tuto_load_plugin.ipynb
├── tuto_mapdl_run.ipynb
├── tuto_mapdl_run_cyclic.ipynb
└── tuto_with_helpers.ipynb
├── pyproject.toml
├── pytest.ini
├── requirements
├── requirements_build.txt
├── requirements_dev.txt
├── requirements_docs.txt
├── requirements_install.txt
└── requirements_test.txt
├── run_client.bat
├── setup.py
├── src
└── ansys
│ ├── dpf
│ ├── core
│ │ ├── __init__.py
│ │ ├── _custom_operators_helpers.py
│ │ ├── _model_helpers.py
│ │ ├── _version.py
│ │ ├── animation.py
│ │ ├── animator.py
│ │ ├── any.py
│ │ ├── available_result.py
│ │ ├── cache.py
│ │ ├── changelog.py
│ │ ├── check_version.py
│ │ ├── collection.py
│ │ ├── collection_base.py
│ │ ├── common.py
│ │ ├── config.py
│ │ ├── core.py
│ │ ├── custom_container_base.py
│ │ ├── custom_fields_container.py
│ │ ├── custom_operator.py
│ │ ├── custom_type_field.py
│ │ ├── cyclic_support.py
│ │ ├── data_sources.py
│ │ ├── data_tree.py
│ │ ├── dimensionality.py
│ │ ├── dpf_array.py
│ │ ├── dpf_operator.py
│ │ ├── element_descriptor.py
│ │ ├── elements.py
│ │ ├── errors.py
│ │ ├── examples
│ │ │ ├── __init__.py
│ │ │ ├── downloads.py
│ │ │ └── examples.py
│ │ ├── faces.py
│ │ ├── field.py
│ │ ├── field_base.py
│ │ ├── field_definition.py
│ │ ├── fields_container.py
│ │ ├── fields_container_factory.py
│ │ ├── fields_factory.py
│ │ ├── generic_data_container.py
│ │ ├── generic_support.py
│ │ ├── geometry.py
│ │ ├── geometry_factory.py
│ │ ├── help.py
│ │ ├── helpers
│ │ │ ├── __init__.py
│ │ │ ├── streamlines.py
│ │ │ └── utils.py
│ │ ├── incremental.py
│ │ ├── inputs.py
│ │ ├── ipconfig.py
│ │ ├── label_space.py
│ │ ├── log.py
│ │ ├── mapping_types.py
│ │ ├── mesh_info.py
│ │ ├── mesh_scoping_factory.py
│ │ ├── meshed_region.py
│ │ ├── meshes_container.py
│ │ ├── misc.py
│ │ ├── model.py
│ │ ├── nodes.py
│ │ ├── operator_specification.py
│ │ ├── operators
│ │ │ ├── __init__.py
│ │ │ ├── averaging
│ │ │ │ ├── __init__.py
│ │ │ │ ├── elemental_difference.py
│ │ │ │ ├── elemental_difference_fc.py
│ │ │ │ ├── elemental_fraction_fc.py
│ │ │ │ ├── elemental_mean.py
│ │ │ │ ├── elemental_mean_fc.py
│ │ │ │ ├── elemental_nodal_to_nodal.py
│ │ │ │ ├── elemental_nodal_to_nodal_elemental.py
│ │ │ │ ├── elemental_nodal_to_nodal_elemental_fc.py
│ │ │ │ ├── elemental_nodal_to_nodal_fc.py
│ │ │ │ ├── elemental_to_elemental_nodal.py
│ │ │ │ ├── elemental_to_elemental_nodal_fc.py
│ │ │ │ ├── elemental_to_nodal.py
│ │ │ │ ├── elemental_to_nodal_fc.py
│ │ │ │ ├── extend_to_mid_nodes.py
│ │ │ │ ├── extend_to_mid_nodes_fc.py
│ │ │ │ ├── force_summation.py
│ │ │ │ ├── force_summation_psd.py
│ │ │ │ ├── gauss_to_node_fc.py
│ │ │ │ ├── nodal_difference.py
│ │ │ │ ├── nodal_difference_fc.py
│ │ │ │ ├── nodal_fraction_fc.py
│ │ │ │ ├── nodal_to_elemental.py
│ │ │ │ ├── nodal_to_elemental_fc.py
│ │ │ │ ├── nodal_to_elemental_nodal.py
│ │ │ │ ├── nodal_to_elemental_nodal_fc.py
│ │ │ │ ├── to_elemental_fc.py
│ │ │ │ ├── to_elemental_nodal_fc.py
│ │ │ │ ├── to_nodal.py
│ │ │ │ └── to_nodal_fc.py
│ │ │ ├── build.py
│ │ │ ├── compression
│ │ │ │ ├── __init__.py
│ │ │ │ ├── apply_svd.py
│ │ │ │ ├── apply_zfp.py
│ │ │ │ ├── kmeans_clustering.py
│ │ │ │ └── zfp_decompress.py
│ │ │ ├── filter
│ │ │ │ ├── __init__.py
│ │ │ │ ├── abc_weightings.py
│ │ │ │ ├── field_band_pass.py
│ │ │ │ ├── field_band_pass_fc.py
│ │ │ │ ├── field_high_pass.py
│ │ │ │ ├── field_high_pass_fc.py
│ │ │ │ ├── field_low_pass.py
│ │ │ │ ├── field_low_pass_fc.py
│ │ │ │ ├── field_signed_high_pass.py
│ │ │ │ ├── field_signed_high_pass_fc.py
│ │ │ │ ├── filtering_max_over_time.py
│ │ │ │ ├── scoping_band_pass.py
│ │ │ │ ├── scoping_high_pass.py
│ │ │ │ ├── scoping_low_pass.py
│ │ │ │ ├── scoping_signed_high_pass.py
│ │ │ │ ├── timefreq_band_pass.py
│ │ │ │ ├── timefreq_high_pass.py
│ │ │ │ ├── timefreq_low_pass.py
│ │ │ │ ├── timefreq_signed_high_pass.py
│ │ │ │ ├── timescoping_band_pass.py
│ │ │ │ ├── timescoping_high_pass.py
│ │ │ │ ├── timescoping_low_pass.py
│ │ │ │ └── timescoping_signed_high_pass.py
│ │ │ ├── geo
│ │ │ │ ├── __init__.py
│ │ │ │ ├── cartesian_to_spherical.py
│ │ │ │ ├── cartesian_to_spherical_fc.py
│ │ │ │ ├── element_nodal_contribution.py
│ │ │ │ ├── elements_facets_surfaces_over_time.py
│ │ │ │ ├── elements_volume.py
│ │ │ │ ├── elements_volumes_over_time.py
│ │ │ │ ├── faces_area.py
│ │ │ │ ├── gauss_to_node.py
│ │ │ │ ├── integrate_over_elements.py
│ │ │ │ ├── normals.py
│ │ │ │ ├── normals_provider_nl.py
│ │ │ │ ├── rotate.py
│ │ │ │ ├── rotate_fc.py
│ │ │ │ ├── rotate_in_cylindrical_cs.py
│ │ │ │ ├── rotate_in_cylindrical_cs_fc.py
│ │ │ │ ├── spherical_to_cartesian.py
│ │ │ │ ├── spherical_to_cartesian_fc.py
│ │ │ │ └── to_polar_coordinates.py
│ │ │ ├── invariant
│ │ │ │ ├── __init__.py
│ │ │ │ ├── convertnum_bcs_to_nod.py
│ │ │ │ ├── convertnum_nod_to_bcs.py
│ │ │ │ ├── convertnum_op.py
│ │ │ │ ├── eigen_values.py
│ │ │ │ ├── eigen_values_fc.py
│ │ │ │ ├── eigen_vectors.py
│ │ │ │ ├── eigen_vectors_fc.py
│ │ │ │ ├── invariants.py
│ │ │ │ ├── invariants_fc.py
│ │ │ │ ├── principal_invariants.py
│ │ │ │ ├── principal_invariants_fc.py
│ │ │ │ ├── segalman_von_mises_eqv.py
│ │ │ │ ├── segalman_von_mises_eqv_fc.py
│ │ │ │ ├── von_mises_eqv.py
│ │ │ │ └── von_mises_eqv_fc.py
│ │ │ ├── logic
│ │ │ │ ├── __init__.py
│ │ │ │ ├── ascending_sort.py
│ │ │ │ ├── ascending_sort_fc.py
│ │ │ │ ├── component_selector.py
│ │ │ │ ├── component_selector_fc.py
│ │ │ │ ├── component_transformer.py
│ │ │ │ ├── component_transformer_fc.py
│ │ │ │ ├── descending_sort.py
│ │ │ │ ├── descending_sort_fc.py
│ │ │ │ ├── elementary_data_selector.py
│ │ │ │ ├── elementary_data_selector_fc.py
│ │ │ │ ├── enrich_materials.py
│ │ │ │ ├── identical_anys.py
│ │ │ │ ├── identical_fc.py
│ │ │ │ ├── identical_fields.py
│ │ │ │ ├── identical_generic_data_containers.py
│ │ │ │ ├── identical_mc.py
│ │ │ │ ├── identical_meshes.py
│ │ │ │ ├── identical_pfc.py
│ │ │ │ ├── identical_property_fields.py
│ │ │ │ ├── identical_sc.py
│ │ │ │ ├── identical_scopings.py
│ │ │ │ ├── identical_string_fields.py
│ │ │ │ ├── included_fields.py
│ │ │ │ ├── solid_shell_fields.py
│ │ │ │ ├── split_data_sources.py
│ │ │ │ └── split_streams.py
│ │ │ ├── mapping
│ │ │ │ ├── __init__.py
│ │ │ │ ├── fft.py
│ │ │ │ ├── find_reduced_coordinates.py
│ │ │ │ ├── on_coordinates.py
│ │ │ │ ├── on_reduced_coordinates.py
│ │ │ │ ├── prep_sampling_fft.py
│ │ │ │ ├── prepare_mapping_workflow.py
│ │ │ │ ├── scoping_on_coordinates.py
│ │ │ │ ├── solid_to_skin.py
│ │ │ │ └── solid_to_skin_fc.py
│ │ │ ├── math
│ │ │ │ ├── __init__.py
│ │ │ │ ├── absolute_value_by_component.py
│ │ │ │ ├── absolute_value_by_component_fc.py
│ │ │ │ ├── accumulate.py
│ │ │ │ ├── accumulate_fc.py
│ │ │ │ ├── accumulate_level_over_label_fc.py
│ │ │ │ ├── accumulate_min_over_label_fc.py
│ │ │ │ ├── accumulate_over_label_fc.py
│ │ │ │ ├── accumulation_per_scoping.py
│ │ │ │ ├── add.py
│ │ │ │ ├── add_constant.py
│ │ │ │ ├── add_constant_fc.py
│ │ │ │ ├── add_fc.py
│ │ │ │ ├── amplitude.py
│ │ │ │ ├── amplitude_fc.py
│ │ │ │ ├── average_over_label_fc.py
│ │ │ │ ├── centroid.py
│ │ │ │ ├── centroid_fc.py
│ │ │ │ ├── component_wise_divide.py
│ │ │ │ ├── component_wise_divide_fc.py
│ │ │ │ ├── component_wise_product.py
│ │ │ │ ├── component_wise_product_fc.py
│ │ │ │ ├── compute_residual_and_error.py
│ │ │ │ ├── conjugate.py
│ │ │ │ ├── correlation.py
│ │ │ │ ├── cos.py
│ │ │ │ ├── cos_fc.py
│ │ │ │ ├── cplx_derive.py
│ │ │ │ ├── cplx_divide.py
│ │ │ │ ├── cplx_dot.py
│ │ │ │ ├── cplx_multiply.py
│ │ │ │ ├── cross_product.py
│ │ │ │ ├── cross_product_fc.py
│ │ │ │ ├── dot.py
│ │ │ │ ├── dot_tensor.py
│ │ │ │ ├── entity_extractor.py
│ │ │ │ ├── expansion_psd.py
│ │ │ │ ├── exponential.py
│ │ │ │ ├── exponential_fc.py
│ │ │ │ ├── fft_approx.py
│ │ │ │ ├── fft_eval.py
│ │ │ │ ├── fft_gradient_eval.py
│ │ │ │ ├── fft_multi_harmonic_minmax.py
│ │ │ │ ├── generalized_inner_product.py
│ │ │ │ ├── generalized_inner_product_fc.py
│ │ │ │ ├── img_part.py
│ │ │ │ ├── invert.py
│ │ │ │ ├── invert_fc.py
│ │ │ │ ├── kronecker_prod.py
│ │ │ │ ├── linear_combination.py
│ │ │ │ ├── ln.py
│ │ │ │ ├── ln_fc.py
│ │ │ │ ├── mac.py
│ │ │ │ ├── make_one_on_comp.py
│ │ │ │ ├── matrix_inverse.py
│ │ │ │ ├── min_max_over_time.py
│ │ │ │ ├── minus.py
│ │ │ │ ├── minus_fc.py
│ │ │ │ ├── modal_damping_ratio.py
│ │ │ │ ├── modal_superposition.py
│ │ │ │ ├── modulus.py
│ │ │ │ ├── norm.py
│ │ │ │ ├── norm_fc.py
│ │ │ │ ├── outer_product.py
│ │ │ │ ├── overall_dot.py
│ │ │ │ ├── phase.py
│ │ │ │ ├── phase_fc.py
│ │ │ │ ├── polar_to_cplx.py
│ │ │ │ ├── pow.py
│ │ │ │ ├── pow_fc.py
│ │ │ │ ├── qr_solve.py
│ │ │ │ ├── real_part.py
│ │ │ │ ├── relative_error.py
│ │ │ │ ├── scale.py
│ │ │ │ ├── scale_by_field.py
│ │ │ │ ├── scale_by_field_fc.py
│ │ │ │ ├── scale_fc.py
│ │ │ │ ├── sin.py
│ │ │ │ ├── sin_fc.py
│ │ │ │ ├── sqr.py
│ │ │ │ ├── sqr_fc.py
│ │ │ │ ├── sqrt.py
│ │ │ │ ├── sqrt_fc.py
│ │ │ │ ├── svd.py
│ │ │ │ ├── sweeping_phase.py
│ │ │ │ ├── sweeping_phase_fc.py
│ │ │ │ ├── time_derivation.py
│ │ │ │ ├── time_freq_interpolation.py
│ │ │ │ ├── time_integration.py
│ │ │ │ ├── unit_convert.py
│ │ │ │ ├── unit_convert_fc.py
│ │ │ │ ├── window_bartlett.py
│ │ │ │ ├── window_bartlett_fc.py
│ │ │ │ ├── window_blackman.py
│ │ │ │ ├── window_blackman_fc.py
│ │ │ │ ├── window_hamming.py
│ │ │ │ ├── window_hamming_fc.py
│ │ │ │ ├── window_hanning.py
│ │ │ │ ├── window_hanning_fc.py
│ │ │ │ ├── window_triangular.py
│ │ │ │ ├── window_triangular_fc.py
│ │ │ │ ├── window_welch.py
│ │ │ │ └── window_welch_fc.py
│ │ │ ├── mesh
│ │ │ │ ├── __init__.py
│ │ │ │ ├── acmo_mesh_provider.py
│ │ │ │ ├── beam_properties.py
│ │ │ │ ├── change_cs.py
│ │ │ │ ├── combine_levelset.py
│ │ │ │ ├── decimate_mesh.py
│ │ │ │ ├── exclude_levelset.py
│ │ │ │ ├── external_layer.py
│ │ │ │ ├── from_field.py
│ │ │ │ ├── from_scoping.py
│ │ │ │ ├── from_scopings.py
│ │ │ │ ├── iso_surfaces.py
│ │ │ │ ├── make_plane_levelset.py
│ │ │ │ ├── make_sphere_levelset.py
│ │ │ │ ├── mesh_clip.py
│ │ │ │ ├── mesh_cut.py
│ │ │ │ ├── mesh_extraction.py
│ │ │ │ ├── mesh_get_attribute.py
│ │ │ │ ├── mesh_plan_clip.py
│ │ │ │ ├── mesh_provider.py
│ │ │ │ ├── mesh_to_graphics.py
│ │ │ │ ├── mesh_to_graphics_edges.py
│ │ │ │ ├── mesh_to_pyvista.py
│ │ │ │ ├── mesh_to_tetra.py
│ │ │ │ ├── meshes_provider.py
│ │ │ │ ├── node_coordinates.py
│ │ │ │ ├── points_from_coordinates.py
│ │ │ │ ├── skin.py
│ │ │ │ ├── split_fields.py
│ │ │ │ ├── split_mesh.py
│ │ │ │ ├── stl_export.py
│ │ │ │ ├── tri_mesh_skin.py
│ │ │ │ └── wireframe.py
│ │ │ ├── metadata
│ │ │ │ ├── __init__.py
│ │ │ │ ├── boundary_condition_provider.py
│ │ │ │ ├── coordinate_system_data_provider.py
│ │ │ │ ├── cyclic_mesh_expansion.py
│ │ │ │ ├── cyclic_support_provider.py
│ │ │ │ ├── datasources_provider.py
│ │ │ │ ├── element_types_provider.py
│ │ │ │ ├── integrate_over_time_freq.py
│ │ │ │ ├── is_cyclic.py
│ │ │ │ ├── material_support_provider.py
│ │ │ │ ├── mesh_info_provider.py
│ │ │ │ ├── mesh_property_provider.py
│ │ │ │ ├── mesh_selection_manager_provider.py
│ │ │ │ ├── mesh_support_provider.py
│ │ │ │ ├── property_field_provider_by_name.py
│ │ │ │ ├── real_constants_provider.py
│ │ │ │ ├── result_info_provider.py
│ │ │ │ ├── streams_provider.py
│ │ │ │ ├── time_freq_provider.py
│ │ │ │ └── time_freq_support_get_attribute.py
│ │ │ ├── min_max
│ │ │ │ ├── __init__.py
│ │ │ │ ├── max_by_component.py
│ │ │ │ ├── max_over_phase.py
│ │ │ │ ├── max_over_time_by_entity.py
│ │ │ │ ├── min_by_component.py
│ │ │ │ ├── min_max.py
│ │ │ │ ├── min_max_by_entity.py
│ │ │ │ ├── min_max_by_time.py
│ │ │ │ ├── min_max_fc.py
│ │ │ │ ├── min_max_fc_inc.py
│ │ │ │ ├── min_max_inc.py
│ │ │ │ ├── min_max_over_label_fc.py
│ │ │ │ ├── min_max_over_time_by_entity.py
│ │ │ │ ├── min_over_time_by_entity.py
│ │ │ │ ├── phase_of_max.py
│ │ │ │ ├── time_of_max_by_entity.py
│ │ │ │ └── time_of_min_by_entity.py
│ │ │ ├── operator.mustache
│ │ │ ├── result
│ │ │ │ ├── __init__.py
│ │ │ │ ├── acceleration.py
│ │ │ │ ├── acceleration_X.py
│ │ │ │ ├── acceleration_Y.py
│ │ │ │ ├── acceleration_Z.py
│ │ │ │ ├── accu_eqv_creep_strain.py
│ │ │ │ ├── accu_eqv_plastic_strain.py
│ │ │ │ ├── add_rigid_body_motion.py
│ │ │ │ ├── add_rigid_body_motion_fc.py
│ │ │ │ ├── artificial_hourglass_energy.py
│ │ │ │ ├── beam_axial_force.py
│ │ │ │ ├── beam_axial_plastic_strain.py
│ │ │ │ ├── beam_axial_stress.py
│ │ │ │ ├── beam_axial_total_strain.py
│ │ │ │ ├── beam_rs_shear_stress.py
│ │ │ │ ├── beam_s_bending_moment.py
│ │ │ │ ├── beam_s_shear_force.py
│ │ │ │ ├── beam_t_bending_moment.py
│ │ │ │ ├── beam_t_shear_force.py
│ │ │ │ ├── beam_torsional_moment.py
│ │ │ │ ├── beam_tr_shear_stress.py
│ │ │ │ ├── cgns_result_provider.py
│ │ │ │ ├── cms_dst_table_provider.py
│ │ │ │ ├── cms_matrices_provider.py
│ │ │ │ ├── cms_subfile_info_provider.py
│ │ │ │ ├── co_energy.py
│ │ │ │ ├── compute_invariant_terms_motion.py
│ │ │ │ ├── compute_invariant_terms_rbd.py
│ │ │ │ ├── compute_stress.py
│ │ │ │ ├── compute_stress_1.py
│ │ │ │ ├── compute_stress_2.py
│ │ │ │ ├── compute_stress_3.py
│ │ │ │ ├── compute_stress_X.py
│ │ │ │ ├── compute_stress_XY.py
│ │ │ │ ├── compute_stress_XZ.py
│ │ │ │ ├── compute_stress_Y.py
│ │ │ │ ├── compute_stress_YZ.py
│ │ │ │ ├── compute_stress_Z.py
│ │ │ │ ├── compute_stress_von_mises.py
│ │ │ │ ├── compute_total_strain.py
│ │ │ │ ├── compute_total_strain_1.py
│ │ │ │ ├── compute_total_strain_2.py
│ │ │ │ ├── compute_total_strain_3.py
│ │ │ │ ├── compute_total_strain_X.py
│ │ │ │ ├── compute_total_strain_XY.py
│ │ │ │ ├── compute_total_strain_XZ.py
│ │ │ │ ├── compute_total_strain_Y.py
│ │ │ │ ├── compute_total_strain_YZ.py
│ │ │ │ ├── compute_total_strain_Z.py
│ │ │ │ ├── contact_fluid_penetration_pressure.py
│ │ │ │ ├── contact_friction_stress.py
│ │ │ │ ├── contact_gap_distance.py
│ │ │ │ ├── contact_penetration.py
│ │ │ │ ├── contact_pressure.py
│ │ │ │ ├── contact_sliding_distance.py
│ │ │ │ ├── contact_status.py
│ │ │ │ ├── contact_surface_heat_flux.py
│ │ │ │ ├── contact_total_stress.py
│ │ │ │ ├── coordinate_system.py
│ │ │ │ ├── coordinates.py
│ │ │ │ ├── creep_strain_energy_density.py
│ │ │ │ ├── current_density.py
│ │ │ │ ├── cyclic_analytic_seqv_max.py
│ │ │ │ ├── cyclic_analytic_usum_max.py
│ │ │ │ ├── cyclic_expansion.py
│ │ │ │ ├── density.py
│ │ │ │ ├── displacement.py
│ │ │ │ ├── displacement_X.py
│ │ │ │ ├── displacement_Y.py
│ │ │ │ ├── displacement_Z.py
│ │ │ │ ├── div_lighthill_tensor.py
│ │ │ │ ├── dynamic_viscosity.py
│ │ │ │ ├── elastic_strain.py
│ │ │ │ ├── elastic_strain_X.py
│ │ │ │ ├── elastic_strain_XY.py
│ │ │ │ ├── elastic_strain_XZ.py
│ │ │ │ ├── elastic_strain_Y.py
│ │ │ │ ├── elastic_strain_YZ.py
│ │ │ │ ├── elastic_strain_Z.py
│ │ │ │ ├── elastic_strain_energy_density.py
│ │ │ │ ├── elastic_strain_eqv.py
│ │ │ │ ├── elastic_strain_intensity.py
│ │ │ │ ├── elastic_strain_max_shear.py
│ │ │ │ ├── elastic_strain_principal_1.py
│ │ │ │ ├── elastic_strain_principal_2.py
│ │ │ │ ├── elastic_strain_principal_3.py
│ │ │ │ ├── elastic_strain_rotation_by_euler_nodes.py
│ │ │ │ ├── electric_field.py
│ │ │ │ ├── electric_field_X.py
│ │ │ │ ├── electric_field_Y.py
│ │ │ │ ├── electric_field_Z.py
│ │ │ │ ├── electric_flux_density.py
│ │ │ │ ├── electric_flux_density_X.py
│ │ │ │ ├── electric_flux_density_Y.py
│ │ │ │ ├── electric_flux_density_Z.py
│ │ │ │ ├── electric_potential.py
│ │ │ │ ├── element_centroids.py
│ │ │ │ ├── element_nodal_forces.py
│ │ │ │ ├── element_orientations.py
│ │ │ │ ├── element_orientations_X.py
│ │ │ │ ├── element_orientations_Y.py
│ │ │ │ ├── element_orientations_Z.py
│ │ │ │ ├── elemental_heat_generation.py
│ │ │ │ ├── elemental_mass.py
│ │ │ │ ├── elemental_volume.py
│ │ │ │ ├── enf_rotation_by_euler_nodes.py
│ │ │ │ ├── enthalpy.py
│ │ │ │ ├── entropy.py
│ │ │ │ ├── epsilon.py
│ │ │ │ ├── equivalent_mass.py
│ │ │ │ ├── equivalent_radiated_power.py
│ │ │ │ ├── eqv_stress_parameter.py
│ │ │ │ ├── erp_radiation_efficiency.py
│ │ │ │ ├── euler_load_buckling.py
│ │ │ │ ├── euler_nodes.py
│ │ │ │ ├── gasket_deformation.py
│ │ │ │ ├── gasket_deformation_X.py
│ │ │ │ ├── gasket_deformation_XY.py
│ │ │ │ ├── gasket_deformation_XZ.py
│ │ │ │ ├── gasket_inelastic_closure.py
│ │ │ │ ├── gasket_inelastic_closure_X.py
│ │ │ │ ├── gasket_inelastic_closure_XY.py
│ │ │ │ ├── gasket_inelastic_closure_XZ.py
│ │ │ │ ├── gasket_stress.py
│ │ │ │ ├── gasket_stress_X.py
│ │ │ │ ├── gasket_stress_XY.py
│ │ │ │ ├── gasket_stress_XZ.py
│ │ │ │ ├── gasket_thermal_closure.py
│ │ │ │ ├── gasket_thermal_closure_X.py
│ │ │ │ ├── gasket_thermal_closure_XY.py
│ │ │ │ ├── gasket_thermal_closure_XZ.py
│ │ │ │ ├── global_added_mass.py
│ │ │ │ ├── global_added_mass_pct.py
│ │ │ │ ├── global_center_mass.py
│ │ │ │ ├── global_energy_ratio.py
│ │ │ │ ├── global_energy_ratio_wo_eroded.py
│ │ │ │ ├── global_eroded_hourglass_energy.py
│ │ │ │ ├── global_eroded_internal_energy.py
│ │ │ │ ├── global_eroded_kinetic_energy.py
│ │ │ │ ├── global_external_work.py
│ │ │ │ ├── global_hourglass_energy.py
│ │ │ │ ├── global_internal_energy.py
│ │ │ │ ├── global_joint_internal_energy.py
│ │ │ │ ├── global_kinetic_energy.py
│ │ │ │ ├── global_rigid_body_stopper_energy.py
│ │ │ │ ├── global_sliding_interface_energy.py
│ │ │ │ ├── global_spring_damper_energy.py
│ │ │ │ ├── global_system_damping_energy.py
│ │ │ │ ├── global_time_step.py
│ │ │ │ ├── global_to_nodal.py
│ │ │ │ ├── global_total_energy.py
│ │ │ │ ├── global_total_mass.py
│ │ │ │ ├── global_velocity.py
│ │ │ │ ├── heat_flux.py
│ │ │ │ ├── heat_flux_X.py
│ │ │ │ ├── heat_flux_Y.py
│ │ │ │ ├── heat_flux_Z.py
│ │ │ │ ├── hydrostatic_pressure.py
│ │ │ │ ├── incremental_energy.py
│ │ │ │ ├── initial_coordinates.py
│ │ │ │ ├── interface_contact_area.py
│ │ │ │ ├── interface_contact_force.py
│ │ │ │ ├── interface_contact_mass.py
│ │ │ │ ├── interface_contact_moment.py
│ │ │ │ ├── interface_resultant_contact_force.py
│ │ │ │ ├── joint_force_reaction.py
│ │ │ │ ├── joint_moment_reaction.py
│ │ │ │ ├── joint_relative_acceleration.py
│ │ │ │ ├── joint_relative_angular_acceleration.py
│ │ │ │ ├── joint_relative_angular_velocity.py
│ │ │ │ ├── joint_relative_displacement.py
│ │ │ │ ├── joint_relative_rotation.py
│ │ │ │ ├── joint_relative_velocity.py
│ │ │ │ ├── kinetic_energy.py
│ │ │ │ ├── mach_number.py
│ │ │ │ ├── magnetic_field.py
│ │ │ │ ├── magnetic_field_X.py
│ │ │ │ ├── magnetic_field_Y.py
│ │ │ │ ├── magnetic_field_Z.py
│ │ │ │ ├── magnetic_flux_density.py
│ │ │ │ ├── magnetic_flux_density_X.py
│ │ │ │ ├── magnetic_flux_density_Y.py
│ │ │ │ ├── magnetic_flux_density_Z.py
│ │ │ │ ├── magnetic_scalar_potential.py
│ │ │ │ ├── magnetic_vector_potential.py
│ │ │ │ ├── mapdl_material_properties.py
│ │ │ │ ├── mapdl_section.py
│ │ │ │ ├── mapdl_split_on_facet_indices.py
│ │ │ │ ├── mapdl_split_to_acmo_facet_indices.py
│ │ │ │ ├── mass_flow_rate.py
│ │ │ │ ├── mass_fraction.py
│ │ │ │ ├── material_property_of_element.py
│ │ │ │ ├── mean_static_pressure.py
│ │ │ │ ├── mean_temperature.py
│ │ │ │ ├── mean_velocity.py
│ │ │ │ ├── members_in_bending_not_certified.py
│ │ │ │ ├── members_in_compression_not_certified.py
│ │ │ │ ├── members_in_linear_compression_bending_not_certified.py
│ │ │ │ ├── migrate_to_h5dpf.py
│ │ │ │ ├── modal_basis.py
│ │ │ │ ├── nmisc.py
│ │ │ │ ├── nodal_force.py
│ │ │ │ ├── nodal_moment.py
│ │ │ │ ├── nodal_to_global.py
│ │ │ │ ├── normal_contact_force.py
│ │ │ │ ├── normal_contact_moment.py
│ │ │ │ ├── num_surface_status_changes.py
│ │ │ │ ├── omega.py
│ │ │ │ ├── part_added_mass.py
│ │ │ │ ├── part_eroded_internal_energy.py
│ │ │ │ ├── part_eroded_kinetic_energy.py
│ │ │ │ ├── part_hourglass_energy.py
│ │ │ │ ├── part_internal_energy.py
│ │ │ │ ├── part_kinetic_energy.py
│ │ │ │ ├── part_momentum.py
│ │ │ │ ├── part_rigid_body_velocity.py
│ │ │ │ ├── plastic_state_variable.py
│ │ │ │ ├── plastic_strain.py
│ │ │ │ ├── plastic_strain_X.py
│ │ │ │ ├── plastic_strain_XY.py
│ │ │ │ ├── plastic_strain_XZ.py
│ │ │ │ ├── plastic_strain_Y.py
│ │ │ │ ├── plastic_strain_YZ.py
│ │ │ │ ├── plastic_strain_Z.py
│ │ │ │ ├── plastic_strain_energy_density.py
│ │ │ │ ├── plastic_strain_eqv.py
│ │ │ │ ├── plastic_strain_intensity.py
│ │ │ │ ├── plastic_strain_max_shear.py
│ │ │ │ ├── plastic_strain_principal_1.py
│ │ │ │ ├── plastic_strain_principal_2.py
│ │ │ │ ├── plastic_strain_principal_3.py
│ │ │ │ ├── plastic_strain_rotation_by_euler_nodes.py
│ │ │ │ ├── poynting_vector.py
│ │ │ │ ├── poynting_vector_surface.py
│ │ │ │ ├── pres_to_field.py
│ │ │ │ ├── pressure.py
│ │ │ │ ├── pretension.py
│ │ │ │ ├── prns_to_field.py
│ │ │ │ ├── raw_displacement.py
│ │ │ │ ├── raw_reaction_force.py
│ │ │ │ ├── reaction_force.py
│ │ │ │ ├── reaction_force_X.py
│ │ │ │ ├── reaction_force_Y.py
│ │ │ │ ├── reaction_force_Z.py
│ │ │ │ ├── read_cms_rbd_file.py
│ │ │ │ ├── recombine_harmonic_indeces_cyclic.py
│ │ │ │ ├── remove_rigid_body_motion.py
│ │ │ │ ├── remove_rigid_body_motion_fc.py
│ │ │ │ ├── result_provider.py
│ │ │ │ ├── rigid_transformation.py
│ │ │ │ ├── rigid_transformation_provider.py
│ │ │ │ ├── rms_static_pressure.py
│ │ │ │ ├── rms_temperature.py
│ │ │ │ ├── rms_velocity.py
│ │ │ │ ├── rom_data_provider.py
│ │ │ │ ├── run.py
│ │ │ │ ├── smisc.py
│ │ │ │ ├── specific_heat.py
│ │ │ │ ├── spectrum_data.py
│ │ │ │ ├── state_variable.py
│ │ │ │ ├── static_pressure.py
│ │ │ │ ├── stiffness_matrix_energy.py
│ │ │ │ ├── strain_eqv_as_mechanical.py
│ │ │ │ ├── strain_eqv_as_mechanical_workflow.py
│ │ │ │ ├── stress.py
│ │ │ │ ├── stress_X.py
│ │ │ │ ├── stress_XY.py
│ │ │ │ ├── stress_XZ.py
│ │ │ │ ├── stress_Y.py
│ │ │ │ ├── stress_YZ.py
│ │ │ │ ├── stress_Z.py
│ │ │ │ ├── stress_eqv_as_mechanical.py
│ │ │ │ ├── stress_eqv_as_mechanical_workflow.py
│ │ │ │ ├── stress_intensity.py
│ │ │ │ ├── stress_max_shear.py
│ │ │ │ ├── stress_principal_1.py
│ │ │ │ ├── stress_principal_2.py
│ │ │ │ ├── stress_principal_3.py
│ │ │ │ ├── stress_ratio.py
│ │ │ │ ├── stress_rotation_by_euler_nodes.py
│ │ │ │ ├── stress_von_mises.py
│ │ │ │ ├── structural_temperature.py
│ │ │ │ ├── superficial_velocity.py
│ │ │ │ ├── surface_heat_rate.py
│ │ │ │ ├── swelling_strains.py
│ │ │ │ ├── tangential_contact_force.py
│ │ │ │ ├── tangential_contact_moment.py
│ │ │ │ ├── temperature.py
│ │ │ │ ├── temperature_grad.py
│ │ │ │ ├── temperature_grad_X.py
│ │ │ │ ├── temperature_grad_Y.py
│ │ │ │ ├── temperature_grad_Z.py
│ │ │ │ ├── thermal_conductivity.py
│ │ │ │ ├── thermal_dissipation_energy.py
│ │ │ │ ├── thermal_strain.py
│ │ │ │ ├── thermal_strain_X.py
│ │ │ │ ├── thermal_strain_XY.py
│ │ │ │ ├── thermal_strain_XZ.py
│ │ │ │ ├── thermal_strain_Y.py
│ │ │ │ ├── thermal_strain_YZ.py
│ │ │ │ ├── thermal_strain_Z.py
│ │ │ │ ├── thermal_strain_principal_1.py
│ │ │ │ ├── thermal_strain_principal_2.py
│ │ │ │ ├── thermal_strain_principal_3.py
│ │ │ │ ├── thermal_strains_eqv.py
│ │ │ │ ├── thickness.py
│ │ │ │ ├── torque.py
│ │ │ │ ├── total_contact_force.py
│ │ │ │ ├── total_contact_moment.py
│ │ │ │ ├── total_mass.py
│ │ │ │ ├── total_pressure.py
│ │ │ │ ├── total_strain.py
│ │ │ │ ├── total_temperature.py
│ │ │ │ ├── transform_invariant_terms_rbd.py
│ │ │ │ ├── transient_rayleigh_integration.py
│ │ │ │ ├── turbulent_kinetic_energy.py
│ │ │ │ ├── turbulent_viscosity.py
│ │ │ │ ├── velocity.py
│ │ │ │ ├── velocity_X.py
│ │ │ │ ├── velocity_Y.py
│ │ │ │ ├── velocity_Z.py
│ │ │ │ ├── volume_fraction.py
│ │ │ │ ├── wall_shear_stress.py
│ │ │ │ ├── workflow_energy_per_component.py
│ │ │ │ ├── workflow_energy_per_harmonic.py
│ │ │ │ ├── write_cms_rbd_file.py
│ │ │ │ ├── write_motion_dfmf_file.py
│ │ │ │ └── y_plus.py
│ │ │ ├── scoping
│ │ │ │ ├── __init__.py
│ │ │ │ ├── adapt_with_scopings_container.py
│ │ │ │ ├── change_fc.py
│ │ │ │ ├── compute_element_centroids.py
│ │ │ │ ├── connectivity_ids.py
│ │ │ │ ├── elemental_from_mesh.py
│ │ │ │ ├── from_mesh.py
│ │ │ │ ├── intersect.py
│ │ │ │ ├── nodal_from_mesh.py
│ │ │ │ ├── on_mesh_property.py
│ │ │ │ ├── on_named_selection.py
│ │ │ │ ├── on_property.py
│ │ │ │ ├── reduce_sampling.py
│ │ │ │ ├── rescope.py
│ │ │ │ ├── rescope_custom_type_field.py
│ │ │ │ ├── rescope_fc.py
│ │ │ │ ├── rescope_property_field.py
│ │ │ │ ├── scoping_get_attribute.py
│ │ │ │ ├── split_on_property_type.py
│ │ │ │ └── transpose.py
│ │ │ ├── serialization
│ │ │ │ ├── __init__.py
│ │ │ │ ├── csv_to_field.py
│ │ │ │ ├── data_tree_to_json.py
│ │ │ │ ├── data_tree_to_txt.py
│ │ │ │ ├── deserializer.py
│ │ │ │ ├── export_symbolic_workflow.py
│ │ │ │ ├── field_to_csv.py
│ │ │ │ ├── hdf5dpf_custom_read.py
│ │ │ │ ├── hdf5dpf_generate_result_file.py
│ │ │ │ ├── import_symbolic_workflow.py
│ │ │ │ ├── json_to_data_tree.py
│ │ │ │ ├── migrate_file_to_vtk.py
│ │ │ │ ├── migrate_to_vtu.py
│ │ │ │ ├── serialize_to_hdf5.py
│ │ │ │ ├── serializer.py
│ │ │ │ ├── serializer_to_string.py
│ │ │ │ ├── string_deserializer.py
│ │ │ │ ├── txt_to_data_tree.py
│ │ │ │ ├── vtk_export.py
│ │ │ │ ├── vtk_to_fields.py
│ │ │ │ ├── vtu_export.py
│ │ │ │ ├── workflow_to_pydpf.py
│ │ │ │ └── workflow_to_workflow_topology.py
│ │ │ ├── server
│ │ │ │ ├── __init__.py
│ │ │ │ ├── grpc_shutdown_server.py
│ │ │ │ └── grpc_start_server.py
│ │ │ ├── specification.py
│ │ │ ├── translator.py
│ │ │ └── utility
│ │ │ │ ├── __init__.py
│ │ │ │ ├── assemble_scalars_to_matrices.py
│ │ │ │ ├── assemble_scalars_to_matrices_fc.py
│ │ │ │ ├── assemble_scalars_to_vectors.py
│ │ │ │ ├── assemble_scalars_to_vectors_fc.py
│ │ │ │ ├── bind_support.py
│ │ │ │ ├── bind_support_fc.py
│ │ │ │ ├── change_location.py
│ │ │ │ ├── change_shell_layers.py
│ │ │ │ ├── compute_time_scoping.py
│ │ │ │ ├── default_value.py
│ │ │ │ ├── delegate_to_operator.py
│ │ │ │ ├── ds_get_attribute.py
│ │ │ │ ├── extract_field.py
│ │ │ │ ├── extract_scoping.py
│ │ │ │ ├── extract_sub_fc.py
│ │ │ │ ├── extract_sub_mc.py
│ │ │ │ ├── extract_sub_sc.py
│ │ │ │ ├── extract_time_freq.py
│ │ │ │ ├── fc_get_attribute.py
│ │ │ │ ├── field.py
│ │ │ │ ├── field_clone_to_shell_layer.py
│ │ │ │ ├── field_get_attribute.py
│ │ │ │ ├── field_to_fc.py
│ │ │ │ ├── fields_container.py
│ │ │ │ ├── fields_container_matrices_label.py
│ │ │ │ ├── for_each.py
│ │ │ │ ├── forward.py
│ │ │ │ ├── forward_field.py
│ │ │ │ ├── forward_fields_container.py
│ │ │ │ ├── forward_meshes_container.py
│ │ │ │ ├── hdf5dpf_workglow_provider.py
│ │ │ │ ├── html_doc.py
│ │ │ │ ├── incremental_concatenate_as_fc.py
│ │ │ │ ├── ints_to_scoping.py
│ │ │ │ ├── make_for_each_range.py
│ │ │ │ ├── make_label_space.py
│ │ │ │ ├── make_overall.py
│ │ │ │ ├── make_producer_consumer_for_each_iterator.py
│ │ │ │ ├── merge_any.py
│ │ │ │ ├── merge_collections.py
│ │ │ │ ├── merge_data_tree.py
│ │ │ │ ├── merge_fields.py
│ │ │ │ ├── merge_fields_by_label.py
│ │ │ │ ├── merge_fields_containers.py
│ │ │ │ ├── merge_generic_data_container.py
│ │ │ │ ├── merge_materials.py
│ │ │ │ ├── merge_meshes.py
│ │ │ │ ├── merge_meshes_containers.py
│ │ │ │ ├── merge_property_fields.py
│ │ │ │ ├── merge_result_infos.py
│ │ │ │ ├── merge_scopings.py
│ │ │ │ ├── merge_scopings_containers.py
│ │ │ │ ├── merge_string_fields.py
│ │ │ │ ├── merge_supports.py
│ │ │ │ ├── merge_time_freq_supports.py
│ │ │ │ ├── merge_to_field_matrix.py
│ │ │ │ ├── merge_weighted_fields.py
│ │ │ │ ├── merge_weighted_fields_containers.py
│ │ │ │ ├── mesh.py
│ │ │ │ ├── mesh_to_mc.py
│ │ │ │ ├── meshes_container.py
│ │ │ │ ├── operator_changelog.py
│ │ │ │ ├── operator_id.py
│ │ │ │ ├── overlap_fields.py
│ │ │ │ ├── producer_consumer_for_each.py
│ │ │ │ ├── property_field.py
│ │ │ │ ├── python_generator.py
│ │ │ │ ├── remote_operator_instantiate.py
│ │ │ │ ├── remote_workflow_instantiate.py
│ │ │ │ ├── remove_unnecessary_labels.py
│ │ │ │ ├── scalars_to_field.py
│ │ │ │ ├── server_path.py
│ │ │ │ ├── set_attribute.py
│ │ │ │ ├── set_property.py
│ │ │ │ ├── split_in_for_each_range.py
│ │ │ │ ├── strain_from_voigt.py
│ │ │ │ ├── strain_from_voigt_fc.py
│ │ │ │ ├── txt_file_to_dpf.py
│ │ │ │ ├── unitary_field.py
│ │ │ │ └── weighted_merge_fields_by_label.py
│ │ ├── outputs.py
│ │ ├── path_utilities.py
│ │ ├── plotter.py
│ │ ├── plugins.py
│ │ ├── property_field.py
│ │ ├── property_fields_container.py
│ │ ├── result_info.py
│ │ ├── results.py
│ │ ├── runtime_config.py
│ │ ├── scoping.py
│ │ ├── scopings_container.py
│ │ ├── server.py
│ │ ├── server_context.py
│ │ ├── server_factory.py
│ │ ├── server_types.py
│ │ ├── session.py
│ │ ├── settings.py
│ │ ├── streams_container.py
│ │ ├── string_field.py
│ │ ├── support.py
│ │ ├── time_freq_scoping_factory.py
│ │ ├── time_freq_support.py
│ │ ├── unit_system.py
│ │ ├── vtk_helper.py
│ │ ├── workflow.py
│ │ └── workflow_topology
│ │ │ ├── __init__.py
│ │ │ ├── data_connection.py
│ │ │ ├── exposed_pin.py
│ │ │ ├── operator_connection.py
│ │ │ └── workflow_topology.py
│ ├── gate
│ │ ├── __init__.py
│ │ ├── _version.py
│ │ ├── any_grpcapi.py
│ │ ├── collection_grpcapi.py
│ │ ├── common.py
│ │ ├── custom_type_field_grpcapi.py
│ │ ├── cyclic_support_grpcapi.py
│ │ ├── data_processing_grpcapi.py
│ │ ├── data_sources_grpcapi.py
│ │ ├── dpf_array.py
│ │ ├── dpf_data_tree_grpcapi.py
│ │ ├── dpf_vector.py
│ │ ├── errors.py
│ │ ├── field_definition_grpcapi.py
│ │ ├── field_grpcapi.py
│ │ ├── generated
│ │ │ ├── any_abstract_api.py
│ │ │ ├── any_capi.py
│ │ │ ├── capi.py
│ │ │ ├── client_abstract_api.py
│ │ │ ├── client_capi.py
│ │ │ ├── collection_abstract_api.py
│ │ │ ├── collection_capi.py
│ │ │ ├── custom_type_field_abstract_api.py
│ │ │ ├── custom_type_field_capi.py
│ │ │ ├── cyclic_support_abstract_api.py
│ │ │ ├── cyclic_support_capi.py
│ │ │ ├── data_base_abstract_api.py
│ │ │ ├── data_base_capi.py
│ │ │ ├── data_processing_abstract_api.py
│ │ │ ├── data_processing_capi.py
│ │ │ ├── data_processing_error_abstract_api.py
│ │ │ ├── data_processing_error_capi.py
│ │ │ ├── data_sources_abstract_api.py
│ │ │ ├── data_sources_capi.py
│ │ │ ├── dpf_data_tree_abstract_api.py
│ │ │ ├── dpf_data_tree_capi.py
│ │ │ ├── dpf_vector_abstract_api.py
│ │ │ ├── dpf_vector_capi.py
│ │ │ ├── external_data_abstract_api.py
│ │ │ ├── external_data_capi.py
│ │ │ ├── external_operator_abstract_api.py
│ │ │ ├── external_operator_capi.py
│ │ │ ├── f_e_model_abstract_api.py
│ │ │ ├── f_e_model_capi.py
│ │ │ ├── field_abstract_api.py
│ │ │ ├── field_capi.py
│ │ │ ├── field_definition_abstract_api.py
│ │ │ ├── field_definition_capi.py
│ │ │ ├── field_mapping_abstract_api.py
│ │ │ ├── field_mapping_capi.py
│ │ │ ├── fields_container_abstract_api.py
│ │ │ ├── fields_container_capi.py
│ │ │ ├── generic_data_container_abstract_api.py
│ │ │ ├── generic_data_container_capi.py
│ │ │ ├── generic_support_abstract_api.py
│ │ │ ├── generic_support_capi.py
│ │ │ ├── label_space_abstract_api.py
│ │ │ ├── label_space_capi.py
│ │ │ ├── materials_container_abstract_api.py
│ │ │ ├── materials_container_capi.py
│ │ │ ├── meshed_region_abstract_api.py
│ │ │ ├── meshed_region_capi.py
│ │ │ ├── operator_abstract_api.py
│ │ │ ├── operator_capi.py
│ │ │ ├── operator_config_abstract_api.py
│ │ │ ├── operator_config_capi.py
│ │ │ ├── operator_specification_abstract_api.py
│ │ │ ├── operator_specification_capi.py
│ │ │ ├── property_field_abstract_api.py
│ │ │ ├── property_field_capi.py
│ │ │ ├── remote_operator_abstract_api.py
│ │ │ ├── remote_operator_capi.py
│ │ │ ├── remote_workflow_abstract_api.py
│ │ │ ├── remote_workflow_capi.py
│ │ │ ├── result_definition_abstract_api.py
│ │ │ ├── result_definition_capi.py
│ │ │ ├── result_info_abstract_api.py
│ │ │ ├── result_info_capi.py
│ │ │ ├── scoping_abstract_api.py
│ │ │ ├── scoping_capi.py
│ │ │ ├── serialization_stream_abstract_api.py
│ │ │ ├── serialization_stream_capi.py
│ │ │ ├── session_abstract_api.py
│ │ │ ├── session_capi.py
│ │ │ ├── specification_externalization_abstract_api.py
│ │ │ ├── specification_externalization_capi.py
│ │ │ ├── streams_abstract_api.py
│ │ │ ├── streams_capi.py
│ │ │ ├── string_field_abstract_api.py
│ │ │ ├── string_field_capi.py
│ │ │ ├── support_abstract_api.py
│ │ │ ├── support_capi.py
│ │ │ ├── support_query_abstract_api.py
│ │ │ ├── support_query_capi.py
│ │ │ ├── time_freq_support_abstract_api.py
│ │ │ ├── time_freq_support_capi.py
│ │ │ ├── tmp_dir_abstract_api.py
│ │ │ ├── tmp_dir_capi.py
│ │ │ ├── unit_abstract_api.py
│ │ │ ├── unit_capi.py
│ │ │ ├── workflow_abstract_api.py
│ │ │ └── workflow_capi.py
│ │ ├── generic_data_container_grpcapi.py
│ │ ├── generic_support_grpcapi.py
│ │ ├── grpc_stream_helpers.py
│ │ ├── integral_types.py
│ │ ├── label_space_grpcapi.py
│ │ ├── load_api.py
│ │ ├── meshed_region_grpcapi.py
│ │ ├── misc.py
│ │ ├── object_handler.py
│ │ ├── operator_config_grpcapi.py
│ │ ├── operator_grpcapi.py
│ │ ├── operator_specification_grpcapi.py
│ │ ├── property_field_grpcapi.py
│ │ ├── result_info_grpcapi.py
│ │ ├── scoping_grpcapi.py
│ │ ├── session_grpcapi.py
│ │ ├── settings.py
│ │ ├── string_field_grpcapi.py
│ │ ├── support_grpcapi.py
│ │ ├── time_freq_support_grpcapi.py
│ │ ├── tmp_dir_grpcapi.py
│ │ ├── utils.py
│ │ └── workflow_grpcapi.py
│ └── gatebin
│ │ ├── Ans.Dpf.GrpcClient.dll
│ │ ├── DPFClientAPI.dll
│ │ ├── _version.py
│ │ ├── libAns.Dpf.GrpcClient.so
│ │ └── libDPFClientAPI.so
│ └── grpc
│ └── dpf
│ ├── __init__.py
│ ├── _version.py
│ ├── available_result_pb2.py
│ ├── available_result_pb2_grpc.py
│ ├── base_pb2.py
│ ├── base_pb2_grpc.py
│ ├── collection_message_pb2.py
│ ├── collection_message_pb2_grpc.py
│ ├── collection_pb2.py
│ ├── collection_pb2_grpc.py
│ ├── cyclic_support_pb2.py
│ ├── cyclic_support_pb2_grpc.py
│ ├── data_sources_pb2.py
│ ├── data_sources_pb2_grpc.py
│ ├── data_tree_pb2.py
│ ├── data_tree_pb2_grpc.py
│ ├── dpf_any_message_pb2.py
│ ├── dpf_any_message_pb2_grpc.py
│ ├── dpf_any_pb2.py
│ ├── dpf_any_pb2_grpc.py
│ ├── field_definition_pb2.py
│ ├── field_definition_pb2_grpc.py
│ ├── field_pb2.py
│ ├── field_pb2_grpc.py
│ ├── generic_data_container_pb2.py
│ ├── generic_data_container_pb2_grpc.py
│ ├── generic_support_pb2.py
│ ├── generic_support_pb2_grpc.py
│ ├── label_space_pb2.py
│ ├── label_space_pb2_grpc.py
│ ├── meshed_region_pb2.py
│ ├── meshed_region_pb2_grpc.py
│ ├── operator_config_pb2.py
│ ├── operator_config_pb2_grpc.py
│ ├── operator_pb2.py
│ ├── operator_pb2_grpc.py
│ ├── result_info_pb2.py
│ ├── result_info_pb2_grpc.py
│ ├── scoping_pb2.py
│ ├── scoping_pb2_grpc.py
│ ├── session_pb2.py
│ ├── session_pb2_grpc.py
│ ├── support_pb2.py
│ ├── support_pb2_grpc.py
│ ├── support_service_pb2.py
│ ├── support_service_pb2_grpc.py
│ ├── time_freq_support_pb2.py
│ ├── time_freq_support_pb2_grpc.py
│ ├── workflow_message_pb2.py
│ ├── workflow_message_pb2_grpc.py
│ ├── workflow_pb2.py
│ └── workflow_pb2_grpc.py
├── testing.md
├── tests
├── conftest.py
├── entry
│ ├── conftest.py
│ ├── pytest.ini
│ └── test_entry.py
├── operators
│ ├── test_change_shell_layers.py
│ ├── test_coordinate_system.py
│ ├── test_operator_elemental_mass.py
│ └── test_operator_mesh_plan_clip.py
├── slow
│ ├── test_remoteworkflow.py
│ └── test_slow.py
├── test_animation.py
├── test_animator.py
├── test_any.py
├── test_cache.py
├── test_cff.py
├── test_changelog.py
├── test_checkversion.py
├── test_code_docstrings.py
├── test_codegeneration.py
├── test_collection.py
├── test_custom_type_field.py
├── test_cyclic_support.py
├── test_data_tree.py
├── test_datasources.py
├── test_dpf_vector.py
├── test_elements.py
├── test_examples.py
├── test_faces.py
├── test_factories.py
├── test_field.py
├── test_fieldscontainer.py
├── test_generic_data_container.py
├── test_genericsupport.py
├── test_geometry.py
├── test_hdf5.py
├── test_incremental.py
├── test_label_space.py
├── test_launcher.py
├── test_launcher_remote.py
├── test_local_server.py
├── test_lsdyna.py
├── test_mesh_info.py
├── test_meshescontainer.py
├── test_meshregion.py
├── test_model.py
├── test_multi_server.py
├── test_operator.py
├── test_operatorshelper.py
├── test_parallel.py
├── test_pathsupport.py
├── test_plotter.py
├── test_plugins.py
├── test_property_fields_container.py
├── test_propertyfield.py
├── test_python_plugins.py
├── test_remote_operator.py
├── test_remote_workflow.py
├── test_resultinfo.py
├── test_scoping.py
├── test_scopingscontainer.py
├── test_server.py
├── test_service.py
├── test_session.py
├── test_specification.py
├── test_streams_container.py
├── test_stringfield.py
├── test_timefreqsupport.py
├── test_unit_systems.py
├── test_version.py
├── test_vtk_translate.py
├── test_workflow.py
├── test_workflow_topology.py
└── testfiles
│ ├── csvToField
│ └── fields_container.csv
│ ├── cyclic
│ ├── ds.dat
│ └── file.rst
│ ├── d3plot
│ ├── d3plot
│ ├── d3plot01
│ ├── d3plot02
│ └── file.actunits
│ ├── engineeringData
│ ├── MatML.xml
│ ├── ds.dat
│ └── file.rst
│ ├── pythonPlugins
│ ├── all_types
│ │ ├── __init__.py
│ │ ├── dpf_types_op.py
│ │ ├── integral_types_op.py
│ │ └── load_operators_func.py
│ ├── operator_with_changelog.py
│ ├── operator_with_spec.py
│ └── syntax_error_plugin
│ │ ├── __init__.py
│ │ └── load_operators_func.py
│ └── rst_operators
│ ├── multishells.rst
│ ├── simpleModel.rst
│ └── velocity_acceleration.rst
└── tox.ini
/.ci/build_doc.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | REM Move to the documentation directory
4 | pushd .
5 | cd ../doc/
6 |
7 | REM Clean the previous build
8 | call make clean
9 |
10 | REM Build the HTML documentation
11 | call make html -v -v -v -P
12 |
13 | REM Display the directory contents for verification
14 | dir
15 |
16 | REM Patch pyVista issue with elemental plots by copying necessary images
17 | xcopy source\examples\04-advanced\02-volume_averaged_stress\sphx_glr_02-volume_averaged_stress_001.png build\html\_images\ /y /f
18 | xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_001.png build\html\_images\ /y /f
19 | xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_002.png build\html\_images\ /y /f
20 | xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_003.png build\html\_images\ /y /f
21 | xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_004.png build\html\_images\ /y /f
22 | xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_005.png build\html\_images\ /y /f
23 | xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_006.png build\html\_images\ /y /f
24 | xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_007.png build\html\_images\ /y /f
25 | xcopy source\examples\12-fluids\02-fluids_results\sphx_glr_02-fluids_results_thumb.png build\html\_images\ /y /f
26 |
27 | REM Return to the original directory
28 | popd
29 |
--------------------------------------------------------------------------------
/.ci/build_operators_doc.py:
--------------------------------------------------------------------------------
1 | import ansys.dpf.core as dpf
2 | from ansys.dpf.core.server_context import (
3 | SERVER_CONTEXT,
4 | )
5 |
6 | print(f"Server version: {dpf.global_server().version}")
7 | # Generate entry documentation
8 | print("Generating operator documentation")
9 | print(f"Current context: {SERVER_CONTEXT}")
10 | dpf.operators.utility.html_doc(r"../doc/source/_static/dpf_operators.html").eval()
11 | print("Done.\n")
12 |
--------------------------------------------------------------------------------
/.ci/code_generation.py:
--------------------------------------------------------------------------------
1 | # import subprocess
2 |
3 | import glob
4 | import os
5 | from pathlib import Path
6 | import shutil
7 |
8 | from ansys.dpf import core
9 | from ansys.dpf.core.operators import build
10 |
11 | core.set_default_server_context(core.AvailableServerContexts.premium)
12 | core.start_local_server(config=core.AvailableServerConfigs.LegacyGrpcServer)
13 |
14 | local_dir = Path(__file__).parent
15 | TARGET_PATH = local_dir.parent / "src" / "ansys" / "dpf" / "core" / "operators"
16 | files = TARGET_PATH.glob("*")
17 | for file_path in files:
18 | if file_path.stem == "specification":
19 | continue
20 | if file_path.stem == "translator":
21 | continue
22 | if file_path.name == "build.py":
23 | continue
24 | if file_path.name == "operator.mustache":
25 | continue
26 | try:
27 | if file_path.is_dir():
28 | shutil.rmtree(file_path)
29 | else:
30 | file_path.unlink()
31 | except:
32 | pass
33 |
34 | build.build_operators()
35 |
--------------------------------------------------------------------------------
/.ci/run_examples.py:
--------------------------------------------------------------------------------
1 | import glob
2 | import os
3 | from pathlib import Path
4 | import subprocess
5 | import sys
6 |
7 | import ansys.dpf.core as dpf
8 | from ansys.dpf.core.examples import get_example_required_minimum_dpf_version
9 |
10 | os.environ["PYVISTA_OFF_SCREEN"] = "true"
11 | os.environ["MPLBACKEND"] = "Agg"
12 |
13 | actual_path = Path(__file__).parent.absolute()
14 | examples_path = actual_path.parent / "examples"
15 | print(examples_path)
16 |
17 | # Get the DPF server version
18 | server = dpf.server.get_or_create_server(None)
19 | server_version = server.version
20 | server.shutdown()
21 | print(f"Server version: {server_version}")
22 |
23 | for root, subdirectories, files in os.walk(examples_path):
24 | for subdirectory in subdirectories:
25 | subdir = Path(root) / subdirectory
26 | for file in subdir.glob("*.py"):
27 | if sys.platform == "linux" and "08-python-operators" in str(file):
28 | continue
29 | elif "win" in sys.platform and "06-distributed_stress_averaging" in str(file):
30 | # Currently very unstable in the GH CI
31 | continue
32 | print("\n--------------------------------------------------")
33 | print(file)
34 | minimum_version_str = get_example_required_minimum_dpf_version(file)
35 | if float(server_version) - float(minimum_version_str) < -0.05:
36 | print(f"Example skipped as it requires DPF {minimum_version_str}.", flush=True)
37 | continue
38 | try:
39 | out = subprocess.check_output([sys.executable, str(file)])
40 | except subprocess.CalledProcessError as e:
41 | sys.stderr.write(str(e.args))
42 | if e.returncode != 3221225477:
43 | print(out, flush=True)
44 | raise e
45 | print("PASS", flush=True)
46 |
--------------------------------------------------------------------------------
/.ci/run_non_regression_examples.py:
--------------------------------------------------------------------------------
1 | import glob
2 | import os
3 | import pathlib
4 | import subprocess
5 | import sys
6 |
7 | from ansys.dpf import core
8 |
9 | os.environ["PYVISTA_OFF_SCREEN"] = "true"
10 | os.environ["MPLBACKEND"] = "Agg"
11 |
12 | actual_path = pathlib.Path(__file__).parent.absolute()
13 | examples_path = actual_path.parent / "examples"
14 | print(examples_path)
15 |
16 |
17 | list_tests = [
18 | examples_path / "00-basic",
19 | examples_path / "01-transient_analyses",
20 | examples_path / "02-modal_analyses",
21 | examples_path / "03-harmonic_analyses",
22 | examples_path / "06-plotting" / "00-basic_plotting.py",
23 | examples_path / "06-plotting" / "05-plot_on_warped_mesh.py",
24 | examples_path / "07-distributed-post" / "00-distributed_total_disp.py",
25 | ]
26 |
27 | if core.SERVER_CONFIGURATION != core.AvailableServerConfigs.InProcessServer:
28 | list_tests.append(examples_path / "08-python-operators" / "00-wrapping_numpy_capabilities.py")
29 |
30 | for path in list_tests:
31 | if path.is_dir():
32 | for file in path.glob("*.py"):
33 | print("\n--------------------------------------------------")
34 | print(file)
35 | try:
36 | subprocess.check_call([sys.executable, str(file)])
37 | except subprocess.CalledProcessError as e:
38 | sys.stderr.write(str(e.args))
39 | if e.returncode != 3221225477:
40 | raise e
41 | print("PASS")
42 | else:
43 | print("\n--------------------------------------------------")
44 | print(path)
45 | try:
46 | subprocess.check_call([sys.executable, str(file)])
47 | except subprocess.CalledProcessError as e:
48 | sys.stderr.write(str(e.args))
49 | if e.returncode != 3221225477:
50 | raise e
51 | print("PASS")
52 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/documentation.yml:
--------------------------------------------------------------------------------
1 | name: 📖 Documentation issue
2 | description: Modifications to the documentation only
3 | title: "Modify ..."
4 | labels: ["documentation"]
5 | assignees: [""]
6 |
7 | body:
8 |
9 | - type: markdown
10 | attributes:
11 | value: '# 📝 **Modifications**'
12 |
13 | - type: textarea
14 | id: modifications
15 | attributes:
16 | label: Description of the modifications
17 | placeholder: Describe what modification you propose and why it is useful for the project
18 | validations:
19 | required: true
20 |
21 | - type: markdown
22 | attributes:
23 | value: '# 🔗 **References**'
24 |
25 | - type: textarea
26 | id: references
27 | attributes:
28 | label: Useful links and references
29 | placeholder: A list of links and references to help when modifying the documentation
30 | validations:
31 | required: false
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/examples.yml:
--------------------------------------------------------------------------------
1 | name: 🎓 Adding an example
2 | description: Proposing a new example for the library
3 | title: "Example proposal: ..."
4 | labels: ["examples"]
5 | assignees: [""]
6 |
7 | body:
8 |
9 | - type: textarea
10 | id: example-description
11 | attributes:
12 | label: '📝 Description of the example'
13 | placeholder: Describe what example you devised and why it is useful for the project.
14 |
15 | validations:
16 | required: true
17 |
18 | - type: textarea
19 | id: example-files
20 | attributes:
21 | label: '📁 Files needed for running the example'
22 | placeholder: >
23 | Drag and drop the files used in your example, together with the script employed.
24 | Test the example files before uploading to ensure they at least run on your machine.
25 | Add any additional comments/explanations that maintainers may need for running the example.
26 | If you have issues uploading your files because of the file extension/type, upload them
27 | as a .zip file.
28 | validations:
29 | required: true
30 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature.yml:
--------------------------------------------------------------------------------
1 | name: 💡 New feature
2 | description: Enhancements to the code
3 | title: "Add ..."
4 | labels: ["enhancement"]
5 | assignees: [""]
6 |
7 | body:
8 |
9 | - type: markdown
10 | attributes:
11 | value: '# 📝 **New Feature**'
12 |
13 | - type: textarea
14 | id: feature-description
15 | attributes:
16 | label: Description of the feature
17 | placeholder: Describe what feature you devised and why it is useful for the project
18 | validations:
19 | required: true
20 |
21 | - type: markdown
22 | attributes:
23 | value: '# 💡 **Implementation**'
24 |
25 | - type: textarea
26 | id: implementation-description
27 | attributes:
28 | label: Steps for implementing the feature
29 | placeholder: Describe how this new feature can be implemented
30 | validations:
31 | required: false
32 |
33 | - type: markdown
34 | attributes:
35 | value: '# 🔗 **References**'
36 |
37 | - type: textarea
38 | id: references
39 | attributes:
40 | label: Useful links and references
41 | placeholder: A list of links and references to help when implementing the feature
42 | validations:
43 | required: false
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/tutorial.yml:
--------------------------------------------------------------------------------
1 | name: 🎓 Adding a tutorial
2 | description: Proposing a new tutorial for the library
3 | title: "Tutorial proposal: ..."
4 | labels: ["tutorials"]
5 | assignees: [""]
6 |
7 | body:
8 |
9 | - type: textarea
10 | id: tutorial-description
11 | attributes:
12 | label: '📝 Description of the tutorial'
13 | placeholder: Describe what tutorial you devised and why it is useful for the project.
14 |
15 | validations:
16 | required: true
17 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "pip" # See documentation for possible values
4 | directory: "requirements/" # Location of package manifests
5 | insecure-external-code-execution: allow
6 | schedule:
7 | interval: "daily"
8 | # Allow up to 10 open pull requests for pip dependencies
9 | open-pull-requests-limit: 10
10 | labels:
11 | - "maintenance"
12 | - "dependencies"
13 | ignore:
14 | - dependency-name: "vtk"
15 |
16 | - package-ecosystem: "github-actions"
17 | directory: ".github/"
18 | schedule:
19 | interval: "daily"
20 | labels:
21 | - "maintenance"
22 | - "CI/CD"
23 |
--------------------------------------------------------------------------------
/.github/labeler.yml:
--------------------------------------------------------------------------------
1 | documentation:
2 | - doc/source/**/*
3 | - examples/**/*
4 | maintenance:
5 | - .flake8
6 | - CODE_OF_CONDUCT.md
7 | - LICENSE
8 | - README.md
9 | - codecov.yml
10 | - ignore_words.txt
11 | - setup.py
12 | dependencies:
13 | - setup.py
14 | - requirements/*
15 | CI/CD:
16 | - docker/**/*
17 | - .github/**/*
18 | - .ci/**/*
--------------------------------------------------------------------------------
/.github/release.yml:
--------------------------------------------------------------------------------
1 | changelog:
2 | exclude:
3 | authors:
4 | - dependabot[bot]
5 | categories:
6 | - title: Enhancements
7 | labels:
8 | - enhancement
9 | - title: Bug fixes
10 | labels:
11 | - bug
12 | - title: Documentation
13 | labels:
14 | - documentation
15 | - title: Examples
16 | labels:
17 | - examples
18 | - title: CI/CD
19 | labels:
20 | - CI/CD
21 | - title: Maintenance
22 | labels:
23 | - maintenance
24 | - dependencies
25 |
--------------------------------------------------------------------------------
/.github/workflows/scripts/separate_long_core_tests.ps1:
--------------------------------------------------------------------------------
1 | New-Item -Path ".\" -Name "test_launcher" -ItemType "directory"
2 | New-Item -Path ".\" -Name "test_server" -ItemType "directory"
3 | New-Item -Path ".\" -Name "test_local_server" -ItemType "directory"
4 | New-Item -Path ".\" -Name "test_multi_server" -ItemType "directory"
5 | New-Item -Path ".\" -Name "test_workflow" -ItemType "directory"
6 | New-Item -Path ".\" -Name "test_remote_workflow" -ItemType "directory"
7 | New-Item -Path ".\" -Name "test_remote_operator" -ItemType "directory"
8 | New-Item -Path ".\" -Name "test_service" -ItemType "directory"
9 | New-Item -Path ".\" -Name "test_custom_type_field" -ItemType "directory"
10 | Copy-Item -Path "tests\conftest.py" -Destination ".\test_launcher\"
11 | Copy-Item -Path "tests\conftest.py" -Destination ".\test_server\"
12 | Copy-Item -Path "tests\conftest.py" -Destination ".\test_local_server\"
13 | Copy-Item -Path "tests\conftest.py" -Destination ".\test_multi_server\"
14 | Copy-Item -Path "tests\conftest.py" -Destination ".\test_workflow\"
15 | Copy-Item -Path "tests\conftest.py" -Destination ".\test_remote_workflow\"
16 | Copy-Item -Path "tests\conftest.py" -Destination ".\test_remote_operator\"
17 | Copy-Item -Path "tests\conftest.py" -Destination ".\test_service\"
18 | Copy-Item -Path "tests\conftest.py" -Destination ".\test_custom_type_field\"
19 | Copy-Item -Path "tests\test_launcher.py" -Destination ".\test_launcher\"
20 | Copy-Item -Path "tests\test_server.py" -Destination ".\test_server\"
21 | Copy-Item -Path "tests\test_local_server.py" -Destination ".\test_local_server\"
22 | Copy-Item -Path "tests\test_multi_server.py" -Destination ".\test_multi_server\"
23 | Copy-Item -Path "tests\test_workflow.py" -Destination ".\test_workflow\"
24 | Copy-Item -Path "tests\test_remote_workflow.py" -Destination ".\test_remote_workflow\"
25 | Copy-Item -Path "tests\test_remote_operator.py" -Destination ".\test_remote_operator\"
26 | Copy-Item -Path "tests\test_service.py" -Destination ".\test_service\"
27 | Copy-Item -Path "tests\test_custom_type_field.py" -Destination ".\test_custom_type_field\"
28 | Remove-Item -Path "tests\test_server.py"
29 | Remove-Item -Path "tests\test_launcher.py"
30 | Remove-Item -Path "tests\test_local_server.py"
31 | Remove-Item -Path "tests\test_multi_server.py"
32 | Remove-Item -Path "tests\test_workflow.py"
33 | Remove-Item -Path "tests\test_remote_workflow.py"
34 | Remove-Item -Path "tests\test_remote_operator.py"
35 | Remove-Item -Path "tests\test_service.py"
36 | Remove-Item -Path "tests\test_custom_type_field.py"
--------------------------------------------------------------------------------
/.pre-commit-config.yaml:
--------------------------------------------------------------------------------
1 | exclude: >
2 | (?x)^(
3 | doc/source/
4 | |src/ansys/dpf/core/operators/
5 | |examples_notebooks/
6 | |src/ansys/dpf/core/__init__.py
7 | |doc/styles/
8 | |src/ansys/dpf/gate/
9 | |src/ansys/dpf/gatebin/
10 | |src/ansys/grpc/dpf/
11 | )
12 | repos:
13 |
14 | - repo: https://github.com/charliermarsh/ruff-pre-commit
15 | rev: v0.7.3
16 | hooks:
17 | - id: ruff
18 | args: [--fix]
19 | - id: ruff-format
20 |
21 | - repo: https://github.com/codespell-project/codespell
22 | rev: v2.3.0
23 | hooks:
24 | - id: codespell
25 | args: ["--ignore-words=./doc/styles/config/vocabularies/ANSYS/accept.txt"]
26 |
27 | - repo: https://github.com/pre-commit/pre-commit-hooks
28 | rev: v5.0.0
29 | hooks:
30 | - id: check-merge-conflict
31 | - id: debug-statements
32 | - id: requirements-txt-fixer
33 |
34 | - repo: https://github.com/ansys/pre-commit-hooks
35 | rev: v0.4.4
36 | hooks:
37 | - id: add-license-headers
38 | args:
39 | - --start_year=2020
40 |
41 | # this validates our github workflow files
42 | - repo: https://github.com/python-jsonschema/check-jsonschema
43 | rev: 0.29.4
44 | hooks:
45 | - id: check-github-workflows
46 |
--------------------------------------------------------------------------------
/AUTHORS:
--------------------------------------------------------------------------------
1 | # This is the list of PyDPF-Core's significant contributors.
2 | #
3 | # This file does not necessarily list everyone who has contributed code.
4 | #
5 | # For contributions made under a Corporate CLA, the organization is
6 | # added to this file.
7 | #
8 | # If you have contributed to the repository and want to be added to this file,
9 | # submit a request.
10 | #
11 | #
12 | ANSYS, Inc.
13 |
--------------------------------------------------------------------------------
/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # Lines starting with '#' are comments.
2 | # Each line is a file pattern followed by one or more owners.
3 |
4 | # These owners will be the default owners for everything in the repo.
5 | #* @example
6 |
7 | # Order is important. The last matching pattern has the most precedence.
8 | # So if a pull request only touches javascript files, only these owners
9 | # will be requested to review.
10 | src/ansys/grpc/* @ansys/dpf_integration_proxies
11 | src/ansys/dpf/gate/* @ansys/dpf_integration_proxies
12 | src/ansys/dpf/gatebin/* @ansys/dpf_integration_proxies
13 |
--------------------------------------------------------------------------------
/CONTRIBUTORS.md:
--------------------------------------------------------------------------------
1 | # Contributors
2 |
3 | ## Project Lead
4 |
5 | * [Paul Profizi](https://github.com/PProfizi)
6 |
7 | ## Individual Contributors
8 |
9 | * [Alex Kaszynski](https://github.com/akaszynski)
10 | * [Alex Kaszynski](https://github.com/ansys-akaszyns)
11 | * [Alexandre Bouthéon](https://github.com/a-bouth)
12 | * [anslpa](https://github.com/anslpa)
13 | * [Antoine Karcher](https://github.com/ansys-akarcher)
14 | * [Arthur Woimbée](https://github.com/awoimbee)
15 | * [Ayush Kumar](https://github.com/ayush-kumar-423)
16 | * [BrunoClappe-Ansys](https://github.com/BClappe)
17 | * [Camille Bellot](https://github.com/cbellot000)
18 | * [Camille Latapie](https://github.com/clatapie)
19 | * [Clément Phan](https://github.com/ClementPhan)
20 | * [Dominik Gresch](https://github.com/greschd)
21 | * [Edu Ramos Fernandez](https://github.com/anseramosfe)
22 | * [Federico Negri](https://github.com/FedericoNegri)
23 | * [German](https://github.com/germa89)
24 | * [Guillem Barroso](https://github.com/GuillemBarroso)
25 | * [guptadivya1501](https://github.com/guptadivya1501)
26 | * [hoangxuyenle](https://github.com/hoangxuyenle)
27 | * [Jamil HAJJAR](https://github.com/ansjhajjar)
28 | * [janvonrickenbach](https://github.com/janvonrickenbach)
29 | * [Jean-Francois Thuong](https://github.com/jfthuong)
30 | * [JennaPaikowsky](https://github.com/JennaPaikowsky)
31 | * [jleonatti](https://github.com/jleonatti)
32 | * [Jorge Martínez](https://github.com/jorgepiloto)
33 | * [Jose Armando Henriquez Roa](https://github.com/jose-henriquez-roa)
34 | * [jose-henriquezroa](https://github.com/jose-henriquezroa)
35 | * [jviqueg](https://github.com/jviqueg)
36 | * [Kathy Pippert](https://github.com/PipKat)
37 | * [kmahajan-cadfem](https://github.com/kmahajan-cadfem)
38 | * [Luisa Felix Salles](https://github.com/luisaFelixSalles)
39 | * [Mattéo Baussart](https://github.com/Matteo-Baussart-ANSYS)
40 | * [Maxime Rey](https://github.com/MaxJPRey)
41 | * [MichaelNale](https://github.com/MichaelNale)
42 | * [Muhammed Adedigba](https://github.com/moe-ad)
43 | * [Oscar Moro](https://github.com/oparreno)
44 | * [Paul P](https://github.com/TheGoldfish01)
45 | * [Pierre Lulé](https://github.com/plule-ansys)
46 | * [Rafael Canton](https://github.com/rafacanton)
47 | * [Ramdane Lagha](https://github.com/rlagha)
48 | * [Revathy Venugopal](https://github.com/Revathyvenugopal162)
49 | * [Roberto Pastor Muela](https://github.com/RobPasMue)
50 | * [Sean Ahern](https://github.com/ahernsean)
51 | * [Theo Meunier](https://github.com/TheoMeunierAnsys)
52 | * [vsousacosta](https://github.com/vsousacosta)
53 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9 | of the Software, and to permit persons to whom the Software is furnished to do
10 | so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # Simple makefile to simplify repetitive build env management tasks under posix
2 |
3 | CODESPELL_DIRS ?= ./
4 | CODESPELL_SKIP ?= "*.pyc,*.txt,*.gif,*.png,*.jpg,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,./doc/build/*,./doc/images/*,./dist/*,*~,.hypothesis*,./doc/source/examples/*,*cover,*.dat,*.mac,\#*,build,./ansys/dpf/core/raw_operators.py,./run_client.bat,./docker/v211"
5 | CODESPELL_IGNORE ?= "ignore_words.txt"
6 |
7 | all: doctest
8 |
9 | doctest: codespell
10 |
11 | codespell:
12 | @echo "Running codespell"
13 | @codespell $(CODESPELL_DIRS) -S $(CODESPELL_SKIP) -I $(CODESPELL_IGNORE)
14 |
15 | flake8:
16 | @echo "Running flake8"
17 | @flake8 .
18 |
19 | pydocstyle:
20 | @echo "Running pydocstyle"
21 | @pydocstyle ansys.dpf.core
22 |
23 | doctest-modules:
24 | @echo "Running module doctesting"
25 | pytest -v --doctest-modules ansys.dpf.core
26 |
27 | coverage:
28 | @echo "Running coverage"
29 | @pytest -v --cov ansys.dpf.core
30 |
31 | coverage-xml:
32 | @echo "Reporting XML coverage"
33 | @pytest -v --cov ansys.dpf.core --cov-report xml
34 |
35 | coverage-html:
36 | @echo "Reporting HTML coverage"
37 | @pytest -v --cov ansys.dpf.core --cov-report html
38 |
--------------------------------------------------------------------------------
/codacy.yml:
--------------------------------------------------------------------------------
1 | ---
2 | exclude_paths:
3 | - "./ci/**/*"
4 | - "./src/ansys/dpf/core/operators/**/*"
5 | - "./src/ansys/dpf/gate/**/*"
6 | - "./src/ansys/dpf/gatebin/**/*"
7 | - "./src/ansys/grpc/dpf/**/*"
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | comment:
2 | layout: "diff"
3 | behavior: default
4 |
5 | coverage:
6 | status:
7 | project: false
8 | patch:
9 | default:
10 | # basic
11 | target: auto
12 | threshold: 10%
13 | if_not_found: success
14 | if_ci_failed: error
15 | if_no_uploads: error
16 | ignore:
17 | - "examples" # ignore folder and all its contents
18 | - "doc" # ignore folder and all its contents
19 | - "docker" # ignore folder and all its contents
20 | - "tests" # ignore folder and all its contents
21 | - "src/ansys/dpf/core/operators" # ignore folder and all its contents
22 | - "src/ansys/dpf/gate" # ignore folder and all its contents
23 | - "src/ansys/dpf/gatebin" # ignore folder and all its contents
24 | - "src/ansys/grpc/dpf" # ignore folder and all its contents
--------------------------------------------------------------------------------
/conftest.py:
--------------------------------------------------------------------------------
1 | """This runs at the init of the doctest pytest session
2 |
3 | Launch or connect to a persistent local DPF service to be shared in
4 | pytest as a session fixture
5 | """
6 |
7 | import doctest
8 | from doctest import DocTestRunner
9 | from unittest import mock
10 |
11 | import pytest
12 |
13 | from ansys.dpf import core
14 | from ansys.dpf.core.misc import module_exists
15 |
16 | # enable matplotlib off_screen plotting to avoid test interruption
17 |
18 | if module_exists("matplotlib"):
19 | import matplotlib as mpl
20 |
21 | mpl.use("Agg")
22 |
23 |
24 | # enable off_screen plotting to avoid test interruption
25 | core.settings.disable_off_screen_rendering()
26 | core.settings.bypass_pv_opengl_osmesa_crash()
27 |
28 |
29 | class DPFDocTestRunner(DocTestRunner):
30 | def run(self, test, compileflags=None, out=None, clear_globs=True):
31 | try:
32 | return DocTestRunner.run(self, test, compileflags, out, clear_globs)
33 | except doctest.UnexpectedException as e:
34 | feature_str = "Feature not supported. Upgrade the server to"
35 | if feature_str in str(e.exc_info):
36 | pass
37 | else:
38 | raise e
39 |
40 |
41 | @pytest.fixture(autouse=True)
42 | def doctest_runner_dpf():
43 | with mock.patch("doctest.DocTestRunner", DPFDocTestRunner):
44 | yield
45 |
--------------------------------------------------------------------------------
/doc/.vale.ini:
--------------------------------------------------------------------------------
1 | # Core settings
2 | # =============
3 |
4 | # Location of our `styles`
5 | StylesPath = "styles"
6 |
7 | # The options are `suggestion`, `warning`, or `error` (defaults to “warning”).
8 | MinAlertLevel = warning
9 |
10 | # By default, `code` and `tt` are ignored.
11 | IgnoredScopes = code, tt
12 |
13 | # By default, `script`, `style`, `pre`, and `figure` are ignored.
14 | SkippedScopes = script, style, pre, figure
15 |
16 | # WordTemplate specifies what Vale will consider to be an individual word.
17 | WordTemplate = \b(?:%s)\b
18 |
19 | # List of Packages to be used for our guidelines
20 | Packages = Google
21 |
22 | # Define the Ansys vocabulary
23 | Vocab = ANSYS
24 |
25 | [*.{md,rst}]
26 |
27 | # Apply the following styles
28 | BasedOnStyles = Vale, Google
29 |
30 | # Removing Google-specific rule - Not applicable under some circumstances
31 | Google.WordList = NO
32 | Google.Colons = NO
33 | Google.Headings = NO
34 |
35 | [formats]
36 | # Format associations appear under
37 | # the optional "formats" section.
38 |
39 | [*]
40 | # Format-specific settings appear
41 | # under a user-provided "glob"
42 | # pattern.
43 | TokenIgnores = (:(func|class|meth|attr|py|py:class|py:meth):`(?:.|\n)*?`)|(<.*>)|
44 |
--------------------------------------------------------------------------------
/doc/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | pushd %~dp0
4 |
5 | REM Command file for Sphinx documentation
6 |
7 | if "%SPHINXBUILD%" == "" (
8 | set SPHINXBUILD=sphinx-build
9 | )
10 | set SOURCEDIR=source
11 | set BUILDDIR=build
12 | set SPHINXOPTS=-n
13 |
14 | if "%1" == "" goto help
15 | if "%1" == "clean" goto clean
16 |
17 | %SPHINXBUILD% >NUL 2>NUL
18 | if errorlevel 9009 (
19 | echo.
20 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
21 | echo.installed, then set the SPHINXBUILD environment variable to point
22 | echo.to the full path of the 'sphinx-build' executable. Alternatively you
23 | echo.may add the Sphinx directory to PATH.
24 | echo.
25 | echo.If you don't have Sphinx installed, grab it from
26 | echo.http://sphinx-doc.org/
27 | exit /b 1
28 | )
29 |
30 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
31 | goto end
32 |
33 | :clean
34 | echo.Cleaning files form previous build...
35 | IF EXIST "build" (
36 | rmdir "build" /s /q
37 | )
38 | IF EXIST "source\images\auto-generated" (
39 | rmdir "source\images\auto-generated" /s /q
40 | )
41 | IF EXIST "source\examples\07-python-operators\plugins" (
42 | robocopy "source\examples\07-python-operators\plugins" "source\_temp\plugins" /E >nul 2>&1
43 | )
44 | IF EXIST "source\examples\04-advanced\02-volume_averaged_stress" (
45 | robocopy "source\examples\04-advanced\02-volume_averaged_stress" "source\_temp\04_advanced" /E >nul 2>&1
46 | )
47 | IF EXIST "source\examples\12-fluids\02-fluids_results" (
48 | robocopy "source\examples\12-fluids\02-fluids_results" "source\_temp\12_fluids" /E >nul 2>&1
49 | )
50 | IF EXIST "source\examples" (
51 | rmdir "source\examples" /s /q
52 | )
53 | IF EXIST "source\_temp\plugins" (
54 | robocopy "source\_temp\plugins" "source\examples\07-python-operators\plugins" /E >nul 2>&1
55 | )
56 | IF EXIST "source\_temp\04_advanced" (
57 | robocopy "source\_temp\04_advanced" "source\examples\04-advanced\02-volume_averaged_stress" /E >nul 2>&1
58 | )
59 | IF EXIST "source\_temp\12_fluids" (
60 | robocopy "source\_temp\12_fluids" "source\examples\12-fluids\02-fluids_results" /E >nul 2>&1
61 | )
62 | IF EXIST "source\_temp" (
63 | rmdir "source\_temp" /s /q
64 | )
65 |
66 | echo.Done.
67 | goto end
68 |
69 | :help
70 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
71 |
72 | :end
73 | popd
74 |
--------------------------------------------------------------------------------
/doc/source/_static/custom.css:
--------------------------------------------------------------------------------
1 | /* override table no-wrap */
2 | .wy-table-responsive table td, .wy-table-responsive table th {
3 | white-space: normal;
4 | }
5 |
--------------------------------------------------------------------------------
/doc/source/_static/simple_example.rst:
--------------------------------------------------------------------------------
1 | The following example shows how to open a result file generated by Ansys MAPDL (or another Ansys solver) and
2 | extract results:
3 |
4 | .. code-block:: default
5 |
6 | from ansys.dpf.core import Model
7 | from ansys.dpf.core import examples
8 | model = Model(examples.find_simple_bar())
9 | print(model)
10 |
11 |
12 |
13 | .. rst-class:: sphx-glr-script-out
14 |
15 | .. code-block:: none
16 |
17 | DPF Model
18 | ------------------------------
19 | Static analysis
20 | Unit system: Metric (m, kg, N, s, V, A)
21 | Physics Type: Mechanical
22 | Available results:
23 | - displacement: Nodal Displacement
24 | - element_nodal_forces: ElementalNodal Element nodal Forces
25 | - elemental_volume: Elemental Volume
26 | - stiffness_matrix_energy: Elemental Energy-stiffness matrix
27 | - artificial_hourglass_energy: Elemental Hourglass Energy
28 | - thermal_dissipation_energy: Elemental thermal dissipation energy
29 | - kinetic_energy: Elemental Kinetic Energy
30 | - co_energy: Elemental co-energy
31 | - incremental_energy: Elemental incremental energy
32 | - structural_temperature: ElementalNodal Temperature
33 | ------------------------------
34 | DPF Meshed Region:
35 | 3751 nodes
36 | 3000 elements
37 | Unit: m
38 | With solid (3D) elements
39 | ------------------------------
40 | DPF Time/Freq Support:
41 | Number of sets: 1
42 | Cumulative Time (s) LoadStep Substep
43 | 1 1.000000 1 1
44 |
45 |
46 | .. code-block:: default
47 |
48 | disp = model.results.displacement().X()
49 | model.metadata.meshed_region.plot(disp.outputs.fields_container())
50 |
51 |
52 |
53 | .. rst-class:: sphx-glr-script-out
54 |
55 | .. figure:: images/plotting/simple_example.png
56 |
--------------------------------------------------------------------------------
/doc/source/api/index.rst:
--------------------------------------------------------------------------------
1 | API reference
2 | =============
3 |
4 | This section describes PyDPF-Core endpoints, their capabilities, and how
5 | to interact with them programmatically.
6 |
7 | .. toctree::
8 | :titlesonly:
9 | :maxdepth: 3
10 |
11 | ansys.dpf.core
12 |
--------------------------------------------------------------------------------
/doc/source/examples/04-advanced/02-volume_averaged_stress/sphx_glr_02-volume_averaged_stress_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/examples/04-advanced/02-volume_averaged_stress/sphx_glr_02-volume_averaged_stress_001.png
--------------------------------------------------------------------------------
/doc/source/examples/07-python-operators/plugins/README.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/examples/07-python-operators/plugins/README.txt
--------------------------------------------------------------------------------
/doc/source/examples/07-python-operators/plugins/average_filter_plugin/__init__.py:
--------------------------------------------------------------------------------
1 | from average_filter_plugin.operators_loader import load_operators
2 |
--------------------------------------------------------------------------------
/doc/source/examples/07-python-operators/plugins/average_filter_plugin/common.py:
--------------------------------------------------------------------------------
1 | import numpy
2 |
3 |
4 | def compute_average_of_field(field):
5 | return numpy.average(field.data)
6 |
--------------------------------------------------------------------------------
/doc/source/examples/07-python-operators/plugins/average_filter_plugin/operators_loader.py:
--------------------------------------------------------------------------------
1 | from average_filter_plugin import operators
2 | from ansys.dpf.core.custom_operator import record_operator
3 |
4 |
5 | def load_operators(*args):
6 | record_operator(operators.IdsWithDataHigherThanAverage, *args)
7 | record_operator(operators.IdsWithDataLowerThanAverage, *args)
8 |
--------------------------------------------------------------------------------
/doc/source/examples/07-python-operators/plugins/easy_statistics.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | from ansys.dpf import core as dpf
3 | from ansys.dpf.core.custom_operator import CustomOperatorBase, record_operator
4 | from ansys.dpf.core.operator_specification import CustomSpecification, SpecificationProperties, \
5 | PinSpecification
6 |
7 |
8 | class EasyStatistics(CustomOperatorBase):
9 | @property
10 | def name(self):
11 | return "easy_statistics"
12 |
13 | @property
14 | def specification(self) -> CustomSpecification:
15 | spec = CustomSpecification()
16 | spec.description = "Compute the first quartile, the median, the third quartile and" \
17 | " the variance of a scalar Field with numpy"
18 | spec.inputs = {
19 | 0: PinSpecification("field", [dpf.Field, dpf.FieldsContainer],
20 | "scalar Field on which the statistics quantities is computed."),
21 | }
22 | spec.outputs = {
23 | 0: PinSpecification("first_quartile", [float]),
24 | 1: PinSpecification("median", [float]),
25 | 2: PinSpecification("third_quartile", [float]),
26 | 3: PinSpecification("variance", [float]),
27 | }
28 | spec.properties = SpecificationProperties("easy statistics", "math")
29 | return spec
30 |
31 | def run(self):
32 | field = self.get_input(0, dpf.Field)
33 | if field is None:
34 | field = self.get_input(0, dpf.FieldsContainer)[0]
35 | # compute stats
36 | first_quartile_val = np.quantile(field.data, 0.25)
37 | median_val = np.quantile(field.data, 0.5)
38 | third_quartile_val = np.quantile(field.data, 0.75)
39 | variance_val = np.var(field.data)
40 | self.set_output(0, first_quartile_val)
41 | self.set_output(1, median_val)
42 | self.set_output(2, third_quartile_val)
43 | self.set_output(3, float(variance_val))
44 | self.set_succeeded()
45 |
46 |
47 | def load_operators(*args):
48 | record_operator(EasyStatistics, *args)
49 |
--------------------------------------------------------------------------------
/doc/source/examples/07-python-operators/plugins/gltf_plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(THIS_XML_FOLDER)/gltf_plugin/assets/gltf_sites_winx64.zip;$(CUSTOM_SITE)
5 | true
6 |
7 |
8 | $(THIS_XML_FOLDER)/gltf_plugin/assets/gltf_sites_linx64.zip:$(CUSTOM_SITE)
9 | true
10 |
11 |
--------------------------------------------------------------------------------
/doc/source/examples/07-python-operators/plugins/gltf_plugin/__init__.py:
--------------------------------------------------------------------------------
1 | from gltf_plugin.operators_loader import load_operators
2 |
--------------------------------------------------------------------------------
/doc/source/examples/07-python-operators/plugins/gltf_plugin/operators.py:
--------------------------------------------------------------------------------
1 | from gltf_plugin import gltf_export
2 | from ansys.dpf.core.custom_operator import CustomOperatorBase
3 | from ansys.dpf.core.operator_specification import CustomSpecification, PinSpecification, \
4 | SpecificationProperties
5 | from ansys.dpf import core as dpf
6 |
7 |
8 | class WriteGLTF(CustomOperatorBase):
9 | def run(self):
10 | path = self.get_input(0, str)
11 | mesh = self.get_input(1, dpf.MeshedRegion)
12 | field = self.get_input(2, dpf.Field)
13 |
14 | mesh_element_types = mesh.elements.element_types_field.data_as_list
15 | if mesh_element_types.count(dpf.element_types.Tri3.value) != len(mesh_element_types) \
16 | or not mesh_element_types:
17 | raise Exception("Elements of mesh are not triangles.")
18 |
19 | norm_op = dpf.operators.math.norm()
20 | norm_op.inputs.field.connect(field)
21 |
22 | min_max_op = dpf.operators.min_max.min_max()
23 | min_max_op.inputs.field.connect(norm_op.outputs.field())
24 | field_max = min_max_op.outputs.field_max().data[0]
25 | field_min = min_max_op.outputs.field_min().data[0]
26 | field_range = field_max - field_min
27 |
28 | uv = []
29 | for value in norm_op.outputs.field().data:
30 | uv.append([value / field_range, 0])
31 |
32 | path = gltf_export.export(
33 | path,
34 | mesh.nodes.coordinates_field.data,
35 | mesh.elements.connectivities_field.data_as_list,
36 | uv
37 | )
38 |
39 | self.set_output(0, path)
40 | self.set_succeeded()
41 |
42 | @property
43 | def specification(self):
44 | spec = CustomSpecification("Writes a GLTF file for a surface MeshedRegion with triangles "
45 | "elements and a Field using pygltflib python module.")
46 | spec.inputs = {
47 | 0: PinSpecification("path", type_names=str, document="path to write GLTF file"),
48 | 1: PinSpecification("mesh", type_names=dpf.MeshedRegion),
49 | 2: PinSpecification("field", type_names=dpf.Field,
50 | document="3D vector Field to export (ie displacement Field)."),
51 | }
52 | spec.outputs = {
53 | 0: PinSpecification("path", type_names=str),
54 | }
55 | spec.properties = SpecificationProperties(user_name="GLTF export", category="serialization")
56 | return spec
57 |
58 | @property
59 | def name(self):
60 | return "gltf_export"
61 |
--------------------------------------------------------------------------------
/doc/source/examples/07-python-operators/plugins/gltf_plugin/operators_loader.py:
--------------------------------------------------------------------------------
1 | from gltf_plugin import operators
2 | from ansys.dpf.core.custom_operator import record_operator
3 |
4 |
5 | def load_operators(*args):
6 | record_operator(operators.WriteGLTF, *args)
7 |
--------------------------------------------------------------------------------
/doc/source/examples/07-python-operators/plugins/gltf_plugin/requirements.txt:
--------------------------------------------------------------------------------
1 | wheel
2 | pygltflib
3 |
--------------------------------------------------------------------------------
/doc/source/examples/07-python-operators/plugins/gltf_plugin/texture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/examples/07-python-operators/plugins/gltf_plugin/texture.png
--------------------------------------------------------------------------------
/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_001.png
--------------------------------------------------------------------------------
/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_002.png
--------------------------------------------------------------------------------
/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_003.png
--------------------------------------------------------------------------------
/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_004.png
--------------------------------------------------------------------------------
/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_005.png
--------------------------------------------------------------------------------
/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_006.png
--------------------------------------------------------------------------------
/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_007.png
--------------------------------------------------------------------------------
/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/examples/12-fluids/02-fluids_results/sphx_glr_02-fluids_results_thumb.png
--------------------------------------------------------------------------------
/doc/source/getting_started/contribute/tox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/getting_started/contribute/tox.png
--------------------------------------------------------------------------------
/doc/source/getting_started/contributing.rst:
--------------------------------------------------------------------------------
1 | .. _contributing:
2 |
3 | Contributing
4 | ############
5 |
6 | Overall guidance on contributing to a PyAnsys repository appears in
7 | `Contribute `_
8 | in the *PyAnsys Developer's Guide*. Ensure that you are thoroughly familiar
9 | with this guide before attempting to contribute to PyDPF-Core.
10 |
11 | .. important::
12 |
13 | This project adheres to the `Contributor Covenant Code of Conduct`_. By
14 | participating, you agree to uphold this code.
15 |
16 | The following contribution information is specific to PyDPF-Core. Start by selecting your role in the project:
17 |
18 | .. grid:: 1 2 3 3
19 | :padding: 2 2 2 2
20 |
21 | .. grid-item-card:: :fa:`user` User
22 | :link: contribute/user
23 | :link-type: doc
24 |
25 | Report bugs, suggesting features, and ask questions.
26 |
27 | .. grid-item-card:: :fa:`book` Documentarian
28 | :link: contribute/documentarian
29 | :link-type: doc
30 |
31 | Improve the documentation and write new guides.
32 |
33 | .. grid-item-card:: :fa:`laptop-code` Developer
34 | :link: contribute/developer
35 | :link-type: doc
36 |
37 | Fix bugs, add new features, and improve the codebase.
38 |
39 | .. toctree::
40 | :hidden:
41 | :maxdepth: 3
42 | :caption: Contribute
43 |
44 | User
45 | Documentarian
46 | Developer
47 |
--------------------------------------------------------------------------------
/doc/source/getting_started/dependencies.rst:
--------------------------------------------------------------------------------
1 | .. _ref_dependencies:
2 |
3 | ============
4 | Dependencies
5 | ============
6 |
7 | Package dependencies
8 | --------------------
9 |
10 | Dependencies for the ``ansys-dpf-core`` package are automatically checked when the
11 | package is installed. Package dependencies are:
12 |
13 | - `google-api-python-client `_
14 | - `grpcio `_
15 | - `importlib-metadata `_
16 | - `numpy `_
17 | - `packaging `_
18 | - `protobuf `_
19 | - `psutil `_
20 | - `setuptools `_
21 | - `tqdm `_
22 |
23 | For ``ansys-dpf-core<0.10.0``, the ``ansys.dpf.gate``, ``ansys.dpf.gatebin`` and ``ansys.grpc.dpf``
24 | modules are not included and are dependencies:
25 |
26 | - `ansys.dpf.gate `_, which is the gate
27 | to the DPF C API or Python gRPC API. The gate depends on the server configuration:
28 | - `ansys.grpc.dpf `_ is the gRPC code
29 | generated from protobuf files and is a dependency of ``ansys-dpf-gate``.
30 | - `ansys.dpf.gatebin `_ is the
31 | operating system-specific binaries with DPF C APIs and is a dependency of ``ansys-dpf-gate``.
32 |
33 |
34 | Optional dependencies
35 | ~~~~~~~~~~~~~~~~~~~~~
36 |
37 | For plotting, you can install these optional Python packages:
38 |
39 | - `matplotlib `_ package for chart plotting
40 | - `pyvista `_ package for 3D plotting
41 |
--------------------------------------------------------------------------------
/doc/source/images/drawings/OperatorPins.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/OperatorPins.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/Workflow1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/Workflow1.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/Workflow2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/Workflow2.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/apis_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/apis_2.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/book-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/book-logo.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/checklist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/checklist.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/circuit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/circuit.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/connect-operators.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/connect-operators.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/dpf-flow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/dpf-flow.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/dpf-mech.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/dpf-mech.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/dpf-reports.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/dpf-reports.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/dpf_server_client.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/dpf_server_client.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/entry_premium.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/entry_premium.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/field-breakdown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/field-breakdown.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/field-con-overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/field-con-overview.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/field-con.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/field-con.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/field.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/field.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/help-operators.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/help-operators.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/max_u_norm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/max_u_norm.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/model.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/operator-def.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/operator-def.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/plugin-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/plugin-logo.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/remote_machines.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/remote_machines.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/scoping-eg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/scoping-eg.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/using-dpf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/using-dpf.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/values-entities.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/values-entities.png
--------------------------------------------------------------------------------
/doc/source/images/drawings/xml.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/drawings/xml.png
--------------------------------------------------------------------------------
/doc/source/images/plotting/crankshaft_disp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/plotting/crankshaft_disp.png
--------------------------------------------------------------------------------
/doc/source/images/plotting/pontoon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/plotting/pontoon.png
--------------------------------------------------------------------------------
/doc/source/images/plotting/pontoon_strain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/plotting/pontoon_strain.png
--------------------------------------------------------------------------------
/doc/source/images/plotting/simple_example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/source/images/plotting/simple_example.png
--------------------------------------------------------------------------------
/doc/source/links.rst:
--------------------------------------------------------------------------------
1 | .. PyDPF-Core repository links
2 |
3 | .. _PyDPF-Core repository: https://github.com/ansys/pydpf-core
4 | .. _PyDPF-Core issues: https://github.com/ansys/pydpf-core/issues
5 | .. _PyDPF-Core discussions: https://github.com/ansys/pydpf-core/discussions
6 | .. _PyDPF-Core Documentation: https://dpf.docs.pyansys.com
7 |
8 | .. Python libraries
9 | .. _Tox: https://tox.wiki/en/stable/
10 | .. _reStructuredText: https://docutils.sourceforge.io/rst.html
11 | .. _Sphinx-Gallery: https://sphinx-gallery.github.io/stable/index.html
12 | .. _Sphinx: https://www.sphinx-doc.org/en/master/
13 |
14 | .. Other links
15 |
16 | .. _Contributor Covenant Code of Conduct: https://www.contributor-covenant.org/version/2/1/code_of_conduct/
--------------------------------------------------------------------------------
/doc/source/operator_reference.rst:
--------------------------------------------------------------------------------
1 | .. _ref_dpf_operators_reference:
2 |
3 | =========
4 | Operators
5 | =========
6 |
7 | DPF operators allow you to manipulate and transform simulation data.
8 |
9 | .. grid:: 1
10 |
11 | .. grid-item::
12 | .. card:: Operators
13 | :link-type: doc
14 | :link: operator_reference_load
15 |
16 | Click here to get started with operators available in DPF.
17 |
18 | +++
19 | .. button-link:: OPEN
20 | :color: primary
21 | :expand:
22 | :outline:
23 | :click-parent:
24 |
25 |
26 | For Ansys 2023 R2 and later, the DPF Server licensing logic for operators in DPF depends on the active
27 | `server context `_.
28 |
29 | The available contexts are **Premium** and **Entry**.
30 | Licensed operators are marked as such in the documentation using the ``license`` property.
31 | Operators with the ``license`` property set to **None** do not require a license checkout.
32 | For more information on using these two contexts, see :ref:`user_guide_server_context`.
33 |
34 | .. note::
35 |
36 | For Ansys 2023 R1 and earlier, the context is equivalent to **Premium**, with all operators loaded.
37 | For DPF Server 2023.2.pre0 specifically, the server context defines which operators are loaded and
38 | accessible. Use the `PyDPF-Core 0.7 operator documentation `_ to learn more.
39 | Some operators in the documentation might not be available for a particular server version.
40 |
--------------------------------------------------------------------------------
/doc/source/operator_reference_load.rst:
--------------------------------------------------------------------------------
1 | :orphan:
2 |
3 | =========
4 | Operators
5 | =========
6 |
7 | Loading operators.
8 |
9 | .. raw:: html
10 |
11 |
28 |
--------------------------------------------------------------------------------
/doc/source/operator_reference_load_apis.rst:
--------------------------------------------------------------------------------
1 | :orphan:
2 |
3 | =========
4 | Operators
5 | =========
6 |
7 | Loading operators.
8 |
9 | .. raw:: html
10 |
11 |
27 |
--------------------------------------------------------------------------------
/doc/source/pydpf-core_clone_install.rst:
--------------------------------------------------------------------------------
1 | .. code::
2 |
3 | git clone https://github.com/ansys/pydpf-core
4 | cd pydpf-core
5 | pip install -e .
--------------------------------------------------------------------------------
/doc/source/user_guide/concepts/index.rst:
--------------------------------------------------------------------------------
1 | .. _ref_concepts:
2 |
3 | Concepts
4 | --------
5 |
6 | This section provides in-depth descriptions and explanations of DPF concepts, including terminology.
7 |
8 | .. grid:: 1 1 3 3
9 | :gutter: 2
10 | :padding: 2
11 | :margin: 2
12 |
13 | .. grid-item-card:: Concepts and terminology
14 | :link: user_guide_concepts
15 | :link-type: ref
16 | :text-align: center
17 |
18 | .. image:: ../images/drawings/book-logo.png
19 |
20 | .. grid-item-card:: Ways of using DPF
21 | :link: user_guide_waysofusing
22 | :link-type: ref
23 | :text-align: center
24 |
25 | .. image:: ../images/drawings/using-dpf.png
26 |
27 | .. grid-item-card:: Using DPF: Step by step
28 | :link: user_guide_stepbystep
29 | :link-type: ref
30 | :text-align: center
31 |
32 | .. image:: ../images/drawings/checklist.png
33 |
--------------------------------------------------------------------------------
/doc/source/user_guide/create_sites_for_python_operators.ps1:
--------------------------------------------------------------------------------
1 | param ($pluginpath, $zippath, $pythonexe='python', $tempfolder=$env:TEMP)
2 | Write-Host "Running script with args: "
3 | Write-Host "-pluginpath" $pluginpath
4 | Write-Host "-zippath" $zippath
5 | Write-Host "-pythonexe" $pythonexe
6 | Write-Host "-tempfolder" $tempfolder
7 |
8 | # Expand shortcut in path
9 | $tempfolder = (Get-Item -LiteralPath $tempfolder).FullName
10 |
11 | Write-Host "make venv"
12 | Start-Process $pythonexe -ArgumentList ("-m venv "+ $tempfolder+"\venv") -NoNewWindow -Wait
13 |
14 |
15 | Write-Host "activate venv"
16 | & ($tempfolder+"\venv\Scripts\Activate.ps1")
17 |
18 |
19 | Write-Host "install deps"
20 | Start-Process "python" -ArgumentList ("-m pip install -r "+$pluginpath+"\requirements.txt --disable-pip-version-check --use-pep517") -NoNewWindow -Wait
21 | if (Test-Path ($tempfolder + "/venv/Lib/site-packages/__pycache__")){
22 | Write-Host "remove __pycache__"
23 | Remove-Item -Recurse -Force ($tempfolder + "/venv/Lib/site-packages/__pycache__")
24 | }
25 | $dirName=[System.IO.Path]::GetDirectoryName($zippath)
26 | Write-Host "Create directory"
27 | echo $dirName
28 | if (-Not (Test-Path $dirName)){
29 | New-Item $dirName -Type directory
30 | }
31 | Write-Host "Compress archive"
32 | Compress-Archive ($tempfolder+"/venv/Lib/site-packages/*") -DestinationPath $zippath -Force
33 |
34 | Write-Host "Deactivate venv"
35 | deactivate
36 | Write-Host "Remove venv"
37 | Remove-Item -Recurse -Force ($tempfolder + "/venv")
38 | Write-Host "Done creating site-packages for gltf plugin"
--------------------------------------------------------------------------------
/doc/source/user_guide/create_sites_for_python_operators.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 |
4 | pluginpath=${pluginpath:- }
5 | zippath=${zippath:- }
6 | pythonexe=${pythonexe:-python}
7 | tempfolder=${tempfolder:-/tmp}
8 |
9 |
10 | while [ $# -gt 0 ]; do
11 |
12 | if [[ $1 == *"-"* ]]; then
13 | param="${1/-/}"
14 | declare $param="$2"
15 | # echo $1 $2 // Optional to see the parameter:value result
16 | fi
17 |
18 | shift
19 | done
20 |
21 |
22 | echo "Running script with args:"
23 | echo "-pluginpath" ${pluginpath}
24 | echo "-zippath" ${zippath}
25 | echo "-pythonexe" ${pythonexe}
26 | echo "-tempfolder" ${tempfolder}
27 |
28 |
29 | echo "make venv"
30 | if [ -d "${tempfolder}/venv" ]; then rm -Rf ${tempfolder}/venv; fi
31 |
32 | export PYTHONLIBPATH="$(dirname "${pythonexe}")"
33 | echo "adding python so to LD_LIBRARY_PATH"
34 | export LD_LIBRARY_PATH=${PYTHONLIBPATH}/../lib:{LD_LIBRARY_PATH}
35 |
36 | ${pythonexe} -m venv ${tempfolder}/venv
37 |
38 | echo "activate venv"
39 | source ${tempfolder}/venv/bin/activate
40 |
41 | echo "install deps"
42 | python -m pip install -r ${pluginpath}/requirements.txt --disable-pip-version-check --use-pep517
43 |
44 | SITES=$(find ${tempfolder}/venv/ -type d -name "site-packages")
45 | echo "SITES"
46 | echo ${SITES}
47 |
48 | if [ -d "${SITES}/__pycache__" ]; then rm -Rf ${SITES}/__pycache__; fi
49 | DIR="$(dirname "${zippath}")"
50 | if [ ! -d "${DIR}" ]; then mkdir ${DIR}; fi
51 | cd ${SITES}
52 | ls .
53 | python -m zipfile -c ${zippath} *
54 |
55 | rm -r ${tempfolder}/venv
--------------------------------------------------------------------------------
/doc/source/user_guide/custom_operator_example.py:
--------------------------------------------------------------------------------
1 | from ansys.dpf import core as dpf
2 | from ansys.dpf.core.custom_operator import CustomOperatorBase, record_operator # noqa: F401
3 | from ansys.dpf.core.operator_specification import CustomSpecification, SpecificationProperties, \
4 | PinSpecification
5 |
6 |
7 | class CustomOperator(CustomOperatorBase):
8 | @property
9 | def name(self):
10 | return "name_of_my_custom_operator"
11 |
12 | @property
13 | def specification(self) -> CustomSpecification:
14 | spec = CustomSpecification()
15 | spec.description = "What the Operator does."
16 | spec.inputs = {
17 | 0: PinSpecification("name_of_pin_0", [dpf.Field, dpf.FieldsContainer],
18 | "Describe pin 0."),
19 | }
20 | spec.outputs = {
21 | 0: PinSpecification("name_of_pin_0", [dpf.Field], "Describe pin 0."),
22 | }
23 | spec.properties = SpecificationProperties(
24 | user_name="user name",
25 | category="category",
26 | license="license",
27 | )
28 | return spec
29 |
30 | def run(self):
31 | field = self.get_input(0, dpf.Field)
32 | if field is None:
33 | field = self.get_input(0, dpf.FieldsContainer)[0]
34 | # compute data
35 | self.set_output(0, dpf.Field())
36 | self.set_succeeded()
37 |
--------------------------------------------------------------------------------
/doc/source/user_guide/custom_operators_deps.rst:
--------------------------------------------------------------------------------
1 | To add third-party modules as dependencies to a plugin package, create
2 | and reference a folder or ZIP file with the sites of the dependencies in an XML file
3 | located next to the folder for the plugin package. The XML file must have the same
4 | name as the plugin package plus an ``.xml`` extension.
5 |
6 | When the :py:func:`ansys.dpf.core.core.load_library` method is called, PyDPF-Core uses the
7 | ``site`` Python module to add custom sites to the path for the Python interpreter.
8 |
9 |
10 | To create these custom sites:
11 |
12 | #. Install the requirements of the plugin package in a Python virtual environment.
13 | #. Remove unnecessary folders from the site packages and compress them into a ZIP file.
14 | #. Place the ZIP file in the plugin package.
15 | #. Reference the path to the ZIP file in the XML file as indicated above.
16 |
17 | To simplify this step, you can add a requirements file in the plugin package:
18 |
19 | .. literalinclude:: /examples/07-python-operators/plugins/gltf_plugin/requirements.txt
20 |
21 |
22 | For this approach, do the following:
23 |
24 | #. Download the script for your operating system:
25 |
26 | - For Windows, download this :download:`PowerShell script `.
27 | - For Linux, download this :download:`Shell script `.
28 |
29 | 3. Run the downloaded script with the mandatory arguments:
30 |
31 | - ``-pluginpath``: Path to the folder with the plugin package.
32 | - ``-zippath``: Path and name for the ZIP file.
33 |
34 | Optional arguments are:
35 |
36 | - ``-pythonexe``: Path to a Python executable of your choice.
37 | - ``-tempfolder``: Path to a temporary folder to work in. The default is the environment variable
38 | ``TEMP`` on Windows and ``/tmp/`` on Linux.
39 |
40 | #. Run the command for your operating system.
41 |
42 | - From Windows PowerShell, run:
43 |
44 | .. code-block::
45 |
46 | create_sites_for_python_operators.ps1 -pluginpath /path/to/plugin -zippath /path/to/plugin/assets/winx64.zip
47 |
48 | - From Linux Shell, run:
49 |
50 | .. code-block::
51 |
52 | create_sites_for_python_operators.sh -pluginpath /path/to/plugin -zippath /path/to/plugin/assets/linx64.zip
53 |
54 |
--------------------------------------------------------------------------------
/doc/source/user_guide/custom_plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(THIS_XML_FOLDER)/custom_plugin/assets/winx64.zip;$(CUSTOM_SITE)
5 | true
6 |
7 |
8 | $(THIS_XML_FOLDER)/custom_plugin/assets/linx64.zip:$(CUSTOM_SITE)
9 | true
10 |
11 |
--------------------------------------------------------------------------------
/doc/source/user_guide/how_to.rst:
--------------------------------------------------------------------------------
1 | .. _ref_how_to:
2 |
3 | How-tos
4 | -------
5 |
6 | .. grid:: 1 1 3 3
7 | :gutter: 2
8 | :padding: 2
9 | :margin: 2
10 |
11 | .. grid-item-card:: Plot
12 | :link: user_guide_plotting
13 | :link-type: ref
14 | :text-align: center
15 |
16 | .. image:: ../images/plotting/pontoon.png
17 | .. image:: ../images/plotting/pontoon_strain.png
18 |
19 |
20 | .. grid-item-card:: Create custom operators
21 | :link: user_guide_custom_operators
22 | :link-type: ref
23 | :text-align: center
24 |
25 | .. image:: ../images/drawings/plugin-logo.png
26 | :width: 50%
27 |
28 |
29 | .. grid-item-card:: Use DPF Server package
30 | :link: ref_dpf_server
31 | :link-type: ref
32 | :text-align: center
33 |
34 | .. image:: ../images/drawings/dpf_server_client.png
35 |
36 |
37 | .. grid-item-card:: Switch between local and remote server
38 | :link: user_guide_server_types
39 | :link-type: ref
40 | :text-align: center
41 |
42 | .. image:: ../images/drawings/remote_machines.png
43 |
44 | .. grid-item-card:: Access Entry and Premium capabilities
45 | :link: user_guide_server_context
46 | :link-type: ref
47 | :text-align: center
48 |
49 | .. image:: ../images/drawings/entry_premium.png
50 |
51 |
52 | .. grid-item-card:: Use DPF XML Files
53 | :link: user_guide_xmlfiles
54 | :link-type: ref
55 | :text-align: center
56 |
57 | .. image:: ../images/drawings/xml.png
--------------------------------------------------------------------------------
/doc/source/user_guide/index.rst:
--------------------------------------------------------------------------------
1 | .. _ref_user_guide:
2 |
3 | ==========
4 | User guide
5 | ==========
6 |
7 | PyDPF-Core is a Python client API for accessing DPF postprocessing
8 | capabilities. The ``ansys.dpf.core`` package makes highly efficient
9 | computation, customization, and remote postprocessing accessible in Python.
10 |
11 | The goals of this section are to:
12 |
13 | - Describe the most-used DPF entities and how they can help you to access and modify solver data.
14 | - Provide simple how-tos for tackling the most common use cases.
15 |
16 | .. include::
17 | concepts/index.rst
18 |
19 | .. include::
20 | main_entities.rst
21 |
22 | .. include::
23 | how_to.rst
24 |
25 |
26 | Troubleshooting
27 | ---------------
28 |
29 | .. grid:: 1 1 2 2
30 | :gutter: 2
31 | :padding: 2
32 | :margin: 2
33 |
34 | .. grid-item-card:: Server issues
35 | :link: user_guide_troubleshooting_server_issues
36 | :link-type: ref
37 | :text-align: center
38 |
39 | .. grid-item-card:: Model issues
40 | :link: user_guide_troubleshooting_model_issues
41 | :link-type: ref
42 | :text-align: center
43 |
44 | .. grid-item-card:: Plotting issues
45 | :link: user_guide_troubleshooting_plotting_issues
46 | :link-type: ref
47 | :text-align: center
48 |
49 | .. grid-item-card:: Performance issues
50 | :link: user_guide_troubleshooting_performance_issues
51 | :link-type: ref
52 | :text-align: center
53 |
54 |
55 | .. toctree::
56 | :maxdepth: 2
57 | :hidden:
58 | :caption: Concepts
59 |
60 | concepts/concepts.rst
61 | concepts/waysofusing.rst
62 | concepts/stepbystep.rst
63 |
64 |
65 | .. toctree::
66 | :maxdepth: 2
67 | :hidden:
68 | :caption: DPF most-used entities
69 |
70 | model
71 | operators
72 | fields_container
73 |
74 |
75 | .. toctree::
76 | :maxdepth: 2
77 | :hidden:
78 | :caption: How-tos
79 |
80 | plotting.rst
81 | custom_operators.rst
82 | dpf_server.rst
83 | server_types.rst
84 | server_context.rst
85 | xmlfiles.rst
86 |
87 |
88 | .. toctree::
89 | :maxdepth: 3
90 | :hidden:
91 | :caption: Troubleshooting
92 |
93 | troubleshooting
94 |
--------------------------------------------------------------------------------
/doc/source/user_guide/install_ansys_dpf_core_in_ansys.ps1:
--------------------------------------------------------------------------------
1 | param ($awp_root=$env:AWP_ROOT222, $pip_args)
2 | Write-Host "Running script with args: "
3 | Write-Host "-awp_root" $awp_root
4 | Write-Host "-pip_args" $pip_args
5 | $python=($awp_root + "\commonfiles\CPython\3_7\winx64\Release\python\python.exe")
6 |
7 | if ($pip_args -eq $null){
8 | Start-Process $python -ArgumentList ("-m pip install ansys-dpf-core")
9 | }
10 | else {
11 | Start-Process $python -ArgumentList ("-m pip install ansys-dpf-core " + $pip_args)
12 | }
--------------------------------------------------------------------------------
/doc/source/user_guide/install_ansys_dpf_core_in_ansys.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [ -z "$AWP_ROOT222" ]
4 | then
5 | awp_root=${awp_root:-}
6 | else
7 | awp_root=${awp_root:-${AWP_ROOT222}}
8 | fi
9 |
10 | pip_args=${pip_args:- }
11 |
12 | while [ $# -gt 0 ]; do
13 |
14 | if [[ $1 == *"-"* ]]; then
15 | param="${1/-/}"
16 | declare $param="$2"
17 | # echo $1 $2 // Optional to see the parameter:value result
18 | fi
19 |
20 | shift
21 | done
22 |
23 | PYTHON=${awp_root}/commonfiles/CPython/3_7/linx64/Release/python/runpython
24 |
25 | export LD_LIBRARY_PATH=${awp_root}/commonfiles/CPython/3_7/linx64/Release/python/lib:{LD_LIBRARY_PATH}
26 |
27 | if [ -z "$pip_args" ]
28 | then
29 | /bin/bash: :wq: command not found
30 | else
31 | ${PYTHON} -m pip install ansys-dpf-core $pip_args
32 | fi
33 |
--------------------------------------------------------------------------------
/doc/source/user_guide/main_entities.rst:
--------------------------------------------------------------------------------
1 | .. _ref_main_entities:
2 |
3 | DPF most-used entities
4 | ----------------------
5 |
6 | .. grid:: 1 1 3 3
7 | :gutter: 2
8 | :padding: 2
9 | :margin: 2
10 |
11 | .. grid-item-card:: DPF model
12 | :link: user_guide_model
13 | :link-type: ref
14 | :text-align: center
15 |
16 | .. image:: ../images/drawings/model.png
17 |
18 | .. grid-item-card:: Fields container and fields
19 | :link: ref_user_guide_fields_container
20 | :link-type: ref
21 | :text-align: center
22 |
23 | .. image:: ../images/drawings/field.png
24 |
25 | .. grid-item-card:: Operators
26 | :link: ref_user_guide_operators
27 | :link-type: ref
28 | :text-align: center
29 |
30 | .. image:: ../images/drawings/small_operator.svg
--------------------------------------------------------------------------------
/doc/source/user_guide/uninstall_ansys_dpf_core_in_ansys.ps1:
--------------------------------------------------------------------------------
1 | param ($awp_root=$env:AWP_ROOT222)
2 | Write-Host "Running script with args: "
3 | Write-Host "-awp_root" $awp_root
4 | $python=($awp_root + "\commonfiles\CPython\3_7\winx64\Release\python\python.exe")
5 |
6 | if ($pip_args -eq $null){
7 | Start-Process $python -ArgumentList ("-m pip uninstall -y ansys-dpf-core")
8 | }
9 | else {
10 | Start-Process $python -ArgumentList ("-m pip uninstall -y ansys-dpf-core " + $pip_args)
11 | }
--------------------------------------------------------------------------------
/doc/source/user_guide/uninstall_ansys_dpf_core_in_ansys.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [ -z "$AWP_ROOT222" ]
4 | then
5 | awp_root=${awp_root:-}
6 | else
7 | awp_root=${awp_root:-${AWP_ROOT222}}
8 | fi
9 |
10 | pip_args=${pip_args:- }
11 |
12 | while [ $# -gt 0 ]; do
13 |
14 | if [[ $1 == *"-"* ]]; then
15 | param="${1/-/}"
16 | declare $param="$2"
17 | # echo $1 $2 // Optional to see the parameter:value result
18 | fi
19 |
20 | shift
21 | done
22 |
23 | PYTHON=${awp_root}/commonfiles/CPython/3_7/linx64/Release/python/runpython
24 |
25 | export LD_LIBRARY_PATH=${awp_root}/commonfiles/CPython/3_7/linx64/Release/python/lib:{LD_LIBRARY_PATH}
26 |
27 | if [ -z "$pip_args" ]
28 | then
29 | ${PYTHON} -m pip uninstall -y ansys-dpf-core
30 | else
31 | ${PYTHON} -m pip uninstall -y ansys-dpf-core $pip_args
32 | fi
33 |
--------------------------------------------------------------------------------
/doc/styles/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !Vocab
3 | !Vocab/**
4 | !.gitignore
--------------------------------------------------------------------------------
/doc/styles/config/vocabularies/ANSYS/accept.txt:
--------------------------------------------------------------------------------
1 | (?i)ansys
2 | APIs
3 | Abaqus
4 | CPython
5 | DPF [Ss]erver
6 | DPFArray
7 | Entry
8 | GLTF
9 | Gaussian
10 | IronPython
11 | MSUP
12 | Mises
13 | Premium
14 | Preview License Agreement
15 | PyDPF
16 | Pythonic
17 | Remotable
18 | Reusability
19 | Rz
20 | [Aa]nsys
21 | [Cc]omponentization
22 | [Cc]ore
23 | [Pp]ostprocessing
24 | [Pp]ython
25 | [Pp]yvista
26 | ans
27 | containter
28 | getters
29 | gltf
30 | grpcio
31 | hexa
32 | inpt
33 | mane
34 | matplotlib
35 | mecanic
36 | numpy
37 | parm
38 | postprocess
39 | pres
40 | protobuf
41 | psutil
42 | recursivity
43 | scopings
44 | serializer
45 | setuptools
46 | socio-economic
47 | substep
48 | systyem
49 | tqdm
50 | von
51 |
--------------------------------------------------------------------------------
/doc/styles/config/vocabularies/ANSYS/reject.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/doc/styles/config/vocabularies/ANSYS/reject.txt
--------------------------------------------------------------------------------
/examples/00-basic/README.txt:
--------------------------------------------------------------------------------
1 | .. _basic-gallery:
2 |
3 | Basic DPF examples
4 | ==================
5 | These examples explain the basic concepts of DPF.
6 |
--------------------------------------------------------------------------------
/examples/01-transient_analyses/README.txt:
--------------------------------------------------------------------------------
1 | .. _static_transient_examples:
2 |
3 | Transient analysis examples
4 | ===========================
5 | These examples show how to use DPF to extract and plot displacements,
6 | stresses, and strains for a transient result.
7 |
--------------------------------------------------------------------------------
/examples/02-modal_analyses/README.txt:
--------------------------------------------------------------------------------
1 | .. _modal_examples:
2 |
3 | Modal analysis examples
4 | =======================
5 | These examples show how to use DPF to extract and manipulate
6 | results from modal analyses.
7 |
--------------------------------------------------------------------------------
/examples/03-harmonic_analyses/README.txt:
--------------------------------------------------------------------------------
1 | .. _harmonic_examples:
2 |
3 | Harmonic analysis examples
4 | ===========================
5 | These examples show how to use DPF to extract and manipulate
6 | results from harmonic analyses.
7 |
--------------------------------------------------------------------------------
/examples/04-advanced/07-load_plugin.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | """
24 | .. _ref_load_plugin:
25 |
26 | Load plugin
27 | ~~~~~~~~~~~
28 |
29 | This example shows how to load a plugin that is not loaded automatically.
30 |
31 | """
32 |
33 | ###############################################################################
34 | # Import DPF-Core:
35 | from ansys.dpf import core as dpf
36 |
37 | server = dpf.global_server()
38 |
39 | ###############################################################################
40 | # Create a base service for loading a plugin:
41 | if server.os == "posix":
42 | dpf.core.load_library("libAns.Dpf.Math.so", "math_operators")
43 | else:
44 | dpf.core.load_library("Ans.Dpf.Math.dll", "math_operators")
45 |
46 | ###############################################################################
47 | # Math operators are now loaded and accessible in ``ansys.dpf.core.operators``:
48 |
49 | from ansys.dpf.core import operators as ops
50 |
51 | math_op = ops.math.fft_eval()
52 |
--------------------------------------------------------------------------------
/examples/04-advanced/README.txt:
--------------------------------------------------------------------------------
1 | .. _advanced_examples:
2 |
3 | Advanced and miscellaneous examples
4 | ===================================
5 | These examples show advanced use cases to demonstrate the high level of workflow customization.
6 |
--------------------------------------------------------------------------------
/examples/05-file-IO/README.txt:
--------------------------------------------------------------------------------
1 | .. _file_IO:
2 |
3 | File manipulation and input-output examples
4 | ===========================================
5 | These examples show how to manipulate files,
6 | as well as importing or exporting from or to specific formats.
7 |
--------------------------------------------------------------------------------
/examples/06-plotting/README.txt:
--------------------------------------------------------------------------------
1 | .. _plotting_examples:
2 |
3 | Plotting examples
4 | =================
5 | These examples show how to use the :class:`ansys.dpf.core.plotter.DpfPlotter` class.
--------------------------------------------------------------------------------
/examples/07-distributed-post/README.txt:
--------------------------------------------------------------------------------
1 | .. _distributed_post:
2 |
3 | Examples for postprocessing on distributed processes
4 | ====================================================
5 | These examples show how to create workflows on different processes (possibly on
6 | different machines) and connect them.
7 |
--------------------------------------------------------------------------------
/examples/08-python-operators/README.txt:
--------------------------------------------------------------------------------
1 | .. _python_operators:
2 |
3 | Examples of creating custom operator plugins
4 | ============================================
5 | These examples show how to create a basic operator plugin or plug-in
6 | packages with multiple operators. Plugins wrap your custom operators
7 | so that you can use them like native DPF operators.
8 |
--------------------------------------------------------------------------------
/examples/09-averaging/README.txt:
--------------------------------------------------------------------------------
1 | .. _averaging_examples:
2 |
3 | Averaging examples
4 | ==================
5 | These examples show how to use some of DPF's averaging operators.
--------------------------------------------------------------------------------
/examples/10-mesh_operations/README.txt:
--------------------------------------------------------------------------------
1 | .. _mesh_operations:
2 |
3 | Mesh operations examples
4 | ===========================================
5 | These examples show how to manipulate meshes.
6 |
--------------------------------------------------------------------------------
/examples/11-cyclic-symmetry/README.txt:
--------------------------------------------------------------------------------
1 | .. _cyclic_symmetry_examples:
2 |
3 | Cyclic symmetry examples
4 | ========================
5 | These examples show how to post-process cyclic symmetry models.
6 |
--------------------------------------------------------------------------------
/examples/12-fluids/README.txt:
--------------------------------------------------------------------------------
1 | .. _fluids_examples:
2 |
3 | Fluids examples
4 | ========================
5 | These examples show how to post-process Fluid models.
6 |
--------------------------------------------------------------------------------
/examples/13-streamlines/README.txt:
--------------------------------------------------------------------------------
1 | .. _examples_streamlines:
2 |
3 | Streamlines examples
4 | ====================
5 | These examples show how to compute and plot streamlines.
6 |
7 |
--------------------------------------------------------------------------------
/examples/14-lsdyna/README.txt:
--------------------------------------------------------------------------------
1 | .. _examples_lsdyna:
2 |
3 | LS-Dyna examples
4 | ================
5 | These examples show how to post-process LS-Dyna models.
6 |
7 |
--------------------------------------------------------------------------------
/examples/15-cfx/README.txt:
--------------------------------------------------------------------------------
1 | .. _examples_cfx:
2 |
3 | CFX examples
4 | ============
5 | These examples show how to post-process CFX result files.
6 |
7 |
--------------------------------------------------------------------------------
/examples/16-maths-ops/README.text:
--------------------------------------------------------------------------------
1 | .. _mathematical_operations_examples:
2 |
3 | Mathematical examples
4 | =====================
5 |
6 | These examples show how to do mathematical operations with PyDPF-Core structures.
7 |
--------------------------------------------------------------------------------
/examples/README.txt:
--------------------------------------------------------------------------------
1 | .. _gallery:
2 |
3 | ========
4 | Examples
5 | ========
6 | These examples demonstrate the behavior and usage of DPF-Core.
7 |
--------------------------------------------------------------------------------
/examples_notebooks/tuto_load_plugin.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# The goal of this tutorial is to load a given plugin"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "To use it, add PYTHONPATH to the generated python code from Protocols/packages and ANSYS_PATH to your ansys install path\n",
15 | "\n",
16 | "1st step : load the necessary module of dpf for grpc and launch the server"
17 | ]
18 | },
19 | {
20 | "cell_type": "code",
21 | "execution_count": 35,
22 | "metadata": {},
23 | "outputs": [],
24 | "source": [
25 | "from ansys import dpf\n",
26 | "from ansys.dpf.server import start_local_server"
27 | ]
28 | },
29 | {
30 | "cell_type": "code",
31 | "execution_count": 37,
32 | "metadata": {},
33 | "outputs": [
34 | {
35 | "name": "stdout",
36 | "output_type": "stream",
37 | "text": [
38 | "server started at --address 10.110.2.47 --port 50052\n"
39 | ]
40 | }
41 | ],
42 | "source": [
43 | "start_local_server(port=50052)"
44 | ]
45 | },
46 | {
47 | "cell_type": "markdown",
48 | "metadata": {},
49 | "source": [
50 | "2nd step : load a plugin"
51 | ]
52 | },
53 | {
54 | "cell_type": "code",
55 | "execution_count": 39,
56 | "metadata": {},
57 | "outputs": [],
58 | "source": [
59 | "base = dpf.BaseService(ip=dpf._global_ip(), port = dpf._global_port())\n",
60 | "base.load_library(\"Ans.Dpf.Fluent.dll\",\"fluent\")"
61 | ]
62 | },
63 | {
64 | "cell_type": "code",
65 | "execution_count": null,
66 | "metadata": {},
67 | "outputs": [],
68 | "source": []
69 | }
70 | ],
71 | "metadata": {
72 | "kernelspec": {
73 | "display_name": "Python 3",
74 | "language": "python",
75 | "name": "python3"
76 | },
77 | "language_info": {
78 | "codemirror_mode": {
79 | "name": "ipython",
80 | "version": 3
81 | },
82 | "file_extension": ".py",
83 | "mimetype": "text/x-python",
84 | "name": "python",
85 | "nbconvert_exporter": "python",
86 | "pygments_lexer": "ipython3",
87 | "version": "3.7.9"
88 | },
89 | "widgets": {
90 | "application/vnd.jupyter.widget-state+json": {
91 | "state": {},
92 | "version_major": 2,
93 | "version_minor": 0
94 | }
95 | }
96 | },
97 | "nbformat": 4,
98 | "nbformat_minor": 4
99 | }
100 |
--------------------------------------------------------------------------------
/pytest.ini:
--------------------------------------------------------------------------------
1 | [pytest]
2 | filterwarnings =
3 | ignore::FutureWarning
4 | ignore::PendingDeprecationWarning
5 | ignore::DeprecationWarning
6 | norecursedirs = *
7 | doctest_optionflags = NORMALIZE_WHITESPACE ELLIPSIS
--------------------------------------------------------------------------------
/requirements/requirements_build.txt:
--------------------------------------------------------------------------------
1 | black==25.1.0
2 | build==1.2.2.post1
3 | chevron==0.14.0
4 | pypandoc_binary==1.15
5 | wheel==0.46.1
6 |
--------------------------------------------------------------------------------
/requirements/requirements_dev.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/requirements/requirements_dev.txt
--------------------------------------------------------------------------------
/requirements/requirements_docs.txt:
--------------------------------------------------------------------------------
1 | ansys-sphinx-theme[autoapi]==1.4.4
2 | enum-tools[sphinx]==0.13.0
3 | graphviz==0.20.1
4 | imageio==2.37.0
5 | imageio-ffmpeg==0.6.0
6 | pypandoc==1.15
7 | pytest-sphinx==0.6.3
8 | pyvista==0.45.2
9 | sphinx==8.2.3
10 | sphinx-copybutton==0.5.2
11 | sphinx-gallery==0.19.0
12 | sphinx-jinja==2.0.2
13 | sphinx-notfound-page==1.1.0
14 | sphinx-reredirects==0.1.6
15 | sphinx_design==0.6.1
16 | sphinxcontrib-napoleon==0.7
17 | vtk==9.4.2
18 |
--------------------------------------------------------------------------------
/requirements/requirements_install.txt:
--------------------------------------------------------------------------------
1 | importlib-metadata==8.7.0
2 | numpy==2.2.4
3 | packaging==25.0
4 | psutil==7.0.0
5 | tqdm==4.67.1
6 |
--------------------------------------------------------------------------------
/requirements/requirements_test.txt:
--------------------------------------------------------------------------------
1 | ansys-platform-instancemanagement==1.1.2
2 | coverage==7.8.2
3 | graphviz==0.20.1
4 | imageio==2.37.0
5 | imageio-ffmpeg==0.6.0
6 | pypandoc_binary==1.15
7 | pytest==8.3.5
8 | pytest-cov==6.1.1
9 | pytest-order==1.3.0
10 | pytest-rerunfailures==15.0
11 | pyvista==0.45.2
12 | vtk==9.4.2
13 |
--------------------------------------------------------------------------------
/run_client.bat:
--------------------------------------------------------------------------------
1 |
2 | @echo on
3 |
4 | rem set ANSYS_PATH=C:\Program Files\ANSYS Inc\v211\
5 | rem set DPF_CONFIGURATION=release
6 | rem set DPF_PATH=C:\Program Files\ANSYS Inc\v211\aisol\bin\winx64\Ans.Dpf.Grpc.exe
7 | rem set ANS_PROTOCOL_ROOT=D:\AnsysDev\Protocols
8 | rem set DPF_CORE_PATH=D:\AnsysDev\DPF-Core
9 |
10 | rem set PYTHONPATH=%ANS_PROTOCOL_ROOT%\packages\python\dpf;%DPF_CORE_PATH%
11 |
12 | rem Assume DPF server is already running
13 | rem set DPF_START_SERVER=False
14 | rem set DPF_IP=10.<...>
15 |
16 | rem set DPF_PORT=50054
17 |
18 | set root=C:\ProgramData\Anaconda3
19 | call %root%\Scripts\activate.bat %root%
20 |
21 | call jupyter lab
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | """Installation file for python dpf module."""
2 |
3 | # To keep according to https://setuptools.pypa.io/en/stable/userguide/pyproject_config.html
4 | # to allow -e with pip<21.1
5 | from setuptools import setup
6 |
7 | setup()
8 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/_version.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | """Version for ansys-dpf-core."""
24 |
25 | from packaging.version import parse as parse_version
26 |
27 | # Minimal DPF server version supported
28 | min_server_version = "4.0"
29 |
30 |
31 | class ServerToAnsysVersion:
32 | def __getitem__(self, item):
33 | version = parse_version(item)
34 | # The current DPF versioning scheme is MAJOR.MINOR.PATCH
35 | # Compute release version equivalent (YEAR+'R'+REVISION)
36 | # The revision is 'R1' for any odd major DPF version, 'R2' for even major versions.
37 | ansys_revision = 2 - version.major % 2
38 | # The year is 2021 for DPF 1.0, and bumped every two releases.
39 | ansys_year = 2020 + version.major // 2 + version.major % 2
40 | # Return the corresponding Ansys release
41 | return f"{ansys_year}R{ansys_revision}"
42 |
43 |
44 | server_to_ansys_version = ServerToAnsysVersion()
45 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/custom_container_base.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | """
24 | CustomContainerBase.
25 |
26 | This module contains the `CustomContainerBase` class, which serves as a base
27 | for creating wrappers around `GenericDataContainer` objects.
28 |
29 | These wrappers provide an interface for accessing and managing data in
30 | generic containers, enabling more intuitive usage and the addition of custom
31 | behaviors tailored to specific use cases.
32 | """
33 |
34 | from ansys.dpf.core.generic_data_container import GenericDataContainer
35 |
36 |
37 | class CustomContainerBase:
38 | """
39 | Base class for custom container wrappers.
40 |
41 | This class provides a common interface for managing an underlying
42 | `GenericDataContainer` object.
43 | """
44 |
45 | def __init__(self, container: GenericDataContainer) -> None:
46 | """
47 | Initialize the base container with a `GenericDataContainer`.
48 |
49 | Parameters
50 | ----------
51 | container : GenericDataContainer
52 | The underlying data container to be wrapped by this class.
53 | """
54 | self._container = container
55 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/dpf_array.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | """DPFArray."""
24 |
25 | from ansys.dpf.gate.dpf_array import DPFArray # noqa: F401
26 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/helpers/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 | """Provide helpers relating to streamline computation, argument filtering, and text indenting."""
23 |
24 | from .streamlines import *
25 | from .utils import *
26 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/ipconfig.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 | """Provides for retrieving local ip address."""
23 |
24 | import socket
25 |
26 |
27 | def get_local_ip():
28 | """Retrieve the local IP address to connect to the gRPC service.
29 |
30 | Returns
31 | -------
32 | str
33 | Local IP address to connect with the gRPC service.
34 | """
35 | with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s:
36 | try:
37 | # doesn't even have to be reachable
38 | s.connect(("10.255.255.255", 1))
39 | except socket.error:
40 | return "127.0.0.1"
41 |
42 | return s.getsockname()[0]
43 |
44 |
45 | ip = get_local_ip()
46 | port = 50052
47 | environment = "windows"
48 | configuration = "release"
49 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/log.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 | """Provides for setting up logging."""
23 |
24 | import logging
25 |
26 |
27 | def setup_logger(loglevel="INFO"):
28 | """Set up the logger.
29 |
30 | Parameters
31 | ----------
32 | loglevel : str, optional
33 | The level of the logger to set up. The default is ``"INFO"``.
34 | """
35 | # return existing log if this function has already been called
36 | if hasattr(setup_logger, "log"):
37 | setup_logger.log.setLevel(loglevel)
38 | ch = setup_logger.log.handlers[0]
39 | ch.setLevel(loglevel)
40 | return setup_logger.log
41 |
42 | # create logger
43 | log = logging.getLogger(__name__)
44 | log.setLevel(loglevel)
45 |
46 | # create console handler and set level to debug
47 | ch = logging.StreamHandler()
48 | ch.setLevel(loglevel)
49 |
50 | # create formatter
51 | formatstr = "%(asctime)s [%(levelname)s] %(name)s: %(message)s"
52 | formatter = logging.Formatter(formatstr)
53 |
54 | # add formatter to ch
55 | ch.setFormatter(formatter)
56 |
57 | # add ch to logger
58 | log.addHandler(ch)
59 |
60 | # make persistent
61 | setup_logger.log = log
62 |
63 | return log
64 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/__init__.py:
--------------------------------------------------------------------------------
1 | from . import averaging
2 | from . import compression
3 | from . import filter
4 | from . import geo
5 | from . import invariant
6 | from . import logic
7 | from . import mapping
8 | from . import math
9 | from . import mesh
10 | from . import metadata
11 | from . import min_max
12 | from . import result
13 | from . import scoping
14 | from . import serialization
15 | from . import server
16 | from . import utility
17 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/averaging/__init__.py:
--------------------------------------------------------------------------------
1 | from .elemental_difference import elemental_difference
2 | from .elemental_difference_fc import elemental_difference_fc
3 | from .elemental_fraction_fc import elemental_fraction_fc
4 | from .elemental_mean import elemental_mean
5 | from .elemental_mean_fc import elemental_mean_fc
6 | from .elemental_nodal_to_nodal import elemental_nodal_to_nodal
7 | from .elemental_nodal_to_nodal_elemental import elemental_nodal_to_nodal_elemental
8 | from .elemental_nodal_to_nodal_elemental_fc import elemental_nodal_to_nodal_elemental_fc
9 | from .elemental_nodal_to_nodal_fc import elemental_nodal_to_nodal_fc
10 | from .elemental_to_elemental_nodal import elemental_to_elemental_nodal
11 | from .elemental_to_elemental_nodal_fc import elemental_to_elemental_nodal_fc
12 | from .elemental_to_nodal import elemental_to_nodal
13 | from .elemental_to_nodal_fc import elemental_to_nodal_fc
14 | from .extend_to_mid_nodes import extend_to_mid_nodes
15 | from .extend_to_mid_nodes_fc import extend_to_mid_nodes_fc
16 | from .force_summation import force_summation
17 | from .force_summation_psd import force_summation_psd
18 | from .gauss_to_node_fc import gauss_to_node_fc
19 | from .nodal_difference import nodal_difference
20 | from .nodal_difference_fc import nodal_difference_fc
21 | from .nodal_fraction_fc import nodal_fraction_fc
22 | from .nodal_to_elemental import nodal_to_elemental
23 | from .nodal_to_elemental_fc import nodal_to_elemental_fc
24 | from .nodal_to_elemental_nodal import nodal_to_elemental_nodal
25 | from .nodal_to_elemental_nodal_fc import nodal_to_elemental_nodal_fc
26 | from .to_elemental_fc import to_elemental_fc
27 | from .to_elemental_nodal_fc import to_elemental_nodal_fc
28 | from .to_nodal import to_nodal
29 | from .to_nodal_fc import to_nodal_fc
30 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/compression/__init__.py:
--------------------------------------------------------------------------------
1 | from .apply_svd import apply_svd
2 | from .apply_zfp import apply_zfp
3 | from .kmeans_clustering import kmeans_clustering
4 | from .zfp_decompress import zfp_decompress
5 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/filter/__init__.py:
--------------------------------------------------------------------------------
1 | from .abc_weightings import abc_weightings
2 | from .field_band_pass import field_band_pass
3 | from .field_band_pass_fc import field_band_pass_fc
4 | from .field_high_pass import field_high_pass
5 | from .field_high_pass_fc import field_high_pass_fc
6 | from .field_low_pass import field_low_pass
7 | from .field_low_pass_fc import field_low_pass_fc
8 | from .field_signed_high_pass import field_signed_high_pass
9 | from .field_signed_high_pass_fc import field_signed_high_pass_fc
10 | from .filtering_max_over_time import filtering_max_over_time
11 | from .scoping_band_pass import scoping_band_pass
12 | from .scoping_high_pass import scoping_high_pass
13 | from .scoping_low_pass import scoping_low_pass
14 | from .scoping_signed_high_pass import scoping_signed_high_pass
15 | from .timefreq_band_pass import timefreq_band_pass
16 | from .timefreq_high_pass import timefreq_high_pass
17 | from .timefreq_low_pass import timefreq_low_pass
18 | from .timefreq_signed_high_pass import timefreq_signed_high_pass
19 | from .timescoping_band_pass import timescoping_band_pass
20 | from .timescoping_high_pass import timescoping_high_pass
21 | from .timescoping_low_pass import timescoping_low_pass
22 | from .timescoping_signed_high_pass import timescoping_signed_high_pass
23 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/geo/__init__.py:
--------------------------------------------------------------------------------
1 | from .cartesian_to_spherical import cartesian_to_spherical
2 | from .cartesian_to_spherical_fc import cartesian_to_spherical_fc
3 | from .element_nodal_contribution import element_nodal_contribution
4 | from .elements_facets_surfaces_over_time import elements_facets_surfaces_over_time
5 | from .elements_volume import elements_volume
6 | from .elements_volumes_over_time import elements_volumes_over_time
7 | from .faces_area import faces_area
8 | from .gauss_to_node import gauss_to_node
9 | from .integrate_over_elements import integrate_over_elements
10 | from .normals import normals
11 | from .normals_provider_nl import normals_provider_nl
12 | from .rotate import rotate
13 | from .rotate_fc import rotate_fc
14 | from .rotate_in_cylindrical_cs import rotate_in_cylindrical_cs
15 | from .rotate_in_cylindrical_cs_fc import rotate_in_cylindrical_cs_fc
16 | from .spherical_to_cartesian import spherical_to_cartesian
17 | from .spherical_to_cartesian_fc import spherical_to_cartesian_fc
18 | from .to_polar_coordinates import to_polar_coordinates
19 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/invariant/__init__.py:
--------------------------------------------------------------------------------
1 | from .convertnum_bcs_to_nod import convertnum_bcs_to_nod
2 | from .convertnum_nod_to_bcs import convertnum_nod_to_bcs
3 | from .convertnum_op import convertnum_op
4 | from .eigen_values import eigen_values
5 | from .eigen_values_fc import eigen_values_fc
6 | from .eigen_vectors import eigen_vectors
7 | from .eigen_vectors_fc import eigen_vectors_fc
8 | from .invariants import invariants
9 | from .invariants_fc import invariants_fc
10 | from .principal_invariants import principal_invariants
11 | from .principal_invariants_fc import principal_invariants_fc
12 | from .segalman_von_mises_eqv import segalman_von_mises_eqv
13 | from .segalman_von_mises_eqv_fc import segalman_von_mises_eqv_fc
14 | from .von_mises_eqv import von_mises_eqv
15 | from .von_mises_eqv_fc import von_mises_eqv_fc
16 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/logic/__init__.py:
--------------------------------------------------------------------------------
1 | from .ascending_sort import ascending_sort
2 | from .ascending_sort_fc import ascending_sort_fc
3 | from .component_selector import component_selector
4 | from .component_selector_fc import component_selector_fc
5 | from .component_transformer import component_transformer
6 | from .component_transformer_fc import component_transformer_fc
7 | from .descending_sort import descending_sort
8 | from .descending_sort_fc import descending_sort_fc
9 | from .elementary_data_selector import elementary_data_selector
10 | from .elementary_data_selector_fc import elementary_data_selector_fc
11 | from .enrich_materials import enrich_materials
12 | from .identical_anys import identical_anys
13 | from .identical_fc import identical_fc
14 | from .identical_fields import identical_fields
15 | from .identical_generic_data_containers import identical_generic_data_containers
16 | from .identical_mc import identical_mc
17 | from .identical_meshes import identical_meshes
18 | from .identical_pfc import identical_pfc
19 | from .identical_property_fields import identical_property_fields
20 | from .identical_sc import identical_sc
21 | from .identical_scopings import identical_scopings
22 | from .identical_string_fields import identical_string_fields
23 | from .included_fields import included_fields
24 | from .solid_shell_fields import solid_shell_fields
25 | from .split_data_sources import split_data_sources
26 | from .split_streams import split_streams
27 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/mapping/__init__.py:
--------------------------------------------------------------------------------
1 | from .fft import fft
2 | from .find_reduced_coordinates import find_reduced_coordinates
3 | from .on_coordinates import on_coordinates
4 | from .on_reduced_coordinates import on_reduced_coordinates
5 | from .prep_sampling_fft import prep_sampling_fft
6 | from .prepare_mapping_workflow import prepare_mapping_workflow
7 | from .scoping_on_coordinates import scoping_on_coordinates
8 | from .solid_to_skin import solid_to_skin
9 | from .solid_to_skin_fc import solid_to_skin_fc
10 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/mesh/__init__.py:
--------------------------------------------------------------------------------
1 | from .acmo_mesh_provider import acmo_mesh_provider
2 | from .beam_properties import beam_properties
3 | from .change_cs import change_cs
4 | from .combine_levelset import combine_levelset
5 | from .decimate_mesh import decimate_mesh
6 | from .exclude_levelset import exclude_levelset
7 | from .external_layer import external_layer
8 | from .from_field import from_field
9 | from .from_scoping import from_scoping
10 | from .from_scopings import from_scopings
11 | from .iso_surfaces import iso_surfaces
12 | from .make_plane_levelset import make_plane_levelset
13 | from .make_sphere_levelset import make_sphere_levelset
14 | from .mesh_clip import mesh_clip
15 | from .mesh_cut import mesh_cut
16 | from .mesh_extraction import mesh_extraction
17 | from .mesh_get_attribute import mesh_get_attribute
18 | from .mesh_plan_clip import mesh_plan_clip
19 | from .mesh_provider import mesh_provider
20 | from .mesh_to_graphics import mesh_to_graphics
21 | from .mesh_to_graphics_edges import mesh_to_graphics_edges
22 | from .mesh_to_pyvista import mesh_to_pyvista
23 | from .mesh_to_tetra import mesh_to_tetra
24 | from .meshes_provider import meshes_provider
25 | from .node_coordinates import node_coordinates
26 | from .points_from_coordinates import points_from_coordinates
27 | from .skin import skin
28 | from .split_fields import split_fields
29 | from .split_mesh import split_mesh
30 | from .stl_export import stl_export
31 | from .tri_mesh_skin import tri_mesh_skin
32 | from .wireframe import wireframe
33 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/metadata/__init__.py:
--------------------------------------------------------------------------------
1 | from .boundary_condition_provider import boundary_condition_provider
2 | from .coordinate_system_data_provider import coordinate_system_data_provider
3 | from .cyclic_mesh_expansion import cyclic_mesh_expansion
4 | from .cyclic_support_provider import cyclic_support_provider
5 | from .datasources_provider import datasources_provider
6 | from .element_types_provider import element_types_provider
7 | from .integrate_over_time_freq import integrate_over_time_freq
8 | from .is_cyclic import is_cyclic
9 | from .material_support_provider import material_support_provider
10 | from .mesh_info_provider import mesh_info_provider
11 | from .mesh_property_provider import mesh_property_provider
12 | from .mesh_selection_manager_provider import mesh_selection_manager_provider
13 | from .mesh_support_provider import mesh_support_provider
14 | from .property_field_provider_by_name import property_field_provider_by_name
15 | from .real_constants_provider import real_constants_provider
16 | from .result_info_provider import result_info_provider
17 | from .streams_provider import streams_provider
18 | from .time_freq_provider import time_freq_provider
19 | from .time_freq_support_get_attribute import time_freq_support_get_attribute
20 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/min_max/__init__.py:
--------------------------------------------------------------------------------
1 | from .max_by_component import max_by_component
2 | from .max_over_phase import max_over_phase
3 | from .max_over_time_by_entity import max_over_time_by_entity
4 | from .min_by_component import min_by_component
5 | from .min_max import min_max
6 | from .min_max_by_entity import min_max_by_entity
7 | from .min_max_by_time import min_max_by_time
8 | from .min_max_fc import min_max_fc
9 | from .min_max_fc_inc import min_max_fc_inc
10 | from .min_max_inc import min_max_inc
11 | from .min_max_over_label_fc import min_max_over_label_fc
12 | from .min_max_over_time_by_entity import min_max_over_time_by_entity
13 | from .min_over_time_by_entity import min_over_time_by_entity
14 | from .phase_of_max import phase_of_max
15 | from .time_of_max_by_entity import time_of_max_by_entity
16 | from .time_of_min_by_entity import time_of_min_by_entity
17 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/scoping/__init__.py:
--------------------------------------------------------------------------------
1 | from .adapt_with_scopings_container import adapt_with_scopings_container
2 | from .change_fc import change_fc
3 | from .compute_element_centroids import compute_element_centroids
4 | from .connectivity_ids import connectivity_ids
5 | from .elemental_from_mesh import elemental_from_mesh
6 | from .from_mesh import from_mesh
7 | from .intersect import intersect
8 | from .nodal_from_mesh import nodal_from_mesh
9 | from .on_mesh_property import on_mesh_property
10 | from .on_named_selection import on_named_selection
11 | from .on_property import on_property
12 | from .reduce_sampling import reduce_sampling
13 | from .rescope import rescope
14 | from .rescope_custom_type_field import rescope_custom_type_field
15 | from .rescope_fc import rescope_fc
16 | from .rescope_property_field import rescope_property_field
17 | from .scoping_get_attribute import scoping_get_attribute
18 | from .split_on_property_type import split_on_property_type
19 | from .transpose import transpose
20 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/serialization/__init__.py:
--------------------------------------------------------------------------------
1 | from .csv_to_field import csv_to_field
2 | from .data_tree_to_json import data_tree_to_json
3 | from .data_tree_to_txt import data_tree_to_txt
4 | from .deserializer import deserializer
5 | from .export_symbolic_workflow import export_symbolic_workflow
6 | from .field_to_csv import field_to_csv
7 | from .hdf5dpf_custom_read import hdf5dpf_custom_read
8 | from .hdf5dpf_generate_result_file import hdf5dpf_generate_result_file
9 | from .import_symbolic_workflow import import_symbolic_workflow
10 | from .json_to_data_tree import json_to_data_tree
11 | from .migrate_file_to_vtk import migrate_file_to_vtk
12 | from .migrate_to_vtu import migrate_to_vtu
13 | from .serialize_to_hdf5 import serialize_to_hdf5
14 | from .serializer import serializer
15 | from .serializer_to_string import serializer_to_string
16 | from .string_deserializer import string_deserializer
17 | from .txt_to_data_tree import txt_to_data_tree
18 | from .vtk_export import vtk_export
19 | from .vtk_to_fields import vtk_to_fields
20 | from .vtu_export import vtu_export
21 | from .workflow_to_pydpf import workflow_to_pydpf
22 | from .workflow_to_workflow_topology import workflow_to_workflow_topology
23 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/server/__init__.py:
--------------------------------------------------------------------------------
1 | from .grpc_shutdown_server import grpc_shutdown_server
2 | from .grpc_start_server import grpc_start_server
3 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/specification.py:
--------------------------------------------------------------------------------
1 | from ansys.dpf.core.operator_specification import SpecificationBase, PinSpecification
2 |
3 |
4 | class Specification(SpecificationBase):
5 | def __init__(self, description=None, map_input_pin_spec=None, map_output_pin_spec=None, config=None):
6 |
7 | self._description = description
8 | self._map_input_pin_spec = map_input_pin_spec
9 | self._map_output_pin_spec = map_output_pin_spec
10 |
11 |
12 |
13 | @property
14 | def map_input_pin_spec(self):
15 | return self._map_input_pin_spec
16 |
17 | @property
18 | def map_output_pin_spec(self):
19 | return self._map_output_pin_spec
20 |
21 | @property
22 | def inputs(self):
23 | return self._map_input_pin_spec
24 |
25 | @property
26 | def outputs(self):
27 | return self._map_output_pin_spec
28 |
29 | def output_pin(self, pin_num):
30 | return self._map_output_pin_spec[pin_num]
31 |
32 | def input_pin(self, pin_num):
33 | return self._map_input_pin_spec[pin_num]
34 |
35 | @property
36 | def description(self):
37 | return self._description
38 |
39 | def __str__(self):
40 | out = ""
41 | for key, i in self._asdict().items():
42 | out += key + ": " + str(i) + "\n\n"
43 | return out
44 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/operators/translator.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 |
24 | class Markdown2RstTranslator:
25 | """A translator class for Markdown to RST text conversion."""
26 | def __init__(self):
27 | import pypandoc
28 |
29 | self._convert = pypandoc.convert_text
30 |
31 | # import mistune
32 | # from mistune.renderers.rst import RSTRenderer
33 | #
34 | # md2rst_converter = mistune.create_markdown(renderer=RSTRenderer())
35 |
36 | def convert(self, text:str) -> str:
37 | """Convert the Markdown text in input to RST."""
38 | return self._convert(
39 | source=text,
40 | to="rst",
41 | format="md",
42 | verify_format=False, # Improves performance but does not check validity of format
43 | extra_args=["--eol=lf"],
44 | )
45 | # return md2rst_converter(specification.description)
46 |
--------------------------------------------------------------------------------
/src/ansys/dpf/core/workflow_topology/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 | """Workflow topology module."""
23 |
24 | from .data_connection import DataConnection
25 | from .exposed_pin import ExposedPin
26 | from .operator_connection import OperatorConnection
27 | from .workflow_topology import WorkflowTopology
28 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/_version.py:
--------------------------------------------------------------------------------
1 | """Version for ansys-dpf-gate"""
2 | # major, minor, patch
3 | version_info = 0, 6, "1.dev0"
4 | __ansys_version__ = "251"
5 |
6 | # Nice string for the version
7 | __version__ = ".".join(map(str, version_info))
8 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/common.py:
--------------------------------------------------------------------------------
1 | import abc
2 |
3 |
4 | class locations:
5 | """Contains strings for scoping and field locations.
6 |
7 | Attributes
8 | -----------
9 | none = "none"
10 |
11 | elemental = "Elemental"
12 | data is one per element
13 |
14 | elemental_nodal = "ElementalNodal"
15 | one per node per element
16 |
17 | nodal = "Nodal"
18 | one per node
19 |
20 | time_freq = "TimeFreq_sets"
21 | one per time set
22 |
23 | overall = "overall"
24 | applies everywhere
25 |
26 | time_freq_step = "TimeFreq_steps"
27 | one per time step
28 |
29 | faces = "Faces"
30 | one per face
31 |
32 | zone = "zone"
33 | one per zone
34 |
35 | elemental_and_faces = "ElementalAndFaces"
36 | data available in elements and faces of the model
37 | """
38 |
39 | none = "none"
40 |
41 | # data is one per element
42 | elemental = "Elemental"
43 |
44 | # one per node per element
45 | elemental_nodal = "ElementalNodal"
46 |
47 | # one per node
48 | nodal = "Nodal"
49 |
50 | # one per time set
51 | time_freq = "TimeFreq_sets"
52 |
53 | # applies everywhere
54 | overall = "overall"
55 |
56 | # one per time step
57 | time_freq_step = "TimeFreq_steps"
58 |
59 | # one per face
60 | faces = "Faces"
61 |
62 | # one per zone
63 | zone = "zone"
64 |
65 | # data available in elements and faces of the model
66 | elemental_and_faces = "ElementalAndFaces"
67 |
68 |
69 | elemental_property_type_dict = {
70 | "eltype": "ELEMENT_TYPE",
71 | "elshape": "ELEMENT_SHAPE",
72 | "mat": "MATERIAL",
73 | "connectivity": "CONNECTIVITY",
74 | }
75 |
76 |
77 | nodal_property_type_dict = {
78 | "coordinates": "COORDINATES",
79 | "reverse_connectivity": "NODAL_CONNECTIVITY",
80 | }
81 |
82 | class ProgressBarBase:
83 | def __init__(self, text, tot_size=None):
84 | self.current = 0
85 | self.tot_size = tot_size
86 | pass
87 |
88 | def start(self):
89 | pass
90 |
91 | @abc.abstractmethod
92 | def update(self, current_value):
93 | pass
94 |
95 | def finish(self):
96 | if self.tot_size is not None and self.current != self.tot_size:
97 | self.update(self.tot_size)
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/dpf_array.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 |
3 |
4 | class DPFArray(np.ndarray):
5 | """Overload of numpy ndarray `_
6 | managing DPFVector (memory owner of vector data in DPF C APIs) memory and updates.
7 |
8 | Parameters
9 | ----------
10 | vec : DPFVectorBase
11 | DPFVector instance to manage and optionally update when the DPFArray is deleted or committed.
12 | """
13 |
14 | def __new__(
15 | cls,
16 | vec
17 | ):
18 | """Allocate the array."""
19 | try:
20 | obj = vec.np_array.view(cls)
21 | except NotImplementedError as e:
22 | raise TypeError(e.args)
23 | obj.vec = vec
24 | return obj
25 |
26 | def __array_finalize__(self, obj):
27 | """Finalize array (associate with parent metadata)."""
28 | if np.shares_memory(self, obj):
29 | self.vec = getattr(obj, 'vec', None)
30 | else:
31 | self.vec = None
32 |
33 | def commit(self):
34 | """Updates the data server side when necessary"""
35 | if self.vec is not None:
36 | self.vec.commit()
37 |
38 | # def __setitem__(self, key, value):
39 | # super().__setitem__(key, value)
40 | # if self.vec:
41 | # self.vec._modified = True
42 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/client_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # Client
3 | #-------------------------------------------------------------------------------
4 |
5 | class ClientAbstractAPI:
6 | @staticmethod
7 | def init_client_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_client_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def client_new(ip, port):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def client_new_full_address(address):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def client_get_full_address(client):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def client_get_protocol_name(client):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def client_has_local_server(client):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def client_set_local_server(client, server_streams):
36 | raise NotImplementedError
37 |
38 | @staticmethod
39 | def client_get_local_server(client):
40 | raise NotImplementedError
41 |
42 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/cyclic_support_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # CyclicSupport
3 | #-------------------------------------------------------------------------------
4 |
5 | class CyclicSupportAbstractAPI:
6 | @staticmethod
7 | def init_cyclic_support_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_cyclic_support_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def cyclic_support_delete(support):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def cyclic_support_get_num_sectors(support, istage):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def cyclic_support_get_num_stages(support):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def cyclic_support_get_sectors_scoping(support, istage):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def cyclic_support_get_cyclic_phase(support):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def cyclic_support_get_base_nodes_scoping(support, istage):
36 | raise NotImplementedError
37 |
38 | @staticmethod
39 | def cyclic_support_get_base_elements_scoping(support, istage):
40 | raise NotImplementedError
41 |
42 | @staticmethod
43 | def cyclic_support_get_expanded_node_ids(support, baseNodeId, istage, sectorsScoping):
44 | raise NotImplementedError
45 |
46 | @staticmethod
47 | def cyclic_support_get_expanded_element_ids(support, baseElementId, istage, sectorsScoping):
48 | raise NotImplementedError
49 |
50 | @staticmethod
51 | def cyclic_support_get_cs(support):
52 | raise NotImplementedError
53 |
54 | @staticmethod
55 | def cyclic_support_get_low_high_map(support, istage):
56 | raise NotImplementedError
57 |
58 | @staticmethod
59 | def cyclic_support_get_high_low_map(support, istage):
60 | raise NotImplementedError
61 |
62 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/data_base_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # DataBase
3 | #-------------------------------------------------------------------------------
4 |
5 | class DataBaseAbstractAPI:
6 | @staticmethod
7 | def init_data_base_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_data_base_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def data_base_create_and_hold(id):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def data_base_record_entity_by_db_id(dbid, obj):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def data_base_record_entity(db, obj):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def data_base_erase_entity(db, entityId):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def data_base_erase_entity_by_db_id(dbid, entityId):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def data_base_release_entity(db, entityId):
36 | raise NotImplementedError
37 |
38 | @staticmethod
39 | def data_base_release_by_db_id(dbid, entityId):
40 | raise NotImplementedError
41 |
42 | @staticmethod
43 | def data_base_get_entity(db, entityId):
44 | raise NotImplementedError
45 |
46 | @staticmethod
47 | def data_base_get_by_db_id(dbid, entityId):
48 | raise NotImplementedError
49 |
50 | @staticmethod
51 | def data_base_delete(dbid):
52 | raise NotImplementedError
53 |
54 | @staticmethod
55 | def data_base_erase_all_held_entities(db):
56 | raise NotImplementedError
57 |
58 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/data_processing_error_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # DataProcessingError
3 | #-------------------------------------------------------------------------------
4 |
5 | class DataProcessingErrorAbstractAPI:
6 | @staticmethod
7 | def init_data_processing_error_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_data_processing_error_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def data_processing_parse_error(size, error_message):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def data_processing_parse_error_to_str(size, error_message):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def dpf_error_new():
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def dpf_error_set_throw(error, must_throw):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def dpf_error_set_code(error, code_value):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def dpf_error_set_message_text(error, code_value):
36 | raise NotImplementedError
37 |
38 | @staticmethod
39 | def dpf_error_set_message_template(error, code_value):
40 | raise NotImplementedError
41 |
42 | @staticmethod
43 | def dpf_error_set_message_id(error, code_value):
44 | raise NotImplementedError
45 |
46 | @staticmethod
47 | def dpf_error_delete(error):
48 | raise NotImplementedError
49 |
50 | @staticmethod
51 | def dpf_error_duplicate(error):
52 | raise NotImplementedError
53 |
54 | @staticmethod
55 | def dpf_error_code(error):
56 | raise NotImplementedError
57 |
58 | @staticmethod
59 | def dpf_error_to_throw(error):
60 | raise NotImplementedError
61 |
62 | @staticmethod
63 | def dpf_error_message_text(error):
64 | raise NotImplementedError
65 |
66 | @staticmethod
67 | def dpf_error_message_template(error):
68 | raise NotImplementedError
69 |
70 | @staticmethod
71 | def dpf_error_message_id(error):
72 | raise NotImplementedError
73 |
74 | @staticmethod
75 | def data_processing_parse_error_to_str_for_object(api_to_use, size, error_message):
76 | raise NotImplementedError
77 |
78 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/external_data_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # ExternalData
3 | #-------------------------------------------------------------------------------
4 |
5 | class ExternalDataAbstractAPI:
6 | @staticmethod
7 | def init_external_data_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_external_data_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def external_data_wrap(external_data, deleter):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def external_data_free(var1):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def external_data_get(external_data):
24 | raise NotImplementedError
25 |
26 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/external_data_capi.py:
--------------------------------------------------------------------------------
1 | import ctypes
2 | from ansys.dpf.gate import utils
3 | from ansys.dpf.gate import errors
4 | from ansys.dpf.gate.generated import capi
5 | from ansys.dpf.gate.generated import external_data_abstract_api
6 | from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI
7 |
8 | #-------------------------------------------------------------------------------
9 | # ExternalData
10 | #-------------------------------------------------------------------------------
11 |
12 | class ExternalDataCAPI(external_data_abstract_api.ExternalDataAbstractAPI):
13 |
14 | @staticmethod
15 | def init_external_data_environment(object):
16 | # get core api
17 | DataProcessingCAPI.init_data_processing_environment(object)
18 | object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj)
19 |
20 | @staticmethod
21 | def external_data_wrap(external_data, deleter):
22 | res = capi.dll.ExternalData_wrap(external_data, deleter)
23 | return res
24 |
25 | @staticmethod
26 | def external_data_free(var1):
27 | res = capi.dll.ExternalData_free(var1._internal_obj if var1 is not None else None)
28 | return res
29 |
30 | @staticmethod
31 | def external_data_get(external_data):
32 | res = capi.dll.ExternalData_get(external_data._internal_obj if external_data is not None else None)
33 | return res
34 |
35 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/f_e_model_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # FEModel
3 | #-------------------------------------------------------------------------------
4 |
5 | class FEModelAbstractAPI:
6 | @staticmethod
7 | def init_f_e_model_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_f_e_model_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def femodel_new():
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def femodel_new_with_result_file(file_name):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def femodel_new_empty():
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def femodel_delete(feModel):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def femodel_set_result_file_path(feModel, name):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def femodel_add_result(feModel, resDef):
36 | raise NotImplementedError
37 |
38 | @staticmethod
39 | def femodel_add_primary_result(feModel, res):
40 | raise NotImplementedError
41 |
42 | @staticmethod
43 | def femodel_add_result_with_scoping(feModel, res, scoping):
44 | raise NotImplementedError
45 |
46 | @staticmethod
47 | def femodel_delete_result(feModel, result):
48 | raise NotImplementedError
49 |
50 | @staticmethod
51 | def femodel_get_mesh_region(feModel):
52 | raise NotImplementedError
53 |
54 | @staticmethod
55 | def femodel_get_time_freq_support(feModel):
56 | raise NotImplementedError
57 |
58 | @staticmethod
59 | def femodel_get_support_query(feModel):
60 | raise NotImplementedError
61 |
62 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/field_mapping_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # FieldMapping
3 | #-------------------------------------------------------------------------------
4 |
5 | class FieldMappingAbstractAPI:
6 | @staticmethod
7 | def init_field_mapping_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_field_mapping_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def mapping_delete(obj):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def mapping_map(obj, in_field):
20 | raise NotImplementedError
21 |
22 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/field_mapping_capi.py:
--------------------------------------------------------------------------------
1 | import ctypes
2 | from ansys.dpf.gate import utils
3 | from ansys.dpf.gate import errors
4 | from ansys.dpf.gate.generated import capi
5 | from ansys.dpf.gate.generated import field_mapping_abstract_api
6 | from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI
7 |
8 | #-------------------------------------------------------------------------------
9 | # FieldMapping
10 | #-------------------------------------------------------------------------------
11 |
12 | class FieldMappingCAPI(field_mapping_abstract_api.FieldMappingAbstractAPI):
13 |
14 | @staticmethod
15 | def init_field_mapping_environment(object):
16 | # get core api
17 | DataProcessingCAPI.init_data_processing_environment(object)
18 | object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj)
19 |
20 | @staticmethod
21 | def mapping_delete(obj):
22 | errorSize = ctypes.c_int(0)
23 | sError = ctypes.c_wchar_p()
24 | res = capi.dll.Mapping_Delete(obj._internal_obj if obj is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
25 | if errorSize.value != 0:
26 | raise errors.DPFServerException(sError.value)
27 | return res
28 |
29 | @staticmethod
30 | def mapping_map(obj, in_field):
31 | errorSize = ctypes.c_int(0)
32 | sError = ctypes.c_wchar_p()
33 | res = capi.dll.Mapping_Map(obj._internal_obj if obj is not None else None, in_field._internal_obj if in_field is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
34 | if errorSize.value != 0:
35 | raise errors.DPFServerException(sError.value)
36 | return res
37 |
38 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/fields_container_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # FieldsContainer
3 | #-------------------------------------------------------------------------------
4 |
5 | class FieldsContainerAbstractAPI:
6 | @staticmethod
7 | def init_fields_container_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_fields_container_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def fields_container_new():
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def fields_container_delete(fieldContainer):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def fields_container_at(fieldContainer, i, ic):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def fields_container_set_field(fieldContainer, field, fieldId, ic):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def fields_container_get_scoping(fieldContainer, ic, size):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def fields_container_num_fields(fieldContainer):
36 | raise NotImplementedError
37 |
38 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/generic_data_container_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # GenericDataContainer
3 | #-------------------------------------------------------------------------------
4 |
5 | class GenericDataContainerAbstractAPI:
6 | @staticmethod
7 | def init_generic_data_container_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_generic_data_container_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def generic_data_container_new():
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def generic_data_container_get_property_any(container, name):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def generic_data_container_set_property_any(container, name, any):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def generic_data_container_set_property_dpf_type(container, name, any):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def generic_data_container_get_property_types(container):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def generic_data_container_get_property_names(container):
36 | raise NotImplementedError
37 |
38 | @staticmethod
39 | def generic_data_container_new_on_client(client):
40 | raise NotImplementedError
41 |
42 | @staticmethod
43 | def generic_data_container_get_copy(id, client):
44 | raise NotImplementedError
45 |
46 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/generic_support_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # GenericSupport
3 | #-------------------------------------------------------------------------------
4 |
5 | class GenericSupportAbstractAPI:
6 | @staticmethod
7 | def init_generic_support_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_generic_support_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def generic_support_new(name):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def generic_support_set_field_support_of_property(support, name, field):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def generic_support_set_property_field_support_of_property(support, name, field):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def generic_support_set_string_field_support_of_property(support, name, field):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def generic_support_new_on_client(client, name):
32 | raise NotImplementedError
33 |
34 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/label_space_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # LabelSpace
3 | #-------------------------------------------------------------------------------
4 |
5 | class LabelSpaceAbstractAPI:
6 | @staticmethod
7 | def init_label_space_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_label_space_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def label_space_new():
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def label_space_delete(space):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def label_space_add_data(space, label, id):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def label_space_set_data(space, label, id):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def label_space_erase_data(space, label):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def label_space_get_size(space):
36 | raise NotImplementedError
37 |
38 | @staticmethod
39 | def label_space_merge_with(space, otherspace):
40 | raise NotImplementedError
41 |
42 | @staticmethod
43 | def label_space_get_labels_value(space, index):
44 | raise NotImplementedError
45 |
46 | @staticmethod
47 | def label_space_get_labels_name(space, index):
48 | raise NotImplementedError
49 |
50 | @staticmethod
51 | def label_space_has_label(space, label):
52 | raise NotImplementedError
53 |
54 | @staticmethod
55 | def label_space_at(space, label):
56 | raise NotImplementedError
57 |
58 | @staticmethod
59 | def list_label_spaces_new(reserved_size):
60 | raise NotImplementedError
61 |
62 | @staticmethod
63 | def list_label_spaces_pushback(list, space):
64 | raise NotImplementedError
65 |
66 | @staticmethod
67 | def list_label_spaces_size(list):
68 | raise NotImplementedError
69 |
70 | @staticmethod
71 | def list_label_spaces_at(list, index):
72 | raise NotImplementedError
73 |
74 | @staticmethod
75 | def label_space_new_for_object(api_to_use):
76 | raise NotImplementedError
77 |
78 | @staticmethod
79 | def list_label_spaces_new_for_object(api_to_use, reserved_size):
80 | raise NotImplementedError
81 |
82 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/materials_container_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # MaterialsContainer
3 | #-------------------------------------------------------------------------------
4 |
5 | class MaterialsContainerAbstractAPI:
6 | @staticmethod
7 | def init_materials_container_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_materials_container_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def materials_container_delete(materialscontainer):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def materials_container_get_dpf_mat_ids(materialscontainer, size):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def materials_container_get_vuuidat_dpf_mat_id(materialscontainer, dpfMatId):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def materials_container_get_num_of_materials(materialscontainer):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def materials_container_get_num_available_properties_at_vuuid(materialscontainer, vuuid):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def materials_container_get_property_scripting_name_of_dpf_mat_id_at_index(materialscontainer, dpfmatID, idx):
36 | raise NotImplementedError
37 |
38 | @staticmethod
39 | def materials_container_get_num_available_properties_at_dpf_mat_id(materialscontainer, dpfmatID):
40 | raise NotImplementedError
41 |
42 | @staticmethod
43 | def materials_container_get_material_physic_name_at_vuuid(materialscontainer, vuuid):
44 | raise NotImplementedError
45 |
46 | @staticmethod
47 | def materials_container_get_material_physic_name_at_dpf_mat_id(materialscontainer, dpfmatID):
48 | raise NotImplementedError
49 |
50 | @staticmethod
51 | def materials_container_get_dpf_mat_id_at_material_physic_name(materialscontainer, physicname):
52 | raise NotImplementedError
53 |
54 | @staticmethod
55 | def materials_container_get_dpf_mat_id_at_vuuid(materialscontainer, vuuid):
56 | raise NotImplementedError
57 |
58 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/operator_config_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # OperatorConfig
3 | #-------------------------------------------------------------------------------
4 |
5 | class OperatorConfigAbstractAPI:
6 | @staticmethod
7 | def init_operator_config_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_operator_config_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def operator_config_default_new(op):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def operator_config_empty_new():
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def operator_config_get_int(config, option):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def operator_config_get_double(config, option):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def operator_config_get_bool(config, option):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def operator_config_set_int(config, option, value):
36 | raise NotImplementedError
37 |
38 | @staticmethod
39 | def operator_config_set_double(config, option, value):
40 | raise NotImplementedError
41 |
42 | @staticmethod
43 | def operator_config_set_bool(config, option, value):
44 | raise NotImplementedError
45 |
46 | @staticmethod
47 | def operator_config_get_num_config(config):
48 | raise NotImplementedError
49 |
50 | @staticmethod
51 | def operator_config_get_config_option_name(config, index):
52 | raise NotImplementedError
53 |
54 | @staticmethod
55 | def operator_config_get_config_option_printable_value(config, index):
56 | raise NotImplementedError
57 |
58 | @staticmethod
59 | def operator_config_has_option(config, option):
60 | raise NotImplementedError
61 |
62 | @staticmethod
63 | def operator_config_default_new_on_client(client, op):
64 | raise NotImplementedError
65 |
66 | @staticmethod
67 | def operator_config_empty_new_on_client(client):
68 | raise NotImplementedError
69 |
70 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/remote_operator_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # RemoteOperator
3 | #-------------------------------------------------------------------------------
4 |
5 | class RemoteOperatorAbstractAPI:
6 | @staticmethod
7 | def init_remote_operator_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_remote_operator_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def remote_operator_new(streams, remoteId):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def remote_operator_get_streams(remote_wf):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def remote_operator_get_operator_id(remote_wf):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def remote_operator_hold_streams(wf, streams):
28 | raise NotImplementedError
29 |
30 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/remote_operator_capi.py:
--------------------------------------------------------------------------------
1 | import ctypes
2 | from ansys.dpf.gate import utils
3 | from ansys.dpf.gate import errors
4 | from ansys.dpf.gate.generated import capi
5 | from ansys.dpf.gate.generated import remote_operator_abstract_api
6 | from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI
7 |
8 | #-------------------------------------------------------------------------------
9 | # RemoteOperator
10 | #-------------------------------------------------------------------------------
11 |
12 | class RemoteOperatorCAPI(remote_operator_abstract_api.RemoteOperatorAbstractAPI):
13 |
14 | @staticmethod
15 | def init_remote_operator_environment(object):
16 | # get core api
17 | DataProcessingCAPI.init_data_processing_environment(object)
18 | object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj)
19 |
20 | @staticmethod
21 | def remote_operator_new(streams, remoteId):
22 | errorSize = ctypes.c_int(0)
23 | sError = ctypes.c_wchar_p()
24 | res = capi.dll.RemoteOperator_new(streams._internal_obj if streams is not None else None, utils.to_int32(remoteId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
25 | if errorSize.value != 0:
26 | raise errors.DPFServerException(sError.value)
27 | return res
28 |
29 | @staticmethod
30 | def remote_operator_get_streams(remote_wf):
31 | errorSize = ctypes.c_int(0)
32 | sError = ctypes.c_wchar_p()
33 | res = capi.dll.RemoteOperator_get_streams(remote_wf._internal_obj if remote_wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
34 | if errorSize.value != 0:
35 | raise errors.DPFServerException(sError.value)
36 | return res
37 |
38 | @staticmethod
39 | def remote_operator_get_operator_id(remote_wf):
40 | errorSize = ctypes.c_int(0)
41 | sError = ctypes.c_wchar_p()
42 | res = capi.dll.RemoteOperator_get_operator_id(remote_wf._internal_obj if remote_wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
43 | if errorSize.value != 0:
44 | raise errors.DPFServerException(sError.value)
45 | return res
46 |
47 | @staticmethod
48 | def remote_operator_hold_streams(wf, streams):
49 | errorSize = ctypes.c_int(0)
50 | sError = ctypes.c_wchar_p()
51 | res = capi.dll.RemoteOperator_hold_streams(wf._internal_obj if wf is not None else None, utils.to_int32(streams), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
52 | if errorSize.value != 0:
53 | raise errors.DPFServerException(sError.value)
54 | return res
55 |
56 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/remote_workflow_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # RemoteWorkflow
3 | #-------------------------------------------------------------------------------
4 |
5 | class RemoteWorkflowAbstractAPI:
6 | @staticmethod
7 | def init_remote_workflow_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_remote_workflow_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def remote_workflow_new(streams, remoteId):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def remote_workflow_get_workflow_id(remote_wf):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def remote_workflow_get_streams(remote_wf):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def remote_work_flow_delete(remote_wf):
28 | raise NotImplementedError
29 |
30 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/remote_workflow_capi.py:
--------------------------------------------------------------------------------
1 | import ctypes
2 | from ansys.dpf.gate import utils
3 | from ansys.dpf.gate import errors
4 | from ansys.dpf.gate.generated import capi
5 | from ansys.dpf.gate.generated import remote_workflow_abstract_api
6 | from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI
7 |
8 | #-------------------------------------------------------------------------------
9 | # RemoteWorkflow
10 | #-------------------------------------------------------------------------------
11 |
12 | class RemoteWorkflowCAPI(remote_workflow_abstract_api.RemoteWorkflowAbstractAPI):
13 |
14 | @staticmethod
15 | def init_remote_workflow_environment(object):
16 | # get core api
17 | DataProcessingCAPI.init_data_processing_environment(object)
18 | object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj)
19 |
20 | @staticmethod
21 | def remote_workflow_new(streams, remoteId):
22 | errorSize = ctypes.c_int(0)
23 | sError = ctypes.c_wchar_p()
24 | res = capi.dll.RemoteWorkflow_new(streams._internal_obj if streams is not None else None, utils.to_int32(remoteId), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
25 | if errorSize.value != 0:
26 | raise errors.DPFServerException(sError.value)
27 | return res
28 |
29 | @staticmethod
30 | def remote_workflow_get_workflow_id(remote_wf):
31 | errorSize = ctypes.c_int(0)
32 | sError = ctypes.c_wchar_p()
33 | res = capi.dll.RemoteWorkflow_get_workflow_id(remote_wf._internal_obj if remote_wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
34 | if errorSize.value != 0:
35 | raise errors.DPFServerException(sError.value)
36 | return res
37 |
38 | @staticmethod
39 | def remote_workflow_get_streams(remote_wf):
40 | errorSize = ctypes.c_int(0)
41 | sError = ctypes.c_wchar_p()
42 | res = capi.dll.RemoteWorkflow_get_streams(remote_wf._internal_obj if remote_wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
43 | if errorSize.value != 0:
44 | raise errors.DPFServerException(sError.value)
45 | return res
46 |
47 | @staticmethod
48 | def remote_work_flow_delete(remote_wf):
49 | errorSize = ctypes.c_int(0)
50 | sError = ctypes.c_wchar_p()
51 | res = capi.dll.RemoteWorkFlow_delete(remote_wf._internal_obj if remote_wf is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
52 | if errorSize.value != 0:
53 | raise errors.DPFServerException(sError.value)
54 | return res
55 |
56 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/serialization_stream_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # SerializationStream
3 | #-------------------------------------------------------------------------------
4 |
5 | class SerializationStreamAbstractAPI:
6 | @staticmethod
7 | def init_serialization_stream_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_serialization_stream_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def serialization_stream_get_output_string(stream, dataSize):
16 | raise NotImplementedError
17 |
18 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/serialization_stream_capi.py:
--------------------------------------------------------------------------------
1 | import ctypes
2 | from ansys.dpf.gate import utils
3 | from ansys.dpf.gate import errors
4 | from ansys.dpf.gate.generated import capi
5 | from ansys.dpf.gate.generated import serialization_stream_abstract_api
6 | from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI
7 |
8 | #-------------------------------------------------------------------------------
9 | # SerializationStream
10 | #-------------------------------------------------------------------------------
11 |
12 | class SerializationStreamCAPI(serialization_stream_abstract_api.SerializationStreamAbstractAPI):
13 |
14 | @staticmethod
15 | def init_serialization_stream_environment(object):
16 | # get core api
17 | DataProcessingCAPI.init_data_processing_environment(object)
18 | object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj)
19 |
20 | @staticmethod
21 | def serialization_stream_get_output_string(stream, dataSize):
22 | errorSize = ctypes.c_int(0)
23 | sError = ctypes.c_wchar_p()
24 | res = capi.dll.SerializationStream_getOutputString(stream._internal_obj if stream is not None else None, dataSize, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
25 | if errorSize.value != 0:
26 | raise errors.DPFServerException(sError.value)
27 | newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None
28 | capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError))
29 | return newres
30 |
31 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/specification_externalization_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # SpecificationExternalization
3 | #-------------------------------------------------------------------------------
4 |
5 | class SpecificationExternalizationAbstractAPI:
6 | @staticmethod
7 | def init_specification_externalization_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_specification_externalization_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def specification_xml_export(filepath):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def specification_xml_import(filepath):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def set_specification_in_core(registry):
24 | raise NotImplementedError
25 |
26 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/specification_externalization_capi.py:
--------------------------------------------------------------------------------
1 | import ctypes
2 | from ansys.dpf.gate import utils
3 | from ansys.dpf.gate import errors
4 | from ansys.dpf.gate.generated import capi
5 | from ansys.dpf.gate.generated import specification_externalization_abstract_api
6 | from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI
7 |
8 | #-------------------------------------------------------------------------------
9 | # SpecificationExternalization
10 | #-------------------------------------------------------------------------------
11 |
12 | class SpecificationExternalizationCAPI(specification_externalization_abstract_api.SpecificationExternalizationAbstractAPI):
13 |
14 | @staticmethod
15 | def init_specification_externalization_environment(object):
16 | # get core api
17 | DataProcessingCAPI.init_data_processing_environment(object)
18 | object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj)
19 |
20 | @staticmethod
21 | def specification_xml_export(filepath):
22 | errorSize = ctypes.c_int(0)
23 | sError = ctypes.c_wchar_p()
24 | res = capi.dll.Specification_xml_export(utils.to_char_ptr(filepath), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
25 | if errorSize.value != 0:
26 | raise errors.DPFServerException(sError.value)
27 | return res
28 |
29 | @staticmethod
30 | def specification_xml_import(filepath):
31 | errorSize = ctypes.c_int(0)
32 | sError = ctypes.c_wchar_p()
33 | res = capi.dll.Specification_xml_import(utils.to_char_ptr(filepath), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
34 | if errorSize.value != 0:
35 | raise errors.DPFServerException(sError.value)
36 | return res
37 |
38 | @staticmethod
39 | def set_specification_in_core(registry):
40 | errorSize = ctypes.c_int(0)
41 | sError = ctypes.c_wchar_p()
42 | res = capi.dll.setSpecificationInCore(registry, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
43 | if errorSize.value != 0:
44 | raise errors.DPFServerException(sError.value)
45 | return res
46 |
47 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/streams_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # Streams
3 | #-------------------------------------------------------------------------------
4 |
5 | class StreamsAbstractAPI:
6 | @staticmethod
7 | def init_streams_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_streams_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def streams_delete(streams):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def streams_release_handles(streams):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def streams_new(dataSources):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def streams_add_external_stream(streams, streamTypeName, filePath, releaseFileFunc, deleteFunc, var1):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def streams_get_external_stream(streams, key):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def streams_add_external_stream_with_label_space(streams, streamTypeName, filePath, releaseFileFunc, deleteFunc, var1, labelspace):
36 | raise NotImplementedError
37 |
38 | @staticmethod
39 | def streams_get_external_stream_with_label_space(streams, labelspace):
40 | raise NotImplementedError
41 |
42 | @staticmethod
43 | def streams_get_data_sources(streams):
44 | raise NotImplementedError
45 |
46 | @staticmethod
47 | def streams_get_copy(id, client):
48 | raise NotImplementedError
49 |
50 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/support_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # Support
3 | #-------------------------------------------------------------------------------
4 |
5 | class SupportAbstractAPI:
6 | @staticmethod
7 | def init_support_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_support_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def support_delete(support):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def support_is_domain_mesh_support(support):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def support_set_as_domain_mesh_support(support, meshed_region):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def support_get_as_meshed_support(support):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def support_get_as_cyclic_support(support):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def support_get_as_time_freq_support(support):
36 | raise NotImplementedError
37 |
38 | @staticmethod
39 | def support_get_field_support_by_property(support, prop_name):
40 | raise NotImplementedError
41 |
42 | @staticmethod
43 | def support_get_property_field_support_by_property(support, prop_name):
44 | raise NotImplementedError
45 |
46 | @staticmethod
47 | def support_get_string_field_support_by_property(support, prop_name):
48 | raise NotImplementedError
49 |
50 | @staticmethod
51 | def support_get_property_names_as_string_coll_for_fields(support):
52 | raise NotImplementedError
53 |
54 | @staticmethod
55 | def support_get_property_names_as_string_coll_for_property_fields(support):
56 | raise NotImplementedError
57 |
58 | @staticmethod
59 | def support_get_property_names_as_string_coll_for_string_fields(support):
60 | raise NotImplementedError
61 |
62 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/support_query_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # SupportQuery
3 | #-------------------------------------------------------------------------------
4 |
5 | class SupportQueryAbstractAPI:
6 | @staticmethod
7 | def init_support_query_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_support_query_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def support_query_all_entities(supportQuery, requested_location):
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def support_query_scoping_by_property(supportQuery, requested_location, prop_name, prop_number):
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def support_query_rescoping_by_property(supportQuery, scoping, prop_name, prop_number):
24 | raise NotImplementedError
25 |
26 | @staticmethod
27 | def support_query_scoping_by_named_selection(supportQuery, requested_location, namedSelection):
28 | raise NotImplementedError
29 |
30 | @staticmethod
31 | def support_query_transpose_scoping(supportQuery, scoping, bInclusive):
32 | raise NotImplementedError
33 |
34 | @staticmethod
35 | def support_query_topology_by_scoping(supportQuery, scoping, topologyRequest):
36 | raise NotImplementedError
37 |
38 | @staticmethod
39 | def support_query_data_by_scoping(supportQuery, scoping, domainsDataRequest):
40 | raise NotImplementedError
41 |
42 | @staticmethod
43 | def support_query_string_field(supportQuery, strRequest):
44 | raise NotImplementedError
45 |
46 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/tmp_dir_abstract_api.py:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # TmpDir
3 | #-------------------------------------------------------------------------------
4 |
5 | class TmpDirAbstractAPI:
6 | @staticmethod
7 | def init_tmp_dir_environment(object):
8 | pass
9 |
10 | @staticmethod
11 | def finish_tmp_dir_environment(object):
12 | pass
13 |
14 | @staticmethod
15 | def tmp_dir_get_dir():
16 | raise NotImplementedError
17 |
18 | @staticmethod
19 | def tmp_dir_erase():
20 | raise NotImplementedError
21 |
22 | @staticmethod
23 | def tmp_dir_get_dir_on_client(client):
24 | raise NotImplementedError
25 |
26 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generated/tmp_dir_capi.py:
--------------------------------------------------------------------------------
1 | import ctypes
2 | from ansys.dpf.gate import utils
3 | from ansys.dpf.gate import errors
4 | from ansys.dpf.gate.generated import capi
5 | from ansys.dpf.gate.generated import tmp_dir_abstract_api
6 | from ansys.dpf.gate.generated.data_processing_capi import DataProcessingCAPI
7 |
8 | #-------------------------------------------------------------------------------
9 | # TmpDir
10 | #-------------------------------------------------------------------------------
11 |
12 | class TmpDirCAPI(tmp_dir_abstract_api.TmpDirAbstractAPI):
13 |
14 | @staticmethod
15 | def init_tmp_dir_environment(object):
16 | # get core api
17 | DataProcessingCAPI.init_data_processing_environment(object)
18 | object._deleter_func = (DataProcessingCAPI.data_processing_delete_shared_object, lambda obj: obj)
19 |
20 | @staticmethod
21 | def tmp_dir_get_dir():
22 | errorSize = ctypes.c_int(0)
23 | sError = ctypes.c_wchar_p()
24 | res = capi.dll.TmpDir_getDir(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
25 | if errorSize.value != 0:
26 | raise errors.DPFServerException(sError.value)
27 | newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None
28 | capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError))
29 | return newres
30 |
31 | @staticmethod
32 | def tmp_dir_erase():
33 | errorSize = ctypes.c_int(0)
34 | sError = ctypes.c_wchar_p()
35 | res = capi.dll.TmpDir_erase(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
36 | if errorSize.value != 0:
37 | raise errors.DPFServerException(sError.value)
38 | return res
39 |
40 | @staticmethod
41 | def tmp_dir_get_dir_on_client(client):
42 | errorSize = ctypes.c_int(0)
43 | sError = ctypes.c_wchar_p()
44 | res = capi.dll.TmpDir_getDir_on_client(client._internal_obj if client is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError))
45 | if errorSize.value != 0:
46 | raise errors.DPFServerException(sError.value)
47 | newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None
48 | capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError))
49 | return newres
50 |
51 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/generic_support_grpcapi.py:
--------------------------------------------------------------------------------
1 | from ansys.dpf.gate import errors, data_processing_grpcapi
2 | from ansys.dpf.gate.generated import generic_support_abstract_api
3 |
4 | # -------------------------------------------------------------------------------
5 | # GenericSupport
6 | # ------------------------------------------------------------------------------
7 |
8 | def _get_stub(server):
9 | return server.get_stub(GenericSupportGRPCAPI.STUBNAME)
10 |
11 |
12 | @errors.protect_grpc_class
13 | class GenericSupportGRPCAPI(generic_support_abstract_api.GenericSupportAbstractAPI):
14 | STUBNAME = "generic_support_stub"
15 |
16 | @staticmethod
17 | def init_generic_support_environment(object):
18 | from ansys.grpc.dpf import generic_support_pb2_grpc
19 | object._server.create_stub_if_necessary(GenericSupportGRPCAPI.STUBNAME,
20 | generic_support_pb2_grpc.GenericSupportServiceStub)
21 | data_processing_grpcapi.DataProcessingGRPCAPI.init_data_processing_environment(object)
22 | object._deleter_func = (data_processing_grpcapi._get_stub(object._server).Delete, lambda obj: obj._internal_obj)
23 |
24 | @staticmethod
25 | def _generic_support_set_field_support_of_property(support, name, field):
26 | from ansys.grpc.dpf import generic_support_pb2
27 | request = generic_support_pb2.UpdateRequest()
28 | request.support.CopyFrom(support._internal_obj)
29 | request.field_supports.get_or_create(name).CopyFrom(field._internal_obj)
30 | return _get_stub(support._server).Update(request)
31 |
32 | @staticmethod
33 | def generic_support_set_field_support_of_property(support, name, field):
34 | return GenericSupportGRPCAPI._generic_support_set_field_support_of_property(
35 | support, name, field
36 | )
37 |
38 | @staticmethod
39 | def generic_support_set_property_field_support_of_property(support, name, field):
40 | return GenericSupportGRPCAPI._generic_support_set_field_support_of_property(
41 | support, name, field
42 | )
43 |
44 | @staticmethod
45 | def generic_support_set_string_field_support_of_property(support, name, field):
46 | return GenericSupportGRPCAPI._generic_support_set_field_support_of_property(
47 | support, name, field
48 | )
49 |
50 | @staticmethod
51 | def generic_support_new_on_client(client, name):
52 | from ansys.grpc.dpf import generic_support_pb2
53 | request = generic_support_pb2.CreateRequest()
54 | request.location = name
55 | return _get_stub(client).Create(request)
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/label_space_grpcapi.py:
--------------------------------------------------------------------------------
1 | from ansys.dpf.gate.generated import label_space_abstract_api
2 |
3 | #-------------------------------------------------------------------------------
4 | # LabelSpace
5 | #-------------------------------------------------------------------------------
6 |
7 | class LabelSpaceGRPCAPI(label_space_abstract_api.LabelSpaceAbstractAPI):
8 |
9 | @staticmethod
10 | def init_label_space_environment(object):
11 | object._deleter_func = (lambda obj:None, lambda obj: obj._internal_obj)
12 |
13 | @staticmethod
14 | def label_space_new_for_object(object):
15 | from ansys.grpc.dpf import collection_pb2
16 | if hasattr(collection_pb2, "LabelSpace"):
17 | return collection_pb2.LabelSpace()
18 | from ansys.grpc.dpf import label_space_pb2
19 | return label_space_pb2.LabelSpace()
20 |
21 | @staticmethod
22 | def label_space_add_data(space, label, id):
23 | space._internal_obj.label_space[label] = id
24 |
25 | @staticmethod
26 | def label_space_get_size(space):
27 | return len(space._internal_obj.label_space)
28 |
29 | @staticmethod
30 | def label_space_get_labels_name(space, index):
31 | for i, tuple in enumerate(space._internal_obj.label_space):
32 | if i == index:
33 | return tuple
34 |
35 | @staticmethod
36 | def label_space_get_labels_value(space, index):
37 | for i, tuple in enumerate(space._internal_obj.label_space.items()):
38 | if i == index:
39 | return tuple[1]
40 |
41 | @staticmethod
42 | def list_label_spaces_size(list):
43 | return len(list._internal_obj)
44 |
45 | @staticmethod
46 | def list_label_spaces_at(list, index):
47 | return list._internal_obj[index]
48 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/misc.py:
--------------------------------------------------------------------------------
1 | DEFAULT_FILE_CHUNK_SIZE = None
2 | COMMON_PROGRESS_BAR = None
3 | class LocalClientConfig(dict):
4 | """Behaves as a RuntimeClientConfig"""
5 | __delattr__ = dict.__delitem__
6 | __len__ = dict.__len__
7 |
8 | def copy_config(self, config):
9 | config._data_tree.add(**self)
10 |
11 | def __getattr__(self, key):
12 | if key == "stream_floats_instead_of_doubles":
13 | return self["stream_floats"]
14 | return self.__getitem__(key)
15 |
16 | def __setattr__(self, key, value):
17 | if key == "stream_floats_instead_of_doubles":
18 | self["stream_floats"] = value
19 | return self.__setitem__(key, value)
20 |
21 |
22 | _CLIENT_CONFIG = LocalClientConfig()
23 |
24 | def client_config():
25 | if len(_CLIENT_CONFIG) == 0:
26 | _CLIENT_CONFIG.use_cache = False
27 | _CLIENT_CONFIG.streaming_buffer_size = DEFAULT_FILE_CHUNK_SIZE
28 | _CLIENT_CONFIG.stream_floats_instead_of_doubles = False
29 | _CLIENT_CONFIG.return_arrays = True
30 | return _CLIENT_CONFIG
31 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/object_handler.py:
--------------------------------------------------------------------------------
1 |
2 | class ObjHandler:
3 | def __init__(self, data_processing_api, internal_obj=None, server=None):
4 | self._internal_obj = internal_obj
5 | self.data_processing_api = data_processing_api
6 | self._server = server
7 | self.owned = False
8 |
9 | def get_ownership(self):
10 | self.owned = True
11 | if hasattr(self._internal_obj, "id"):
12 | if isinstance(self._internal_obj.id, int) and self._internal_obj.id!=0:
13 | return self._internal_obj
14 | elif hasattr(self._internal_obj.id, "id") and self._internal_obj.id.id!=0:
15 | return self._internal_obj
16 |
17 | def __del__(self):
18 | try:
19 | if hasattr(self, "_internal_obj") and not self.owned:
20 | self.data_processing_api.data_processing_delete_shared_object(self)
21 | except Exception as e:
22 | pass
23 | # print("Deletion failed:", e)
24 |
25 |
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/settings.py:
--------------------------------------------------------------------------------
1 |
2 | def forward_settings(default_file_chunk_size, common_progress_bar):
3 | from ansys.dpf.gate import misc
4 | misc.DEFAULT_FILE_CHUNK_SIZE = default_file_chunk_size
5 | misc.COMMON_PROGRESS_BAR = common_progress_bar
--------------------------------------------------------------------------------
/src/ansys/dpf/gate/tmp_dir_grpcapi.py:
--------------------------------------------------------------------------------
1 | from ansys.dpf.gate.data_processing_grpcapi import DataProcessingGRPCAPI
2 | from ansys.dpf.gate.generated import tmp_dir_abstract_api
3 | #-------------------------------------------------------------------------------
4 | # TmpDir
5 | #-------------------------------------------------------------------------------
6 |
7 | def _get_stub(server):
8 | from ansys.grpc.dpf import base_pb2_grpc
9 | server.create_stub_if_necessary(DataProcessingGRPCAPI.STUBNAME, base_pb2_grpc.BaseServiceStub)
10 | return server.get_stub(DataProcessingGRPCAPI.STUBNAME)
11 |
12 | class TmpDirGRPCAPI(tmp_dir_abstract_api.TmpDirAbstractAPI):
13 | STUBNAME = "core_stub"
14 |
15 | @staticmethod
16 | def tmp_dir_get_dir_on_client(client):
17 | from ansys.grpc.dpf import base_pb2
18 | request = base_pb2.Empty()
19 | return _get_stub(client).CreateTmpDir(request).server_file_path
--------------------------------------------------------------------------------
/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll
--------------------------------------------------------------------------------
/src/ansys/dpf/gatebin/DPFClientAPI.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/src/ansys/dpf/gatebin/DPFClientAPI.dll
--------------------------------------------------------------------------------
/src/ansys/dpf/gatebin/_version.py:
--------------------------------------------------------------------------------
1 | """Version for ansys-dpf-gatebin"""
2 | # major, minor, patch
3 | version_info = 0, 8, "0.dev0"
4 |
5 | # Nice string for the version
6 | __version__ = ".".join(map(str, version_info))
--------------------------------------------------------------------------------
/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so
--------------------------------------------------------------------------------
/src/ansys/dpf/gatebin/libDPFClientAPI.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/src/ansys/dpf/gatebin/libDPFClientAPI.so
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/__init__.py:
--------------------------------------------------------------------------------
1 | from ansys.grpc.dpf._version import __version__
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/_version.py:
--------------------------------------------------------------------------------
1 | """ansys-grpc-dpf python protocol version"""
2 | __version__ = '0.12.0dev0' # major.minor.patch
3 |
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/available_result_pb2_grpc.py:
--------------------------------------------------------------------------------
1 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2 | """Client and server classes corresponding to protobuf-defined services."""
3 | import grpc
4 |
5 |
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/collection_message_pb2.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by the protocol buffer compiler. DO NOT EDIT!
3 | # source: collection_message.proto
4 | # Protobuf Python Version: 4.25.1
5 | """Generated protocol buffer code."""
6 | from google.protobuf import descriptor as _descriptor
7 | from google.protobuf import descriptor_pool as _descriptor_pool
8 | from google.protobuf import symbol_database as _symbol_database
9 | from google.protobuf.internal import builder as _builder
10 | # @@protoc_insertion_point(imports)
11 |
12 | _sym_db = _symbol_database.Default()
13 |
14 |
15 | import ansys.grpc.dpf.base_pb2 as base__pb2
16 |
17 |
18 | DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x63ollection_message.proto\x12\x1b\x61nsys.api.dpf.collection.v0\x1a\nbase.proto\"l\n\nCollection\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.TypeB\x1e\xaa\x02\x1b\x41nsys.Api.Dpf.Collection.v0b\x06proto3')
19 |
20 | _globals = globals()
21 | _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
22 | _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'collection_message_pb2', _globals)
23 | if _descriptor._USE_C_DESCRIPTORS == False:
24 | _globals['DESCRIPTOR']._options = None
25 | _globals['DESCRIPTOR']._serialized_options = b'\252\002\033Ansys.Api.Dpf.Collection.v0'
26 | _globals['_COLLECTION']._serialized_start=69
27 | _globals['_COLLECTION']._serialized_end=177
28 | # @@protoc_insertion_point(module_scope)
29 |
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/collection_message_pb2_grpc.py:
--------------------------------------------------------------------------------
1 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2 | """Client and server classes corresponding to protobuf-defined services."""
3 | import grpc
4 |
5 |
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/dpf_any_message_pb2.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by the protocol buffer compiler. DO NOT EDIT!
3 | # source: dpf_any_message.proto
4 | # Protobuf Python Version: 4.25.1
5 | """Generated protocol buffer code."""
6 | from google.protobuf import descriptor as _descriptor
7 | from google.protobuf import descriptor_pool as _descriptor_pool
8 | from google.protobuf import symbol_database as _symbol_database
9 | from google.protobuf.internal import builder as _builder
10 | # @@protoc_insertion_point(imports)
11 |
12 | _sym_db = _symbol_database.Default()
13 |
14 |
15 | import ansys.grpc.dpf.base_pb2 as base__pb2
16 |
17 |
18 | DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x64pf_any_message.proto\x12 ansys.api.dpf.dpf_any_message.v0\x1a\nbase.proto\"=\n\x06\x44pfAny\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifierB!\xaa\x02\x1e\x41nsys.Api.Dpf.DpfAnyMessage.V0b\x06proto3')
19 |
20 | _globals = globals()
21 | _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
22 | _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'dpf_any_message_pb2', _globals)
23 | if _descriptor._USE_C_DESCRIPTORS == False:
24 | _globals['DESCRIPTOR']._options = None
25 | _globals['DESCRIPTOR']._serialized_options = b'\252\002\036Ansys.Api.Dpf.DpfAnyMessage.V0'
26 | _globals['_DPFANY']._serialized_start=71
27 | _globals['_DPFANY']._serialized_end=132
28 | # @@protoc_insertion_point(module_scope)
29 |
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/dpf_any_message_pb2_grpc.py:
--------------------------------------------------------------------------------
1 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2 | """Client and server classes corresponding to protobuf-defined services."""
3 | import grpc
4 |
5 |
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/label_space_pb2.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by the protocol buffer compiler. DO NOT EDIT!
3 | # source: label_space.proto
4 | # Protobuf Python Version: 4.25.1
5 | """Generated protocol buffer code."""
6 | from google.protobuf import descriptor as _descriptor
7 | from google.protobuf import descriptor_pool as _descriptor_pool
8 | from google.protobuf import symbol_database as _symbol_database
9 | from google.protobuf.internal import builder as _builder
10 | # @@protoc_insertion_point(imports)
11 |
12 | _sym_db = _symbol_database.Default()
13 |
14 |
15 |
16 |
17 | DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11label_space.proto\x12\x1c\x61nsys.api.dpf.label_space.v0\"\x8e\x01\n\nLabelSpace\x12M\n\x0blabel_space\x18\x01 \x03(\x0b\x32\x38.ansys.api.dpf.label_space.v0.LabelSpace.LabelSpaceEntry\x1a\x31\n\x0fLabelSpaceEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x42\x1e\xaa\x02\x1b\x41nsys.Api.Dpf.LabelSpace.v0b\x06proto3')
18 |
19 | _globals = globals()
20 | _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21 | _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'label_space_pb2', _globals)
22 | if _descriptor._USE_C_DESCRIPTORS == False:
23 | _globals['DESCRIPTOR']._options = None
24 | _globals['DESCRIPTOR']._serialized_options = b'\252\002\033Ansys.Api.Dpf.LabelSpace.v0'
25 | _globals['_LABELSPACE_LABELSPACEENTRY']._options = None
26 | _globals['_LABELSPACE_LABELSPACEENTRY']._serialized_options = b'8\001'
27 | _globals['_LABELSPACE']._serialized_start=52
28 | _globals['_LABELSPACE']._serialized_end=194
29 | _globals['_LABELSPACE_LABELSPACEENTRY']._serialized_start=145
30 | _globals['_LABELSPACE_LABELSPACEENTRY']._serialized_end=194
31 | # @@protoc_insertion_point(module_scope)
32 |
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/label_space_pb2_grpc.py:
--------------------------------------------------------------------------------
1 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2 | """Client and server classes corresponding to protobuf-defined services."""
3 | import grpc
4 |
5 |
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/support_pb2.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by the protocol buffer compiler. DO NOT EDIT!
3 | # source: support.proto
4 | # Protobuf Python Version: 4.25.1
5 | """Generated protocol buffer code."""
6 | from google.protobuf import descriptor as _descriptor
7 | from google.protobuf import descriptor_pool as _descriptor_pool
8 | from google.protobuf import symbol_database as _symbol_database
9 | from google.protobuf.internal import builder as _builder
10 | # @@protoc_insertion_point(imports)
11 |
12 | _sym_db = _symbol_database.Default()
13 |
14 |
15 | import ansys.grpc.dpf.base_pb2 as base__pb2
16 |
17 |
18 | DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsupport.proto\x12\x18\x61nsys.api.dpf.support.v0\x1a\nbase.proto\"i\n\x07Support\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.TypeB\x1b\xaa\x02\x18\x41nsys.Api.Dpf.Support.v0b\x06proto3')
19 |
20 | _globals = globals()
21 | _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
22 | _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'support_pb2', _globals)
23 | if _descriptor._USE_C_DESCRIPTORS == False:
24 | _globals['DESCRIPTOR']._options = None
25 | _globals['DESCRIPTOR']._serialized_options = b'\252\002\030Ansys.Api.Dpf.Support.v0'
26 | _globals['_SUPPORT']._serialized_start=55
27 | _globals['_SUPPORT']._serialized_end=160
28 | # @@protoc_insertion_point(module_scope)
29 |
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/support_pb2_grpc.py:
--------------------------------------------------------------------------------
1 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2 | """Client and server classes corresponding to protobuf-defined services."""
3 | import grpc
4 |
5 |
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/workflow_message_pb2.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by the protocol buffer compiler. DO NOT EDIT!
3 | # source: workflow_message.proto
4 | # Protobuf Python Version: 4.25.1
5 | """Generated protocol buffer code."""
6 | from google.protobuf import descriptor as _descriptor
7 | from google.protobuf import descriptor_pool as _descriptor_pool
8 | from google.protobuf import symbol_database as _symbol_database
9 | from google.protobuf.internal import builder as _builder
10 | # @@protoc_insertion_point(imports)
11 |
12 | _sym_db = _symbol_database.Default()
13 |
14 |
15 | import ansys.grpc.dpf.base_pb2 as base__pb2
16 |
17 |
18 | DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16workflow_message.proto\x12!ansys.api.dpf.workflow_message.v0\x1a\nbase.proto\"?\n\x08Workflow\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifierB#\xaa\x02 Ansys.Api.Dpf.WorkflowMessage.V0b\x06proto3')
19 |
20 | _globals = globals()
21 | _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
22 | _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'workflow_message_pb2', _globals)
23 | if _descriptor._USE_C_DESCRIPTORS == False:
24 | _globals['DESCRIPTOR']._options = None
25 | _globals['DESCRIPTOR']._serialized_options = b'\252\002 Ansys.Api.Dpf.WorkflowMessage.V0'
26 | _globals['_WORKFLOW']._serialized_start=73
27 | _globals['_WORKFLOW']._serialized_end=136
28 | # @@protoc_insertion_point(module_scope)
29 |
--------------------------------------------------------------------------------
/src/ansys/grpc/dpf/workflow_message_pb2_grpc.py:
--------------------------------------------------------------------------------
1 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2 | """Client and server classes corresponding to protobuf-defined services."""
3 | import grpc
4 |
5 |
--------------------------------------------------------------------------------
/testing.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Unit Testing
4 |
5 | Once ansys-dpf-core package is installed (see README.md), unit tests can be run
6 | by installing the testing requirements with `pip install -r requirements/requirements_test.txt` and then running pytest with:
7 |
8 | ```
9 | pytest
10 | ```
11 |
12 | If you have ANSYS v2021R1 or newer installed locally, the unit tests will
13 | automatically start up the DPF server and run the tests. If you need
14 | to disable this and have the unit tests run against a remote server,
15 | setup the following environment variables:
16 |
17 | ```
18 | set DPF_START_SERVER=False
19 | set DPF_IP=
20 | set DPF_PORT=
21 | ```
22 |
--------------------------------------------------------------------------------
/tests/entry/pytest.ini:
--------------------------------------------------------------------------------
1 | [pytest]
2 | filterwarnings =
3 | ignore::FutureWarning
4 | ignore::PendingDeprecationWarning
5 | ignore::DeprecationWarning
--------------------------------------------------------------------------------
/tests/operators/test_change_shell_layers.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | # Tests the utility.change_shell_layers operator
24 |
25 | import ansys.dpf.core as dpf
26 | from ansys.dpf.core import examples
27 |
28 |
29 | def test_operator_change_shell_layers_connect_enum(server_type):
30 | model = dpf.Model(
31 | examples.download_all_kinds_of_complexity_modal(server=server_type), server=server_type
32 | )
33 |
34 | stress = model.results.stress()
35 | stress.inputs.requested_location.connect("Nodal")
36 |
37 | # Test connection through signature
38 | change_shell_layers = dpf.operators.utility.change_shell_layers(
39 | fields_container=stress, e_shell_layer=dpf.common.shell_layers.bottom, server=server_type
40 | )
41 | _ = change_shell_layers.eval()
42 |
43 | # Test connection through Input.connect
44 | change_shell_layers = dpf.operators.utility.change_shell_layers(server=server_type)
45 | change_shell_layers.inputs.fields_container.connect(stress)
46 | change_shell_layers.inputs.e_shell_layer.connect(dpf.common.shell_layers.bottom)
47 | _ = change_shell_layers.eval()
48 |
49 | # Test connection through Inputs.connect
50 | change_shell_layers = dpf.operators.utility.change_shell_layers(server=server_type)
51 | change_shell_layers.inputs.connect(stress)
52 | change_shell_layers.inputs.connect(dpf.common.shell_layers.bottom)
53 | _ = change_shell_layers.eval()
54 |
--------------------------------------------------------------------------------
/tests/operators/test_coordinate_system.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | # Tests the result.coordinate_system operator
24 | import numpy as np
25 |
26 | import ansys.dpf.core as dpf
27 | from ansys.dpf.core import examples
28 | import conftest
29 |
30 |
31 | def test_operator_coordinate_system_rst(server_type):
32 | model = dpf.Model(examples.download_hemisphere(server=server_type), server=server_type)
33 | if conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1:
34 | # Starting with DPF 2025.1.pre1
35 | cs = dpf.operators.result.coordinate_system(server=server_type)
36 | cs.inputs.data_sources.connect(model)
37 | else:
38 | # For previous DPF versions
39 | cs = model.operator(r"mapdl::rst::CS")
40 | cs.inputs.cs_id.connect(12)
41 | cs_rot_mat = cs.outputs.field().data
42 | ref = np.array(
43 | [
44 | [
45 | -0.18966565,
46 | 0.91517569,
47 | 0.35564083,
48 | -0.91517569,
49 | -0.03358143,
50 | -0.40165376,
51 | -0.35564083,
52 | -0.40165376,
53 | 0.84391579,
54 | 4.74164122,
55 | 22.87939222,
56 | 8.89102077,
57 | ]
58 | ]
59 | )
60 | assert np.allclose(cs_rot_mat.data, ref)
61 |
--------------------------------------------------------------------------------
/tests/operators/test_operator_elemental_mass.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | import pytest
24 |
25 | import ansys.dpf.core as dpf
26 | import conftest
27 |
28 |
29 | @pytest.mark.skipif(
30 | not conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_2,
31 | reason="Elemental mass operator not functional before 8.2,",
32 | )
33 | def test_operator_elemental_mass_rst(allkindofcomplexity):
34 | model = dpf.Model(allkindofcomplexity)
35 | op = dpf.operators.result.elemental_mass(data_sources=model)
36 | fc = op.eval()
37 | assert len(fc) == 1
38 | field: dpf.Field = fc[0]
39 | assert field.scoping.size == 9271
40 | assert field.component_count == 1
41 | assert field.location == dpf.locations.elemental
42 | assert field.unit == "kg"
43 |
--------------------------------------------------------------------------------
/tests/test_animation.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | import os
24 | from pathlib import Path
25 |
26 | import pytest
27 |
28 | from ansys.dpf import core as dpf
29 | from ansys.dpf.core import animation, examples, misc
30 |
31 | if misc.module_exists("pyvista"):
32 | HAS_PYVISTA = True
33 | else:
34 | HAS_PYVISTA = False
35 |
36 | gif_name = "test.gif"
37 |
38 |
39 | @pytest.fixture(autouse=False)
40 | def remove_gifs(request):
41 | """Remove GIF once finished."""
42 |
43 | def remove_gif():
44 | if Path.cwd().joinpath(gif_name).exists():
45 | Path.cwd().joinpath(gif_name).unlink()
46 |
47 | request.addfinalizer(remove_gif)
48 |
49 |
50 | @pytest.fixture()
51 | def displacement_fields():
52 | model = dpf.Model(examples.download_all_kinds_of_complexity_modal())
53 | result = model.results.displacement.on_all_time_freqs.eval()
54 | return result
55 |
56 |
57 | def test_animate_mode(displacement_fields):
58 | animation.animate_mode(displacement_fields, mode_number=10)
59 |
60 |
61 | def test_animate_mode_positive_disp(displacement_fields):
62 | animation.animate_mode(displacement_fields, mode_number=3, type_mode=1)
63 |
64 |
65 | def test_animator_animate_mode_fields_container_one_component(displacement_fields):
66 | animation.animate_mode(displacement_fields.select_component(0), mode_number=10)
67 |
--------------------------------------------------------------------------------
/tests/test_hdf5.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | from ansys.dpf import core
24 |
25 | # try:
26 | # core.BaseService(load_operators=False)._load_hdf5_operators()
27 | # hdf5_loaded = True
28 | # except OSError:
29 | # hdf5_loaded = False
30 |
31 | # skip_no_hdf5 = pytest.mark.skipif(not hdf5_loaded, reason='Requires HDF5 operators')
32 |
33 |
34 | # @skip_no_hdf5
35 | def test_hdf5_loaded():
36 | op = core.Operator("serialize_to_hdf5")
37 | assert op.inputs is not None
38 |
39 |
40 | # @skip_no_hdf5
41 | def test_hdf5_ellipsis_any_pins(simple_bar, tmpdir):
42 | tmp_path = str(tmpdir.join("hdf5.h5"))
43 | model = core.Model(simple_bar)
44 | u = model.results.displacement()
45 | s = model.operator("S")
46 | op = core.Operator("serialize_to_hdf5")
47 | op.inputs.file_path.connect(tmp_path)
48 | op.inputs.data1.connect(u.outputs)
49 | op.inputs.data2.connect(s.outputs)
50 | assert len(op.inputs._connected_inputs) == 3
51 |
--------------------------------------------------------------------------------
/tests/test_label_space.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | import ansys.dpf.core as dpf
24 |
25 |
26 | def test_label_space_(server_type):
27 | reference = {"test": 1, "various": 2}
28 | ls = dpf.LabelSpace(label_space=reference)
29 | assert dict(ls) == reference
30 | assert str(ls)
31 | reference = {"test": 1, "various": 2}
32 | ls.fill(label_space=reference)
33 |
--------------------------------------------------------------------------------
/tests/test_parallel.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | """
24 | Verify all examples can be accessed or downloaded
25 |
26 | """
27 |
28 | import pytest
29 |
30 | from ansys.dpf import core as dpf
31 | from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_4_0
32 |
33 |
34 | @pytest.mark.skipif(
35 | not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_4_0,
36 | reason="Requires server version higher than 4.0",
37 | )
38 | def test_num_threads():
39 | op = dpf.operators.averaging.elemental_nodal_to_nodal_fc()
40 | c = op.config
41 | nOrg = c.get_num_threads_option()
42 | assert nOrg == "0" # defaults to 0
43 | c.set_num_threads_option(5)
44 | op.config = c
45 | assert op.config.get_num_threads_option() == "5"
46 |
--------------------------------------------------------------------------------
/tests/test_version.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | import pytest
24 |
25 | from ansys.dpf.core._version import server_to_ansys_version
26 |
27 |
28 | @pytest.mark.parametrize(
29 | "server_version,ansys_version",
30 | [
31 | # Current DPF versioning
32 | ("1.0", "2021R1"),
33 | ("2.0", "2021R2"),
34 | ("2.1", "2021R2"),
35 | ("3.0", "2022R1"),
36 | ("2023.0", "3032R1"),
37 | ("2023.1.12", "3032R1"),
38 | ],
39 | )
40 | def test_server_to_ansys_version(server_version, ansys_version):
41 | assert server_to_ansys_version[server_version] == ansys_version
42 |
--------------------------------------------------------------------------------
/tests/testfiles/csvToField/fields_container.csv:
--------------------------------------------------------------------------------
1 | version,0,,,,,
2 | analysis,,,,,,
3 | num_sets,4,,,,,
4 | storage_type,0,,,,,
5 | unit,Pa,,,,,
6 | dim,sym matrix,3,3,,,
7 | location,ElementalNodal,,,,,
8 | shellLayer,0,,,,,
9 | ,,,,,,
10 | ,,,,,,
11 | ,,,,,,
12 | ,,,,,,
13 | ,step,sub_step,cumulative_index,,,
14 | set,1,1,1,,,
15 | ,SXX,SYY,SZZ,SXY,SYZ,SXZ
16 | Scoping,,,,,,
17 | 1,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
18 | 2,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
19 | 3,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
20 | 4,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
21 | 5,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
22 | end_of_set,,,,,,
23 | ,step,sub_step,cumulative index,,,
24 | set,1,2,2,,,
25 | ,SXX,SYY,SZZ,SXY,SYZ,SXZ
26 | Scoping,,,,,,
27 | 1,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
28 | 2,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
29 | 3,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
30 | 4,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
31 | 5,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
32 | end_of_set,,,,,,
33 | ,step,sub_step,cumulative index,,,
34 | set,1,3,3,,,
35 | ,SXX,SYY,SZZ,SXY,SYZ,SXZ
36 | Scoping,,,,,,
37 | 1,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
38 | 2,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
39 | 3,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
40 | 4,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
41 | 5,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
42 | end_of_set,,,,,,
43 | ,step,sub_step,cumulative index,,,
44 | set,2,1,4,,,
45 | ,SXX,SYY,SZZ,SXY,SYZ,SXZ
46 | Scoping,,,,,,
47 | 1,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
48 | 2,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
49 | 3,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
50 | 4,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
51 | 5,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00,1.00E+00
52 |
--------------------------------------------------------------------------------
/tests/testfiles/cyclic/file.rst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/tests/testfiles/cyclic/file.rst
--------------------------------------------------------------------------------
/tests/testfiles/d3plot/d3plot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/tests/testfiles/d3plot/d3plot
--------------------------------------------------------------------------------
/tests/testfiles/d3plot/d3plot01:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/tests/testfiles/d3plot/d3plot01
--------------------------------------------------------------------------------
/tests/testfiles/d3plot/d3plot02:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/tests/testfiles/d3plot/d3plot02
--------------------------------------------------------------------------------
/tests/testfiles/d3plot/file.actunits:
--------------------------------------------------------------------------------
1 | SOLV_MPA
2 |
--------------------------------------------------------------------------------
/tests/testfiles/engineeringData/file.rst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/tests/testfiles/engineeringData/file.rst
--------------------------------------------------------------------------------
/tests/testfiles/pythonPlugins/all_types/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | from all_types.load_operators_func import load_operators
24 |
--------------------------------------------------------------------------------
/tests/testfiles/pythonPlugins/operator_with_spec.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | from ansys.dpf.core import Field
24 | from ansys.dpf.core.custom_operator import CustomOperatorBase, record_operator
25 | from ansys.dpf.core.operator_specification import (
26 | CustomSpecification,
27 | PinSpecification,
28 | SpecificationProperties,
29 | )
30 |
31 |
32 | class AddFloatToFieldData(CustomOperatorBase):
33 | def run(self):
34 | field = self.get_input(0, Field)
35 | to_add = self.get_input(1, float)
36 | data = field.data
37 | data += to_add
38 | self.set_output(0, field)
39 | self.set_succeeded()
40 |
41 | @property
42 | def specification(self):
43 | spec = CustomSpecification()
44 | spec.description = "Add a custom value to all the data of an input Field"
45 | spec.inputs = {
46 | 0: PinSpecification("field", [Field], "Field on which float value is added."),
47 | 1: PinSpecification("to_add", [float], "Data to add."),
48 | }
49 | spec.outputs = {
50 | 0: PinSpecification("field", [Field], "Field on which the float value is added.")
51 | }
52 | spec.properties = SpecificationProperties("custom add to field", "math")
53 | return spec
54 |
55 | @property
56 | def name(self):
57 | return "custom_add_to_field"
58 |
59 |
60 | def load_operators(*args):
61 | record_operator(AddFloatToFieldData, *args)
62 |
--------------------------------------------------------------------------------
/tests/testfiles/pythonPlugins/syntax_error_plugin/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | from syntax_error_plugin.load_operators_func import load_operators
24 |
--------------------------------------------------------------------------------
/tests/testfiles/pythonPlugins/syntax_error_plugin/load_operators_func.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 - 2025 ANSYS, Inc. and/or its affiliates.
2 | # SPDX-License-Identifier: MIT
3 | #
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 |
23 | from ansys.dpf.core.custom_operator import CustomOperatorBase, record_operator
24 |
25 |
26 | class SyntaxeError(CustomOperatorBase):
27 | def run(self):
28 | f = self.get_input(0, int)
29 | self.set_ouuuuuutput(0, f)
30 | self.set_succeeded()
31 |
32 | @property
33 | def specification(self):
34 | return None
35 |
36 | @property
37 | def name(self):
38 | return "raising"
39 |
40 |
41 | def load_operators(*args):
42 | record_operator(SyntaxeError, *args)
43 |
--------------------------------------------------------------------------------
/tests/testfiles/rst_operators/multishells.rst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/tests/testfiles/rst_operators/multishells.rst
--------------------------------------------------------------------------------
/tests/testfiles/rst_operators/simpleModel.rst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/tests/testfiles/rst_operators/simpleModel.rst
--------------------------------------------------------------------------------
/tests/testfiles/rst_operators/velocity_acceleration.rst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ansys/pydpf-core/eb49e98cab843860974a87ee3eb7fcab76447445/tests/testfiles/rst_operators/velocity_acceleration.rst
--------------------------------------------------------------------------------