SCOREC / omega_h

Simplex mesh adaptivity for HPC
Other
1 stars 9 forks source link

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

Open zhangchonglin opened 1 month ago

zhangchonglin commented 1 month ago

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 commented 1 week ago

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