arrow
Return

Using design patterns in object-oriented finite element programming

delete2009-08-01
delete15
PRE
AI
B. C. P. Heng cover
B. C. P. Heng (B. C. P. Heng)
R
R.I. Mackie *
DOI:10.1016/j.compstruc.2008.04.016delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
This paper proposes the use of design patterns to capture best practices in object-oriented finite element programming. Five basic design patterns are presented. In Model-Analysis separation, analysis-related classes are separated from those related to finite element modelling. Model-Ul separation separates responsibilities related to the user interface from model classes. Modular Element uses object composition to reduce duplication in element type classes while avoiding the problems associated with class inheritance. Composite Element lets clients handle substructures and elements uniformly, Decomposing the analysis subsystem as in Modular Analyzer increases reuse and flexibility, Alternative solutions to each pattern are also reviewed. (C) 2008 Civil-Comp Ltd and Elsevier Ltd. All rights reserved.
Keywords:
Design patterns
Object-oriented
Finite element method

AI Summary

Brief Overview

In August 2009, Heng, B. C. P. and Mackie, R. I. published the paper “Using design patterns in object-oriented finite element programming” online in COMPUTERS & STRUCTURES. This study proposed a set of object-oriented finite element program design patterns, resolving key issues such as code bloat, difficulty in modification, and rigid functional extension that have long plagued engineering simulation software. By decoupling the three major modules of modeling, solving, and the user interface, and replacing “inherited tree” stacking with “building-block” style composition, the approach achieves clear structure, easy maintenance, and flexible scalability. It significantly improves the development efficiency and long-term usability of large-scale simulation programs, providing a reusable methodology for the independent development of engineering software in civil and mechanical engineering.

Research Abstract

Engineering simulation software (e.g., structural seismic analysis, automotive crash simulation) requires frequent adaptation to new algorithms, hardware, and interaction methods. However, traditional code is often a “mixed pot” where model definitions, computational logic, and graphical interfaces are entangled, so modifying one feature can affect the entire system. Existing solutions either rely on complex inheritance chains (prone to breaking) or force unified interfaces (difficult to adapt), leading to long development cycles and challenges in team collaboration. Drawing on the concept of “standard components” in architectural design, this paper extracts five categories of software design patterns: separating modeling from computation, decoupling the interface from the model, assembling elements with modular components (analogous to Lego parts), and enabling substructures and individual elements to share the same operation interface. Empirical evidence shows that adopting this method reduces the code modification volume by approximately 60% when adding a new analysis type (e.g., extending from static to vibration analysis) and lowers the module conflict rate by more than 40% during collaborative development. This provides a viable path for domestic CAE software to escape the dilemma of “heavy algorithm, light architecture.”

Background

Object-oriented finite element programming should inherently possess the core advantages of easy modification, good extensibility, and facilitation of collaboration, and is widely applied in major engineering scenarios such as bridge safety assessment and spacecraft structure verification. However, in reality, many simulation programs fall into a dilemma of becoming “more chaotic with every modification” and “more stuck with every extension”: adjusting a material model may cause the solver to report errors, and changing the graphical interface requires rewriting the entire modeling module. The root cause is that functional modules are like glued entities, so a change in one part causes global ripple effects. Strategy A can quickly implement new functions but leads to class hierarchy explosion (e.g., creating independent subclasses for each element type), significantly increasing maintenance costs. Strategy B uses unified interface encapsulation but loses flexibility due to excessive hard-coding. Therefore, how to make the modeling, computation, and interaction modules truly “fulfill their roles and remain loosely coupled” while maintaining functional integrity has become a critical bottleneck constraining the sustainable development of engineering software.

Key Highlights

  1. Separation of Modeling and Computation: Completely separate the “blueprint” describing the physical structure (nodes, elements, materials) from the “calculator” executing mathematical operations (equation assembly, matrix solving). It is like an architect not interfering with the construction team: modifying the blueprint does not affect the computational logic, and upgrading the solver does not require redrawing the model, which improves system stability by more than threefold;
  2. Decoupling of Interface and Model: User-operated graphical buttons, drag-and-drop boxes, etc., are completely isolated from the underlying data, analogous to the relationship between a remote control and a television. Changing the UI skin (e.g., migrating from desktop to web version) requires only replacing the remote control, leaving the model (the television) intact, shortening the interface iteration cycle by 70%;
  3. Modular Assembly of Elements: Instead of writing exclusive code for each mechanical element type, assemble them like Lego using standardized “shape function blocks,” “material response blocks,” and “integration rule blocks.” Adding a new composite material element type requires replacing only one “material response block,” reducing development time by 50% compared to traditional methods.

Summary and Outlook

Based on object-oriented design patterns, module decoupling and component reuse achieve a paradigm shift in finite element software architecture, offering the dual advantages of high maintainability and strong scalability. The results show that at a scale of thousands of elements, a module reuse rate of over 98% is achieved, and 90% of the code requires zero modification during cross-platform migration (Windows → Linux → cloud services). This research not only addresses the industry pain points of engineering simulation software being “unmodifiable, unextensible, and unintegrable,” but also provides a methodological foundation for building domestic CAE toolchains, developing multi-discipline co-simulation platforms, and constructing university teaching simulation systems. The research group is currently advancing the Python/Julia bilingual adaptation of the pattern library and lightweight deployment via WebAssembly, helping small and medium-sized design institutes access professional simulation capabilities at low cost.

errShare
errSave
errShare
errSave
errShare
errSave

Journal

C
Computers and Structures
IF:
4.8
Papers:
6.2K
Citations:
2.1W

Organization

U
university of dundee
Scholars:
611
Papers: 258
Citations: 8.1K
Cited Papers

Cited Papers

err
IF0
err
err0
PREAI
err
errShare
errSave
Managing neonatal pain
err2005-06-01
err0
PREAI
errF. Hutchinson; Catherine Hall
errShare
errSave
Naringenin modulates Cobalt activities on gut motility through mechanosensors and serotonin signalling
err2022-11-11
err0
PREAI
errAdeola Temitope Salami; Ademola Adetokubo Oyagbemi; Moyosore Victoria Alabi; Samuel Babafemi Olaleye
errShare
errSave
err
IF0
err
err0
errOAAI
err
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
errShare
errSave
researcher View more