This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

How to get a 3D plot in Paraview from 2D problem in Fenics

0 votes

I solved a simple poisson equation in Fenics. Now, when I open the .pvd or .vtu file in Paraview, it fails to filter the scalar data in the z-axis and just displays a 2-D surface with the color bar/ values. This does not happen in Viper as I am able to view a proper 3D plot here.

I saw some online paraview forums and they suggest the use of filter - 'Warp by Scalar' but that doesn't seem to work. I think I need to make some changes to the script. Can anyone guide me regarding this.

The mesh is a 2D rectangle with a hole.

Please help. Thanks!

The following is the same ques. but it does not have the solution in detail. There was apparently some email exchange. https://answers.launchpad.net/fenics/+question/225365

asked Jul 13, 2015 by Chaitanya_Raj_Goyal FEniCS User (4,150 points)
edited Jul 13, 2015 by Chaitanya_Raj_Goyal

2 Answers

0 votes
 
Best answer

Ok...I used the 'Warp by Scalar' filter and used a scaling factor of 0.001 and it worked. I wasn't changing the scaling factor earlier.

answered Jul 15, 2015 by Chaitanya_Raj_Goyal FEniCS User (4,150 points)
0 votes

I had a similar problem, where all filters were grayed out. Is this what you mean by "that doesn't seem to work" ?
On another computer, with a more recent version of Paraview it works perfectly fine, though. Closest thing to an explanation I could find was that it has something to do with the version of Qt used: http://www.paraview.org/pipermail/paraview/2010-January/015304.html

answered Jul 14, 2015 by maartent FEniCS User (3,910 points)

No, it wasn't grayed out. Earlier it was showing something completely different than what I created but then I used a scaling factor of 0.001 and it worked. I wasn't playing with the scaling factor earlier. Thanks for your help and time!

...