We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently if you interpolate a non-symmetric tensor into a symmetric space, it will ignore the part above the diagonal.
For example (once #3164 is fixed), the following code will print [1. 2. 4. 2. 3. 5. 4. 5. 6.] even though the input has 0s above the diagonal.
[1. 2. 4. 2. 3. 5. 4. 5. 6.]
import basix.ufl import numpy as np from dolfinx.mesh import create_unit_square from dolfinx.fem import functionspace, Function from mpi4py import MPI mesh = create_unit_square(MPI.COMM_WORLD, 10, 10) def tensor(x): mat = np.array([[1], [0], [0], [2], [3], [0], [4], [5], [6]]) return np.broadcast_to(mat, (9, x.shape[1])) element = basix.ufl.element("DG", mesh.basix_cell(), 0, shape=(3, 3), symmetry=True) space = functionspace(mesh, element) f = Function(space) f.interpolate(lambda x: tensor(x)) print(f.eval([[0, 0, 0]], [0]))
I'm unsure what is the best thing to do in case like this
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe new/missing feature
Currently if you interpolate a non-symmetric tensor into a symmetric space, it will ignore the part above the diagonal.
For example (once #3164 is fixed), the following code will print
[1. 2. 4. 2. 3. 5. 4. 5. 6.]
even though the input has 0s above the diagonal.I'm unsure what is the best thing to do in case like this
Suggested user interface
No response
The text was updated successfully, but these errors were encountered: