[ieee digests of the 2010 14th biennial ieee conference on electromagnetic field computation -...

1
Abstract—Nowadays software developments aim on managed code that organizes the memory occupation itself automatically by using the runtime environment. Hence, this is supposed to be very time intensive but simplifies the implementation in an immense way. Therefore, Java is used to determine the advantages and disadvantages of managed code in numerical simulations. In a first step a 3-D electrostatic FEM formulation is implemented in pure Java code by using an object-oriented structure based on design patterns. For an example of a 3-D numerical problem the processing time and the memory occupation are investigated and discussed regarding the use of pure Java code. I. INTRODUCTION For a 3-D electrostatic finite element method (FEM) simulation a complete software was implemented in pure Java to detect the accuracy, velocity, and the memory occupation. Due to the fact Java is managed code, memory occupations are organized by the runtime environment itself, hence numerical simulations are supposed to be slow. On the other hand, object-oriented programming using design patterns [1] is easy to be realized in Java, and keeps the software efficient, furthermore, prevents unprofitable operations. For the simulation of a 3-D electrostatic problem, a FEM formulation based on the energy of the electrical field strength is calculated. Therefore, a system of linear equations (SLE) has to be solved: [ ]{} {} R ϕ = Κ . (1) The huge sparse stiffness matrix K of the FEM SLE is organized in Java by a combination of sparse vectors. Hence, this displays the first problem for managed code. II. MEMORY OCCUPATION AND RUNTIME INVESTIGATION Since the latest available version of the runtime environment, Java has nearly no memory overhead for organizing sparse 2-D vector structures in these scales automatically. The memory occupation is sufficient low compared to unmanaged code like C++. Even larger Java simulations can be run on normal computers, due to nowadays available runtime environments. Normally, one could claim that the processing time suffers from the automatic memory organization, thus, a first investigation due to the processing time is presented. By Fig. 1 the computing time of a 3-D integral assembly constisting of 2304 isoparametric hexahedron shaped elements of 1 st , 2 nd and 3 rd order over an incrementing number of 1 to 15 Gaussian points in every single dimension is displayed. Fig. 1.Computation time for hexahedrons of 1 st , 2 nd and 3 rd order The computation was performed on a usual single 2.4 GHz 32 bit CPU core. Figure 1 shows that the computation time of managed code is nowadays comparable to unmanaged code like C++. Even in case of a cubical growth of the computation effort for a rising number of Gaussian points, one can derive that the speed up of the runtime increases for larger numbers; e.g. hexa32: the gradient lowers after 7 gaussian points. Java and C++ will be compared in the full paper. III. OBJECT-ORIENTED DEVELOPMENT IN JAVA For the calculation of a 3-D electrostatic FEM problem the geometry is either discretized with hexahedron shaped elements of first, second, or third order or even discretized by a composition of these elements. Due to the used combination of design patterns in object-oriented software development it is not important for the simulation what type of element is used as the element super class covers all element types. The geometry is decoupled from the simulation by the use of an approximation builder class. This class gets the suitable approximation object with the fitting shape functions and their derivatives for a specific type of element [1]. Whereas, the code can be easily extended or changed, and no maintenance is necessary. IV. CONCLUSION A 3-D numerical FEM simulation using higher order elements is implemented in object-oriented Java code based on design patterns. Therefore, the efficiency of such managed code processed in a modern runtime environment is proven. V. REFERENCES [1] S. J. Metsker, and W. C. Wake, “Design Patterns in Java,“ Addison- Wesley Professional, 2 nd edition, 2006. Object-Oriented Development and Runtime Investigation of 3-D electrostatic FEM problems in pure Java Veronika Reinauer, Tassilo Wendland, Christian Scheiblich, Remus Banucu, and Wolfgang M. Rucker Institute for Theory of Electrical Engineering, University of Stuttgart Pfaffenwaldring 47, 70569 Stuttgart, Germany {veronika.reinauer, christian.scheiblich, remus.banucu, rucker}@ite.uni-stuttgart.de [email protected] 978-1-4244-7062-4/10/$26.00 ©2010 IEEE

Upload: wolfgang-m

Post on 08-Dec-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: [IEEE Digests of the 2010 14th Biennial IEEE Conference on Electromagnetic Field Computation - Chicago, IL, USA (2010.05.9-2010.05.12)] Digests of the 2010 14th Biennial IEEE Conference

Abstract—Nowadays software developments aim on managed code that organizes the memory occupation itself automatically by using the runtime environment. Hence, this is supposed to be very time intensive but simplifies the implementation in an immense way. Therefore, Java is used to determine the advantages and disadvantages of managed code in numerical simulations. In a first step a 3-D electrostatic FEM formulation is implemented in pure Java code by using an object-oriented structure based on design patterns. For an example of a 3-D numerical problem the processing time and the memory occupation are investigated and discussed regarding the use of pure Java code.

I. INTRODUCTION

For a 3-D electrostatic finite element method (FEM) simulation a complete software was implemented in pure Java to detect the accuracy, velocity, and the memory occupation. Due to the fact Java is managed code, memory occupations are organized by the runtime environment itself, hence numerical simulations are supposed to be slow. On the other hand, object-oriented programming using design patterns [1] is easy to be realized in Java, and keeps the software efficient, furthermore, prevents unprofitable operations.

For the simulation of a 3-D electrostatic problem, a FEM formulation based on the energy of the electrical field strength is calculated. Therefore, a system of linear equations (SLE) has to be solved:

[ ]{ } { }Rϕ =Κ . (1) The huge sparse stiffness matrix K of the FEM SLE is

organized in Java by a combination of sparse vectors. Hence, this displays the first problem for managed code.

II. MEMORY OCCUPATION AND RUNTIME INVESTIGATION

Since the latest available version of the runtime environment, Java has nearly no memory overhead for organizing sparse 2-D vector structures in these scales automatically. The memory occupation is sufficient low compared to unmanaged code like C++. Even larger Java simulations can be run on normal computers, due to nowadays available runtime environments.

Normally, one could claim that the processing time suffers from the automatic memory organization, thus, a first investigation due to the processing time is presented.

By Fig. 1 the computing time of a 3-D integral assembly constisting of 2304 isoparametric hexahedron shaped elements of 1st, 2nd and 3rd order over an incrementing number of 1 to 15

Gaussian points in every single dimension is displayed.

Fig. 1.Computation time for hexahedrons of 1st, 2nd and 3rd order

The computation was performed on a usual single 2.4 GHz 32 bit CPU core. Figure 1 shows that the computation time of managed code is nowadays comparable to unmanaged code like C++. Even in case of a cubical growth of the computation effort for a rising number of Gaussian points, one can derive that the speed up of the runtime increases for larger numbers; e.g. hexa32: the gradient lowers after 7 gaussian points. Java and C++ will be compared in the full paper.

III. OBJECT-ORIENTED DEVELOPMENT IN JAVA

For the calculation of a 3-D electrostatic FEM problem the geometry is either discretized with hexahedron shaped elements of first, second, or third order or even discretized by a composition of these elements. Due to the used combination of design patterns in object-oriented software development it is not important for the simulation what type of element is used as the element super class covers all element types. The geometry is decoupled from the simulation by the use of an approximation builder class. This class gets the suitable approximation object with the fitting shape functions and their derivatives for a specific type of element [1]. Whereas, the code can be easily extended or changed, and no maintenance is necessary.

IV. CONCLUSION

A 3-D numerical FEM simulation using higher order elements is implemented in object-oriented Java code based on design patterns. Therefore, the efficiency of such managed code processed in a modern runtime environment is proven.

V. REFERENCES

[1] S. J. Metsker, and W. C. Wake, “Design Patterns in Java,“ Addison-Wesley Professional, 2nd edition, 2006.

Object-Oriented Development and Runtime Investigation of 3-D electrostatic FEM problems in pure Java

Veronika Reinauer, Tassilo Wendland, Christian Scheiblich, Remus Banucu, and Wolfgang M. Rucker

Institute for Theory of Electrical Engineering, University of Stuttgart Pfaffenwaldring 47, 70569 Stuttgart, Germany

{veronika.reinauer, christian.scheiblich, remus.banucu, rucker}@ite.uni-stuttgart.de [email protected]

978-1-4244-7062-4/10/$26.00 ©2010 IEEE