| 
Finite element analysis (FEA) is a computer simulation technique
used in engineering analysis. Although many dedicated FEA packages
exist in the marketplace, MATLAB® is a popular tool for situations
where the engineer or scientist needs more control of the underlying
algorithms, and tighter control over the equations that govern the
relationships between nodes in the mesh. Typical applications include
structural analysis, fluid flow, high-temperature plasma flow, airframe
optimization, grain-boundary effect in crystals, and many others.
A typical workflow involves the following steps:
- Export from a computer-aided design (CAD) package the 3D geometry
of the object to be studied;
- Import the geometry into MATLAB®;
- Assemble the matrices that define the set of equations to be
solved (for example, the stiffness and force matrices);
- Solve the resulting system of equations (for example, [F]=[K][x],
where [F] is the forces applied, [K] is the stiffness matrix,
and [x] is the displacement for which we want to solve).
As models become more and more complex - due to complexities in
the geometry, and physical phenomena being modeled - desktop processing
can quickly become impractical. Relatively modest models with tens
of thousands of nodes can take hours to compute, or even run into
paging limitations.
Star-P's task- and data-parallel modes lend themselves very well to
the FEA workflow. The task-parallel mode is ideally-suited to carrying
out in parallel the operations that do not depend on each other -
such as the creation of the various sparse matrices (e.g., calculating
the stiffness matrix).
With the matrices assembled, the equations can now be solved in
a variety of ways - either using the standard functions available
in MATLAB® and transparently overloaded with Star-P, or by plugging
in a broad range of solvers from the open source community or numerical
library vendors. For example, using the Star-P SDK, users can plug
in a variety of solvers from Sandia National Labs' Trilinos library.
In a recent
application of Star-P to some finite element modeling of the human
heart by researchers at a leading medical school, the algorithm
consisted of the following four steps: 1) read in the data; 2) build
the stiffness matrix K and force vector F; 3) set the boundary conditions
for K and F; and 4) solve the matrix equation KU=F. The problem
was an excellent candidate for conversion to task parallel computation,
because the contribution of each element to the stiffness matrix
K can be calculated independently from all other elements.
Four changes were made to the original MATLAB® code, to vectorize
the for-loops that calculate the stiffness value for each element
of matrices K and F.
Two different models (one with 16,000 elements, and the other with
159,000) were run on the desktop, and with Star-P connected to an
8-processor server. Speed-ups of 10-100 times were observed, due
in part to the improved (vectorized) code, and in part due to running
the computation on multiple processors.
Summary
& Metrics
- Medical application of finite element
analysis
- Task parallel computation leveraged
to construct the force and stiffness matrices (both sparse)
- Data parallel computation leveraged
to solve the equations
- Orders of magnitude of speedup due
to vectorization and parallel computation

Back to Success Stories
> |