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

Grey and missing elements in plot #107

Open
2 tasks done
greschd opened this issue Jan 23, 2023 · 8 comments
Open
2 tasks done

Grey and missing elements in plot #107

greschd opened this issue Jan 23, 2023 · 8 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@greschd
Copy link
Member

greschd commented Jan 23, 2023

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

When running the kiteboard example with only the max stress criterion, the plot contains grey elements, and other cells which are missing:

image

📝 Steps to reproduce

💻 Which operating system are you using?

Linux

🐍 Which Python version are you using?

3.8

📦 Installed packages

ansys-dpf-composites==0.1.dev0
ansys-dpf-core==0.7.2
ansys-dpf-gate==0.3.0
ansys-dpf-gatebin==0.3.0
ansys-grpc-dpf==0.7.0
anyio==3.6.2
appdirs==1.4.4
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
asttokens==2.2.1
attrs==22.2.0
backcall==0.2.0
beautifulsoup4==4.11.1
black==22.12.0
bleach==5.0.1
cachetools==5.2.1
certifi==2022.12.7
cffi==1.15.1
charset-normalizer==3.0.1
click==8.1.3
comm==0.1.2
contourpy==1.0.7
cycler==0.11.0
debugpy==1.6.5
decorator==5.1.1
defusedxml==0.7.1
entrypoints==0.4
executing==1.2.0
fastjsonschema==2.16.2
fonttools==4.38.0
google-api-core==2.11.0
google-api-python-client==2.73.0
google-auth==2.16.0
google-auth-httplib2==0.1.0
googleapis-common-protos==1.58.0
grpcio==1.51.1
httplib2==0.21.0
idna==3.4
imageio==2.24.0
importlib-metadata==6.0.0
importlib-resources==5.10.2
ipycanvas==0.13.1
ipyevents==2.0.1
ipykernel==6.20.2
ipympl==0.9.2
ipython==8.8.0
ipython-genutils==0.2.0
ipyvtklink==0.2.3
ipywidgets==7.7.2
jedi==0.18.2
Jinja2==3.1.2
jsonschema==4.17.3
jupyter-client==7.4.9
jupyter-core==5.1.3
jupyter-events==0.6.3
jupyter-server==2.1.0
jupyter-server-terminals==0.4.4
jupyterlab-pygments==0.2.2
jupyterlab-widgets==1.1.1
kiwisolver==1.4.4
MarkupSafe==2.1.2
matplotlib==3.6.3
matplotlib-inline==0.1.6
mistune==2.0.4
mypy-extensions==0.4.3
nbclassic==0.4.8
nbclient==0.7.2
nbconvert==7.2.8
nbformat==5.7.3
nest-asyncio==1.5.6
notebook==6.5.2
notebook-shim==0.2.2
numpy==1.23.5
packaging==23.0
pandocfilters==1.5.0
parso==0.8.3
pathspec==0.10.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.4.0
pkgutil-resolve-name==1.3.10
platformdirs==2.6.2
prometheus-client==0.15.0
prompt-toolkit==3.0.36
protobuf==4.21.12
psutil==5.9.4
ptyprocess==0.7.0
pure-eval==0.2.2
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
Pygments==2.14.0
pyparsing==3.0.9
pyrsistent==0.19.3
python-dateutil==2.8.2
python-json-logger==2.0.4
pyvista==0.36.1
PyYAML==6.0
pyzmq==25.0.0
requests==2.28.2
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rsa==4.9
scooby==0.7.0
Send2Trash==1.8.0
six==1.16.0
sniffio==1.3.0
soupsieve==2.3.2.post1
stack-data==0.6.2
terminado==0.17.1
tinycss2==1.2.1
tomli==2.0.1
tornado==6.2
tqdm==4.64.1
traitlets==5.8.1
typing-extensions==4.4.0
uritemplate==4.1.1
urllib3==1.26.14
vtk==9.2.5
wcwidth==0.2.6
webencodings==0.5.1
websocket-client==1.4.2
widgetsnbextension==3.6.1
zipp==3.11.0
@greschd greschd added the bug Something isn't working label Jan 23, 2023
@janvonrickenbach janvonrickenbach self-assigned this Jan 24, 2023
@janvonrickenbach
Copy link
Contributor

The following bugs have been reported to dpf core:

ansys/pydpf-core#766
ansys/pydpf-core#765

@janvonrickenbach janvonrickenbach added this to the First Release milestone Jan 24, 2023
@roosre roosre modified the milestones: First Release, 2023 R2 Jan 26, 2023
@janvonrickenbach
Copy link
Contributor

ansys/pydpf-core#766 which caused the missing elements, is now fixed.

@roosre
Copy link
Collaborator

roosre commented Jul 2, 2023

Hi @greschd , is this issue resolved with the recent improvements in vtk? Thanks, René

@greschd
Copy link
Member Author

greschd commented Jul 2, 2023

No, I can still reproduce this issue.

Updated the main dependencies with

