Computational Science Asked by Dude on February 18, 2021
Imagine we have a simple 2D FEM solver (we are dealing with solid mechanics) and we would like to develop it to a 3D FEM solver (let’s say for the same solid mechanics problem) in this case what are the inevitable changes/modifications to be made in the code?
I understand that some might answer "It depends on the type of the problem and it is different from case to case", but I am curious to know if there is any generic standard procedure for such transformation that should inevitably be considered regardless of the type of the problem?
I am of course talking about the places in the code where I should implement the modifications.
If you need a more specific presentation of the problem, here is the 2D code I am willing to develop to 3D. To see the code please click on this link
So so many places you have to rewrite. The whole mesh handling (accessing faces and edges from cells, neighbors from cells, ...). Shape functions. Dealing with the question of how the normal vector of a face when seen from one cell matches that on a neighboring cell. You will also likely encounter that 3d problems are always much larger and that solvers, preconditioners, data structures, parallelization schemes are all much more stressed and may need to be optimized to be efficient. Everything you have to develop also has to be debugged, and debugging is more complicated in 3d because drawing little pictures on a piece of paper is so much more cumbersome in 3d. It's going to be a lot of work to implement this, much more than just doing 2d simulation.
That's why you shouldn't do it yourself. Rely on one of the big finite element packages out there. Not only do they already have 3d meshes and finite elements implemented for you, they also have nearly everything else you may need in the future already implemented for you. Use your 2d experience as a learning opportunity, then move on to using what others have already built over decades of work.
Correct answer by Wolfgang Bangerth on February 18, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP