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

Potential bug when creating mesh tag which is a vector #114

Open
zhangchonglin opened this issue Sep 23, 2024 · 1 comment
Open

Potential bug when creating mesh tag which is a vector #114

zhangchonglin opened this issue Sep 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@zhangchonglin
Copy link

When adding mesh tag for field which is a vector (3 components on each mesh vertex for example), the field displayed in paraview contains 6 components.

Example is given below:

Create the mesh tag from omega_h:

mesh->add_tag<o::Real>(0, "electric_field", 3);
o::Write<o::Real> E_node(mesh->nverts() * 3, 0);

...
some operations to fill the field.
...

mesh->set_tag(0, "electric_field", o::Reals(E_node)); 

Displayed results in paraview shown as 6 components on each mesh vertex (XX, YY, ZZ, XY, YZ, XZ):

vector_field_bug

@zhangchonglin zhangchonglin added the bug Something isn't working label Sep 23, 2024
@zhangchonglin
Copy link
Author

The issue is likely related to mesh dimension in setting up field output.

  • For 2D mesh, vector has 6 components in ParaView: wrong.
  • For 3D mesh, vector has 3 components in ParaView: correct.

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

1 participant