Skip to content
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

Treat all the other (presumably newer) nonlinear cell types in UnstructuredGrid.linear_copy() #3192

Open
tkoyama010 opened this issue Aug 21, 2022 · 0 comments
Labels
feature-request Please add this cool feature!

Comments

@tkoyama010
Copy link
Member

tkoyama010 commented Aug 21, 2022

Describe the feature you would like to be added.

In UnstructuredGrid.linear_copy() the docstring claims

Return a copy of the unstructured grid containing only linear cells.

But currently we have 10 QUADRATIC_* cell types and some more bi- and tri-quadratic ones, and only four of these is claimed to be converted by the method.

We should consider handling the linearization of the remaining nonlinear cell types, or explaining why some of these might not be applicable here (for instance the method considers quadratic quads and triangles in some way, but I'm not familiar with these cell types to know what's really going on in the method).

Originally posted by @adeak in #3115 (comment); edited here

Links to VTK Documentation, Examples, or Class Definitions.

def linear_copy(self, deep=False):
"""Return a copy of the unstructured grid containing only linear cells.
Converts the following cell types to their linear equivalents.
- ``VTK_QUADRATIC_TETRA --> VTK_TETRA``
- ``VTK_QUADRATIC_PYRAMID --> VTK_PYRAMID``
- ``VTK_QUADRATIC_WEDGE --> VTK_WEDGE``
- ``VTK_QUADRATIC_HEXAHEDRON --> VTK_HEXAHEDRON``
Parameters
----------
deep : bool
When ``True``, makes a copy of the points array. Default
``False``. Cells and cell types are always copied.
Returns
-------
pyvista.UnstructuredGrid
UnstructuredGrid containing only linear cells when
``deep=False``.
"""

@tkoyama010 tkoyama010 added the feature-request Please add this cool feature! label Aug 21, 2022
@adeak adeak changed the title Add track treating all the other (presumably newer) nonlinear cell types Treat all the other (presumably newer) nonlinear cell types in UnstructuredGrid.linear_copy() Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Please add this cool feature!
Projects
None yet
Development

No branches or pull requests

1 participant