poetry lock; poetry install --all-extras --sync

and VTK with

pip install vtk -U --pre --index-url https://gitlab.kitware.com/api/v4/projects/13/packages/pypi/simple

The tessellation looks cleaner, but the grey and missing elements are still there:

image

Click to show updated pip freeze
accessible-pygments==0.0.4
alabaster==0.7.13
-e git+https://github.com/pyansys/pydpf-composites.git@ebb67a27ddfe1ed6882938c01e007cb3b3399d65#egg=ansys_dpf_composites
ansys-dpf-core==0.8.1
ansys-dpf-gate==0.3.1
ansys-dpf-gatebin==0.3.1
ansys-grpc-dpf==0.7.1
ansys-sphinx-theme==0.9.9
astroid==2.15.5
Babel==2.12.1
beautifulsoup4==4.12.2
bleach==6.0.0
build==0.8.0
cachetools==5.3.1
certifi==2023.5.7
cfgv==3.3.1
charset-normalizer==3.1.0
colorama==0.4.6
contourpy==1.1.0
coverage==7.2.7
cycler==0.11.0
dill==0.3.6
distlib==0.3.6
docutils==0.19
exceptiongroup==1.1.1
filelock==3.12.2
fonttools==4.40.0
google-api-core==2.11.1
google-api-python-client==2.91.0
google-auth==2.17.3
google-auth-httplib2==0.1.0
googleapis-common-protos==1.59.1
grpcio==1.56.0
httplib2==0.22.0
identify==2.5.24
idna==3.4
imagesize==1.4.1
importlib-metadata==6.7.0
iniconfig==2.0.0
isort==5.12.0
jaraco.classes==3.2.3
Jinja2==3.1.2
keyring==24.2.0
kiwisolver==1.4.4
lazy-object-proxy==1.9.0
markdown-it-py==3.0.0
MarkupSafe==2.1.3
matplotlib==3.7.1
mccabe==0.7.0
mdurl==0.1.2
more-itertools==9.1.0
mypy==1.4.1
mypy-extensions==1.0.0
nodeenv==1.8.0
numpy==1.24.4
numpydoc==1.5.0
packaging==23.1
pep517==0.13.0
Pillow==10.0.0
pkginfo==1.9.6
platformdirs==3.8.0
pluggy==1.2.0
pooch==1.7.0
pre-commit==3.3.3
protobuf==4.23.3
psutil==5.9.5
pyasn1==0.5.0
pyasn1-modules==0.3.0
pydata-sphinx-theme==0.13.3
Pygments==2.15.1
pylint==2.17.4
pypandoc==1.11
pyparsing==3.1.0
pytest==7.4.0
pytest-cov==3.0.0
python-dateutil==2.8.2
pyvista==0.40.0
pywin32-ctypes==0.2.2
PyYAML==6.0
readme-renderer==40.0
requests==2.31.0
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==13.4.2
rsa==4.9
scipy==1.9.3
scooby==0.7.2
six==1.16.0
snowballstemmer==2.2.0
soupsieve==2.4.1
Sphinx==5.3.0
sphinx-copybutton==0.4.0
sphinx-gallery==0.11.1
sphinx_autodoc_typehints==1.20.1
sphinx_design==0.3.0
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
tomli==2.0.1
tomlkit==0.11.8
tqdm==4.65.0
twine==4.0.2
typing_extensions==4.7.1
uritemplate==4.1.1
urllib3==2.0.3
virtualenv==20.23.1
vtk==9.2.20230701.dev0
webencodings==0.5.1
wrapt==1.15.0
zipp==3.15.0

@janvonrickenbach
Copy link
Contributor

@greschd @roosre The missing/gray element is due to dpf-core. I should be fixed as soon as the next version is released.

@greschd
Copy link
Member Author

greschd commented Jul 3, 2023

@janvonrickenbach with the current master, I get the missing element being fixed, but not the grey ones:

image

Installed with pip install git+https://github.com/ansys/pydpf-core.git.

@greschd
Copy link
Member Author

greschd commented Jul 3, 2023

Plotting with nan_color="#ffffff", opacity=0.5 options reveals that the data is there, but obscured by other elements:
image

I think this means it's not really a bug, but we should consider features that make this case easier to detect and deal with:

  • Can the .plot() option be restricted to plot only the parts of the mesh on which the field is defined? Maybe this already exists, but I didn't find it with a cursory search..
  • Can the opacity be set for the NaN values only? Setting an RGBA color (e.g. #ffffff00) on the nan_color doesn't seem to have any effect.
  • It's also strange that the NaN values completely obscure the field values, from both sides. In most other cases when data is obscured due to z-buffering, they are at least partially visible. Maybe this can be improved?
    Observation: The mesh elements without data are Quad8 and Point1, whereas the field contains Quad4 and Tri3.
  • Other ideas?

@janvonrickenbach
Copy link
Contributor

This could be related to ansys/pydpf-core#925 @rlagha @greschd

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

No branches or pull requests

3 participants