-
Notifications
You must be signed in to change notification settings - Fork 9
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
Mesh splitting and selection #346
Conversation
Codecov Report
@@ Coverage Diff @@
## master #346 +/- ##
==========================================
+ Coverage 81.64% 83.49% +1.84%
==========================================
Files 39 44 +5
Lines 4124 4640 +516
==========================================
+ Hits 3367 3874 +507
- Misses 757 766 +9 |
…rove docstring and typehinting, and use elemental_properties enum
# Conflicts: # src/ansys/dpf/post/simulation.py
src/ansys/dpf/post/connectivity.py
Outdated
): | ||
"""Constructs a _ConnectivityList by wrapping the given PropertyField. | ||
|
||
Arguments: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameters ?
Arguments: | |
Parameters: |
src/ansys/dpf/post/elements.py
Outdated
raise TypeError("Given argument is not an int nor an ElementDescriptor") | ||
|
||
@property | ||
def enum_id(self) -> dpf.element_types: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any other naming that enum_id ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are using "elem_type_id" in the DataFrame
new_name = copy.copy(self._name) | ||
return NamedSelection(name=new_name, scoping=new_scoping) | ||
|
||
def as_local_scoping(self) -> NamedSelection: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that needed?
"""Length of the list of IDs.""" | ||
return self._scoping.size | ||
|
||
def deep_copy(self, server=None) -> NamedSelection: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not performant at the moment in core side as discussed with @rafacanton, do we need on the post side?
src/ansys/dpf/post/mesh.py
Outdated
>>> print(simulation.mesh.num_nodes) # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS | ||
81 | ||
""" | ||
return len(self.node_ids) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use the core API for the number of nodes here please? We will eventually have a better implementation in core and I'ld like to inherit from it here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(same for elements)
src/ansys/dpf/post/simulation.py
Outdated
def mesh_info(self): | ||
"""Return available mesh information.""" | ||
mesh_selection_manager_provider_op = ( | ||
dpf.operators.metadata.mesh_selection_manager_provider( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we using the mesh_selection_manager_provider ?
Introduces
Meshes
, a container for multipleMesh
instances (wraps aMeshesContainer
).The goal is to allow for lazy
Mesh
queries, where a first splitting step is used with a further selection to work only on theMeshedRegion
of interest.Adds
Mesh.split_by_properties()
,Mesh.select()
,Mesh.plot()
Adds
Meshes
,Meshes[{"mat": 1, "elshape":1}]
orMeshes[0]
,Meshes.plot()
To do: