Hi everyone,
I have solved a problem which has as output two scalar components, say ux and uy. Their data type is fem.Function on a scalar Functional Space.
Is it possible to save them into a vector, so that they can be exported into a xdmf file?
I try to use as_vector, without success unfortunately.
You could create a VectorFunctionSpace over the space finite element as you created the scalar elements, and use the FunctionAssigner, see: Usage of FunctionAssigner - #2 by dokken
Perfect, thank you.
Last question (I hope): using this approach is the vector function recognized by Paraview as a vector? So that the magnitude and the vector can be directly visualized?