Saving tensor to file
Is there a way to save a tensor to file? For example, if we have the strain rate tensor sym(grad(u1)), is there a way to output this as a pvd file in one step (such that it is readable by Paraview)? I can output each component separately without problem:
# 2D strain rate tensor
efile_pvd << project(
efile_pvd << project(
efile_pvd << project(
# I can also create a strain rate tensor function
d = mesh.geometry(
symmetry = dict(((i,j),(j,i)) for i in range(d) \
Sij = project(
# But attempting to output the values of this function yields malloc() errors
efile_pvd << Sij
Thanks,
Bob
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Bob Myhill
- Solved:
- Last query:
- Last reply: