Object-Oriented Numeric: A New Approach

Tips and Tricks

Scientific Computing

Scientific computing is the original application area of computers and remains one of the most important. Physical simulation is helping to considerably improve, even revolutionize, many technology and industry sectors: nuclear energy, environmental protection (mathematical modeling can be used for development planning and improvement in order to avoid high risk situations), advanced financial applications among many others. These problems are expressed as mathematical equations that describe physical behavior and in most practical/real case the solution cannot be expressed as simple, algebraic formulas or do not have analytical solution. Numerical methods are techniques for finding approximate solutions to mathematical problems and are implemented as computer program. This way mathematical equation that describes physical behavior can be solved. Scientific computing/programming is the collection of tools, techniques, and theories required to solve on a computer mathematical models of science and engineering which combines applied mathematics and computer science. Scientific programming community needs flexible but rigorous techniques and guidelines for software development. Object technology is recognized as one of the required tools in tackling these ever growing demands.

What is Object-Oriented?

Object-Oriented Programming (OOP) has proven to be useful programming paradigm in complex programs, especially those modeling “real world problems”. The building blocks of OOP support a step-wise software development from simple problems to more complicated problem. In general this process consists of identifying concepts of the problem i.e. to develop computational “objects” that represent fundamental or useful abstractions of the problem at hand. This approach is attractive due to the well-defined mechanisms for modular design, reusable of code in other application of already tested components and maintenance which is fundamental to OO. The result is an implementation that is manageable, extensible, and easily modified. OOP requires a new way of thinking about and, at first sight; implementation may often be more abstract and more difficult to understand then conventional codes.

Object-Oriented Numeric as a solution

This approach called “Object-Oriented Numeric” encourages the computer implementation of mathematical abstraction. In effect, numerical problems are often well suited for formulation in an Object-Oriented framework. This is not only true for the design of overall system structures, also at the algorithmic level concepts from OOP lend themselves naturally to the design.

Physical simulations typically involve several different types of physics. Each type if physics is best handled with different numerical method. Combining such code into an integrated code requires an architecture that specifies flexible data sharing and method invocation relationships between components while maintaining performance. According to the variety of the physical problems, also a large variety of solutions methods is employed. However, despite the differences, most algorithmic developments share many commons aspects. All methods rely on the discretization of the corresponding differential equations on a computational grid, being a dissection of the computational domain. Further the governing equations of very different problems show similar terms and, at times, similar mathematical behavior. Therefore it is desired, to encapsulate different topics as much as possible.

Especially, a high level of independence between the following program parts is required:
• Numeric (time integration, physics built-in algorithm such as Riemann solver, …)
• Boundary condition, numerical formulation
• It is often necessary to change a model or algorithm of a program for the sake of correction or improvements during the development or execution of a numerical simulation;

Object-Oriented programming is an appropriate tool to achieve this independence. In short, OOP encourages computer implementation of mathematical abstraction.

Below there is an example of this relationship between different components in numerical simulation.


clients and partners