I'm curious to understand why there seems to be a scarcity of Finite Element Method (FEM) implementations in Haskell, or any functional language. Given Haskell's purely functional nature, I expected to find numerous implementations of numerical methods.
My quick search on GitHub and Google Scholar didn't yield many relevant references. I came across a Quora question regarding the application of Haskell in handling large matrices, but none of the responses mentioned sparse matrices or FEM. Has there been any specific discussion or reasons within the Haskell community regarding the absence of FEM implementations? I would appreciate insights or references on this matter.
What the numerics community cares about is foremostly that their code run fast, and secondarily that it be "easy" to use for non-programmer engineers/scientists (with a rather disputable notion of easyness, la Matlab). Apart from that there's an attitude that choice of programming language "doesn't really matter because everything is Turing-complete", and that anyway the code doesn't contain the interesting mathematical derivations which are carried out separately on paper. In other words, in their mindset the only aspect of the maths that computer is involved with are numbers.
Consequently, they tend to go with languages that have a track record of use for numerical applications and then perhaps add an interface in a dynamic language around that (not so much for any abstraction purposes but simply to allow for scripting).
The functional programming community has a completely different focus, which is all about bringing mathematical concepts into the code, but not overly interested in tuning numerical performance. GHC can actually generate pretty fast executables, particularly competitive for complex logic, but for dumb numerics it can't take it up with a compiler like ICC that does all kinds of vectorisation etc. microoptimisations for numerics. Now, it would be possible to address this performance gap by writing a Haskell wrapper around optimised low-level routines in C (or Cuda), but that's not very interesting to FP people, whereas numerics people just wouldn't see any point in it because to them Haskell is just a weird fringe language.
We use cookies and similar tools that are necessary to enable you to make purchases, to enhance your shopping experiences and to provide our services, as detailed in our Cookie notice. We also use these cookies to understand how customers use our services (for example, by measuring site visits) so we can make improvements.
If you agree, we'll also use cookies to complement your shopping experience across the Amazon stores as described in our Cookie notice. Your choice applies to using first-party and third-party advertising cookies on this service. Cookies store or access standard device information such as a unique identifier. The 103 third parties who use cookies on this service do so for their purposes of displaying and measuring personalized ads, generating audience insights, and developing and improving products. Click "Decline" to reject, or "Customise" to make more detailed advertising choices, or learn more. You can change your choices at any time by visiting Cookie preferences, as described in the Cookie notice. To learn more about how and for what purposes Amazon uses personal information (such as Amazon Store order history), please visit our Privacy notice.
Many students, engineers, scientists and researchers have benefited from the practical, programming-oriented style of the previous editions of Programming the Finite Element Method, learning how to develop computer programs to solve specific engineering problems using the finite element method.
This new fifth edition offers timely revisions that include programs and subroutine libraries fully updated to Fortran 2003, which are freely available online, and provides updated material on advances in parallel computing, thermal stress analysis, plasticity return algorithms, convection boundary conditions, and interfaces to third party tools such as ParaView, METIS and ARPACK. As in the previous editions, a wide variety of problem solving capabilities are presented including structural analysis, elasticity and plasticity, construction processes in geomechanics, uncoupled and coupled steady and transient fluid flow and linear and nonlinear solid dynamics.
The finite element method (FEM) is a popular method for numerically solving differential equations arising in engineering and mathematical modeling. Typical problem areas of interest include the traditional fields of structural analysis, heat transfer, fluid flow, mass transport, and electromagnetic potential.
The FEM is a general numerical method for solving partial differential equations in two or three space variables (i.e., some boundary value problems). To solve a problem, the FEM subdivides a large system into smaller, simpler parts called finite elements. This is achieved by a particular space discretization in the space dimensions, which is implemented by the construction of a mesh of the object: the numerical domain for the solution, which has a finite number of points. The finite element method formulation of a boundary value problem finally results in a system of algebraic equations. The method approximates the unknown function over the domain.[1]The simple equations that model these finite elements are then assembled into a larger system of equations that models the entire problem. The FEM then approximates a solution by minimizing an associated error function via the calculus of variations.
In the first step above, the element equations are simple equations that locally approximate the original complex equations to be studied, where the original equations are often partial differential equations (PDE). To explain the approximation in this process, the finite element method is commonly introduced as a special case of Galerkin method. The process, in mathematical language, is to construct an integral of the inner product of the residual and the weight functions and set the integral to zero. In simple terms, it is a procedure that minimizes the approximation error by fitting trial functions into the PDE. The residual is the error caused by the trial functions, and the weight functions are polynomial approximation functions that project the residual. The process eliminates all the spatial derivatives from the PDE, thus approximating the PDE locally with
These equation sets are element equations. They are linear if the underlying PDE is linear and vice versa. Algebraic equation sets that arise in the steady-state problems are solved using numerical linear algebra methods. In contrast, ordinary differential equation sets that occur in the transient problems are solved by numerical integration using standard techniques such as Euler's method or the Runge-Kutta method.
In step (2) above, a global system of equations is generated from the element equations by transforming coordinates from the subdomains' local nodes to the domain's global nodes. This spatial transformation includes appropriate orientation adjustments as applied in relation to the reference coordinate system. The process is often carried out by FEM software using coordinate data generated from the subdomains.
FEA may be used for analyzing problems over complicated domains (like cars and oil pipelines) when the domain changes (as during a solid-state reaction with a moving boundary), when the desired precision varies over the entire domain, or when the solution lacks smoothness. FEA simulations provide a valuable resource as they remove multiple instances of creating and testing complex prototypes for various high-fidelity situations.[citation needed] For example, in a frontal crash simulation, it is possible to increase prediction accuracy in "important" areas like the front of the car and reduce it in its rear (thus reducing the cost of the simulation). Another example would be in numerical weather prediction, where it is more important to have accurate predictions over developing highly nonlinear phenomena (such as tropical cyclones in the atmosphere, or eddies in the ocean) rather than relatively calm areas.
While it is difficult to quote the date of the invention of the finite element method, the method originated from the need to solve complex elasticity and structural analysis problems in civil and aeronautical engineering.[4] Its development can be traced back to work by Alexander Hrennikoff[5] and Richard Courant[6] in the early 1940s. Another pioneer was Ioannis Argyris. In the USSR, the introduction of the practical application of the method is usually connected with the name of Leonard Oganesyan.[7] It was also independently rediscovered in China by Feng Kang in the later 1950s and early 1960s, based on the computations of dam constructions, where it was called the finite difference method based on variation principle. Although the approaches used by these pioneers are different, they share one essential characteristic: mesh discretization of a continuous domain into a set of discrete sub-domains, usually called elements.
Hrennikoff's work discretizes the domain by using a lattice analogy, while Courant's approach divides the domain into finite triangular subregions to solve second order elliptic partial differential equations that arise from the problem of torsion of a cylinder. Courant's contribution was evolutionary, drawing on a large body of earlier results for PDEs developed by Lord Rayleigh, Walther Ritz, and Boris Galerkin.
The finite element method obtained its real impetus in the 1960s and 1970s by the developments of J. H. Argyris with co-workers at the University of Stuttgart, R. W. Clough with co-workers at UC Berkeley, O. C. Zienkiewicz with co-workers Ernest Hinton, Bruce Irons[8] and others at Swansea University, Philippe G. Ciarlet at the University of Paris 6 and Richard Gallagher with co-workers at Cornell University. Further impetus was provided in these years by available open-source finite element programs. NASA sponsored the original version of NASTRAN. UC Berkeley made the finite element programs SAP IV[9] and later OpenSees widely available. In Norway, the ship classification society Det Norske Veritas (now DNV GL) developed Sesam in 1969 for use in the analysis of ships.[10] A rigorous mathematical basis to the finite element method was provided in 1973 with the publication by Gilbert Strang and George Fix.[11] The method has since been generalized for the numerical modeling of physical systems in a wide variety of engineering disciplines, e.g., electromagnetism, heat transfer, and fluid dynamics.[12][13]
c80f0f1006