Nonlinear Finite-Element Analysis Software Architecture Using Object Composition

Object composition offers significant advantages over class inheritance to develop a flexible software architecture for finiteelement analysis. Using this approach, separate classes encapsulate fundamental finite-element algorithms and interoperate to form and solve the governing nonlinear equations. Communication between objects in the analysis composition is established using software design patterns. Root-finding algorithms, time integration methods, constraint handlers, linear equation solvers, and degree of freedom numberers are implemented as interchangeable components using the Strategy pattern. The Bridge and Factory Method patterns allow objects of the finite-element model to vary independently from objects that implement the numerical solution procedures. The Adapter and Iterator patterns permit equations to be assembled entirely through abstract interfaces that do not expose either the storage of objects in the analysis model or the computational details of the time integration method. Sequence diagrams document the interoperability of the analysis classes for solving nonlinear finite-element equations, demonstrating that object composition with design patterns provides a general approach to developing and refactoring nonlinear finite-element software.  Database subject headings: Computer programming; Computer software; Finite element method; Nonlinear analysis.  Computer programming; Computer software; Finite element method; Nonlinear analysis.  Performance-based methodologies in structural engineering have increased the need for high-fidelity simulation of structural response under extreme loads, such as earthquake, blast, and other events that may cause damage or lead to progressive collapse Moehle and Deierlein 2004 . Simulation software for performance-based engineering must be able to accommodate sophisticated constitutive models for conventional and novel materials and soils, large displacement analysis methods, and robust solution algorithms for dynamic loads, among many other requirements. The finite-element method provides a general methodology for simulating the response of structural and geotechnical systems to arbitrary loading. To incorporate future developments and specific user needs, simulation software must provide interfaces for new finite-element formulations, solution algorithms, equation solvers, and support for advanced computing, modeling, visualization, and data mining. For example, parallel computing is becoming common in engineering, and structural simulation Research Engineer, Dept. of Civil and Environmental Engineering, Univ. of California, Berkeley, CA 94720.  fmckenna@ ce.berkeley.edu Assistant Professor, School of Civil and Construction Engineering, Oregon State Univ., Corvallis, OR 97331 corresponding author .  Austin, TX 78712.  This manuscript was submitted on April 21, 2008; approved on November 2, 2008; published online on December 15, 2009.  period open until June 1, 2010; separate discussions must be submitted for individual papers. This paper is part of the Journal of Computing in Civil Engineering, Vol. 24, No. 1, January 1, 2010.  Redistribution subject to software needs to be able to take advantage of hardware systems that range from multicore processors to massively parallel computers Modak and Sotelino 2002; Peng et al. 2004 . To address these requirements, finite-element simulation software must be designed for computational efficiency, flexibility, extensibility, and portability. The traditional focus of simulation software development has been efficiency, but the other goals are equally important when considering the complete software lifecycle. Flexibility means that software components can be combined to provide new capability, even if it was not anticipated in the original design. Extensibility means that both the design and implementation of software components can be made more specific or to provide additional functionality. Portable software is designed to run on a variety of computer architectures and operating systems to take advantage of new computing capability. To address these needs, this paper presents a new objectoriented architecture in which the goals of flexibility, extensibility, and portability of finite-element software are achieved by emphasizing object composition over implementation inheritance in the software design. The major contribution is the use of composition of software components that implement solution procedures for the nonlinear governing equations of a finite-element model. Object composition is shown to provide a superior software design compared with the more common use of class inheritance. In addition to composition, the software architecture uses software design patterns to organize communication between the components of a nonlinear finite-element analysis. The architecture allows these components to be combined to create customized simulation applications, further enhancing flexibility, extensibility, and portability. The modular nature of the finite-element method results from its mathematical formulation Hughes 1987; Bathe 1996; Zienkiewicz and Taylor 2005 . Several researchers have developed object-oriented software designs and implementations for IN CIVIL ENGINEERING  The encapsulation of data and methods allows object-oriented programs more flexibility and extensibility than equivalent procedure-oriented programs Rumbaugh et al. 1991; Booch 1994; Sommerville 1995 , which can be exploited in engineering software development Fenves 1990; Baugh and Rehak 1992 . A bibliographic listing of object-oriented finite-element implementations between 1990 and 2003 is given by Mackerle 2004 . Early works Forde et al. 1990; Miller 1991; Mackie 1992 demonstrated that objectoriented structural analysis software has shorter development times and is easier to maintain and extend than procedural software. The main drawback to object-oriented software is the computational expense of dynamic memory management, which can account for up to 30% of program execution time Chang et al. 2001 , and random utilization of the memory heap which can cause excessive page faulting in larger programs. This expense can be mitigated by effective programming techniques such as passing references to objects to avoid the dynamic allocation of temporary objects, which is an important consideration for programs written in C Meyers 1997 . With effective memory management, the increase in computation time for object-oriented finite analysis over procedural implementations ranges from 10 to 15% Dubois-Pelerin and Zimmermann 1993; Rucki and Miller 1996 . Recent work to advance research in performance-based earthquake engineering has been organized around the object-oriented software framework OpenSees for structural and geotechnical simulation applications McKenna et al. 2000 . A software framework is a set of classes that a developer can combine and reuse to create an application. The framework defines the abstract classes and provides many of the concrete classes that implement specific functionality for an application space. The abstract classes define a common interface for all users of the class, e.g., an abstract Element class defines methods to compute and return its resisting forces and tangent stiffness. This set of methods is often referred to as an “abstract interface.” The concrete classes provide the implementation of the methods declared in the abstract class, or if a method has been implemented in the abstract class, the concrete class can override the method by providing its own implementation. <<interface>> ModelBuilder Domai populates