最近看到一篇关于fenics的评论,觉得挺有意思,遂搬运过来。大意就是说fenics虽然名为开源库,但实际上开源的效果并不是很好。对于做有限元分析的新手来说它不怎么友好,其实际效果是被高估了的。其实我也研究了一段时间fenics了,不得不承认它的抽象做得确实够好,但过度的抽象就丢失了具体。我只能说想要摸清楚它底层的实现过程,或者想自定义地修改一些模块都太难了。如果想自己来编代码搞搞学术研究吧,只能做些应用层级的工作,很难深入底层;想要当工具做实际计算吧,那还不如用别的商软呢。所以它的定位就比较尴尬了,可能对于从一开始就很熟悉fenics的人而言它确实好用,但对于新手的话学起来太费劲。
这篇文章的评论跟我实际的感受也是很一致的,fenics就像是一块精美烹饪的鸡肋,想要把它嚼出味道,单靠个人自学实在成本过高非下苦工不可,这就丧失了开源软件的意义了。相较于它,我还是更喜欢deal.II。文章链接在下面,我就不翻译了。
未经允许请不要转载。
I have only one suggestion for the FEA community regarding FEniCS. That is,
Recently, FEniCS has gained a lot of popularity among academics in the FEA community. (I do not think that industrial engineers are too naive to use FEniCS. Because they know better about the capabilities of FEA library/software suite.) I have heard many academics talking about FEniCS. So, I thought that it is worth looking into FEniCS. After going through its website, user documentation, and some of the tutorials, I came to the following conclusions:
Let’s have a look at the claims on FEniCS’s website.
1.) FEniCS enables users to quickly translate scientific models into efficient finite element code.
So what? It does not help FE users in learning either the finite element method or the aspect of programming for FEM. The users will not learn anything by running some Python code in which all the FE contents are available as one-line functions. Better to use a precompiled commercial package with a GUI than compiling such a Python code.
For example, let’s take this sample code snippet.P2 = VectorElement('P', tetrahedron, 2)
P1 = FiniteElement('P', tetrahedron, 1)
TH = P2 * P1
W = FunctionSpace(mesh, TH)
There is nothing you can learn about FEA programming with these four lines of code.
2.) With the high-level Python and C++ interfaces to FEniCS, it is easy to get started, but FEniCS offers also powerful capabilities for more experienced programmers.
Unsubstantiated claims. I have not seen any such capabilities that come nowhere close to other opensource libraries/packages for FEA.
3.) FEniCS runs on a multitude of platforms ranging from laptops to high-performance clusters.
This is not unique to FEniCS. All the other (almost all of the top ones) modern FE libraries run on a multitude of platforms.
So, my suggestion to the FEA community is to avoid FEniCS.
Note: I will keep updating this blog post if I come across any new reasons. You are welcome to suggest if you have any.