-
Notifications
You must be signed in to change notification settings - Fork 136
feat: using dpf instead of reader in "results" module #1300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1300 +/- ##
==========================================
- Coverage 91.81% 90.95% -0.86%
==========================================
Files 187 189 +2
Lines 15033 15666 +633
==========================================
+ Hits 13802 14249 +447
- Misses 1231 1417 +186 🚀 New features to boost your workflow:
|
Fundamentally, this all needs to be moved to DPF-Post and DPF post needs to have an even simpler API. Right now we have:
I'd rather not make a 5th. There's a potential new hire that will work for the PyAnsys team on DPF-Post and I'd like him to work on this along with you. |
On-hold for the moment until I see how pydpf-post develops. |
Closing because I do not have the capacity for this. I think eventually we should use |
for more information, see https://pre-commit.ci
…test completion logging
…/pymapdl into feat/using-dpf-for-results
(Most of the general info has been moved to #4084)
Migrate most of the backend and set the foundations for following PRs. Aiming to migrate most of the numerical methods. Plotting will be in a follow up PR.
Launch DPF when running in containerThis should not be part of PyMAPDL since if it is local, it will be automatically detected, and if it is remote, we should not own that resource. It could be something for PyMAPDL developers.To migrate
Missing
To be done in follow up PRs
materials
The material API is lacking many features. So far, we cannot read temperature-dependent materials, and it seems neither some electric properties like permitivity.
See:
mesh
: Requires replicate a full class. It will be a different issue.cylindrical_nodal_stress
.element_solution_data
This requires a mapping sort of:
nodal_boundary_conditions
nodal_input_force
parse_coordinate_system
result_dof
: Return a list of degrees of freedom for a given result number.section_data
Done
available_results
element_components
element_lookup
element_stress
filename
n_results
n_sector
nodal_acceleration
nodal_displacement
nodal_elastic_strain
nodal_plastic_strain
nodal_reaction_forces
nodal_solution
nodal_static_forces
nodal_stress
nodal_temperature
nodal_thermal_strain
nodal_time_history
nodal_velocity
node_components
parse_step_substep
pathlib_filename
principal_nodal_stress
time_values
version
To not migrate.
A
NotImplementedError
will be raised.text_result_table
Used for the text in the plots. Not porting it.write_tables
: Write binary tables to ASCII.read_record
: Read a record from the opened file. Records are hidden in DPF.overwrite_element_solution_record
: DPF cannot write solution files.overwrite_element_solution_records
: DPF cannot write solution files.cs_4x4
- I couldn't make it work locally, so I'm not porting it. It will raise a not implemented error.solution_info
It doesn't make sense to be ported at the moment.
There are many methods which are duplicate frommapdl.post_processing
, I will probably redirect one to another (I don't know which one should prevail, probably post-processing).DPFResult
class should provide a way to manipulate RST files without having an MAPDL instance alive.Full list of Reader class methods
The complete lists of functions in that class are:
Show full list of Result class functions
Notes
Launch DPF when running in containerThis should not be part of PyMAPDL since if it is local, it will be automatically detected, and if it is remote, we should not own that resource. It could be something for PyMAPDL developers.Summary by Sourcery
Replace the legacy reader‐based results interface with a new DPF backend: introduce a global switch to toggle backends, implement and expose the
DPFResult
class with migrated public APIs using ansys-dpf-core, update test infrastructure and CI workflows to support DPF testing, and refine misc, launcher, and pytest utilities to accommodate the change.New Features:
use_reader_backend
switch in MAPDL.DPFResult
class underansys.mapdl.core.reader.result
migrating public result APIs to use ansys-dpf-core.get_ip
andparse_ip_route
for IP detection and switch GRPC/Docker connection logic.Bug Fixes:
MapdlGrpc.sys
and clarify assertion error when reusing MAPDL instances.Enhancements:
PYMAPDL_ADDITIONAL_SWITCHES
in headers.mapdl.result
file‐path handling to create isolated temp directories and enrich FileNotFoundError messages._parse_ip_route
usage in launcher and misc modules.CI:
TEST_DPF_BACKEND
environment variable in CI workflows to enable/disable DPF tests.Documentation:
Tests:
tests/test_result.py
and update fixtures fortest_dpf_backend
.tests/conftest.py
,tests/common.py
, and test launcher to integrate DPF backend testing.