Skip to content

Conversation

@PProfizi
Copy link
Contributor

@PProfizi PProfizi commented Oct 27, 2023

Closes #423

Fixes the initial issue while adding a new request argument for mesh reduction reduce_mesh to handle the behavior expected for remote post-processing:

  • add tests
  • confirm design and propagate to all result requests
  • add example

@PProfizi PProfizi added the bug Something isn't working label Oct 27, 2023
@PProfizi PProfizi self-assigned this Oct 27, 2023
@PProfizi PProfizi added this to the v0.6.1 milestone Oct 27, 2023
@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Attention: 32 lines in your changes are missing coverage. Please review.

Comparison is base (d4c10ab) 83.82% compared to head (2d37b76) 83.45%.
Report is 9 commits behind head on master.

❗ Current head 2d37b76 differs from pull request most recent head e5abaad. Consider uploading reports for the commit e5abaad to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #532      +/-   ##
==========================================
- Coverage   83.82%   83.45%   -0.37%     
==========================================
  Files          47       47              
  Lines        5068     5120      +52     
==========================================
+ Hits         4248     4273      +25     
- Misses        820      847      +27     

)
assert len(result.columns.set_ids) == 1
if SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_1:
assert len(result.index.mesh_index) == 36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how confident are we all these unit tests changes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you plot all of these to make sure they were good?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbellot000 Yes, I debugged most of them locally to check the actual number of elements involved and whether the new reference is correct this time. This is why I switched to NamedSelections for most of them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can now duplicate all these tests once with reduce_mesh=True, where we should have the same results as before, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbellot000 I started making specific tests for when we use reduce_mesh, but I do not think we need to duplicate all of the already existing ones for each result.

is computed over list of elements (not supported for cyclic symmetry). Getting the
skin on more than one result (several time freq sets, split data...) is only
supported starting with Ansys 2023R2.
reduce_mesh:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the external layer?
I'm not sure about the name "reduce" any other ideas, @rlagha @FedericoNegri?

Copy link
Contributor Author

@PProfizi PProfizi Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbellot000 you're right, I'll check what it does in combination with external_layer. As for the name reduce_mesh, it is definitely just a proposal. I thought about it though, and to me this is one of the most explicit ways to describe what it does.

supported starting with Ansys 2023R2.
Select the skin (creates new 2D elements connecting the external nodes)
of the mesh for plotting and data extraction. If a list is passed, the skin
is computed over list of elements (not supported for cyclic symmetry). Getting the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this description true only for reduce_mesh==True?

Copy link
Contributor Author

@PProfizi PProfizi Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbellot000 do you mean the fact that having skin=[1, 2, 3] will map results onto the skin elements of elements 1, 2, and 3, based on the skin for the initial mesh?

If reduce_mesh=False, you will get results on "skin elements corresponding to elements 1, 2, and 3 based on the skin generated from the initial mesh".

If reduce_mesh=True, as described in the docstring for it, you will get results on the "all skin elements of the skin generated from the mesh composed of elements 1, 2, and 3 only".

Copy link
Contributor

@JennaPaikowsky JennaPaikowsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor changes

@PProfizi PProfizi modified the milestones: v0.7.0, v0.7.1 Feb 21, 2024
@PProfizi PProfizi modified the milestones: v0.8.1, v0.8.2 Jul 11, 2024
@PProfizi PProfizi closed this Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues combining mesh skin with scoping

4 participants