首页 | 本学科首页   官方微博 | 高级检索  
     


Finite element programming and C
Authors:Z. Sanal
Affiliation:

Process Engineering and Contracting Division, Linde AG, 82049 Hoellriegelskreuth, Germany

Abstract:In finite element programming, data have to be dealt with which are of different types but belong together in a logical sense. It would be very effective, with respect to program readability and maintainability, to store these data as a single unit. Effcient software design requires that all parts of information, which belong together logically, are stored as a single data unit. This can be accomplished utilizing structured data types.

Dynamic memory allocation allows the definition of dynamic variables which can be created and destroyed during run-time. Dynamic memory management is handled in C by pointers. In other conventional languages, e.g. Fortran 77, the programmer has the responsibility to select adequate array sizes for the largest problem to be solved. This often leads in engineering practice to array oversizing and to memory wasting. By allocating memory dynamically during program execution according to actual problem size, wasting can be avoided.

The combination of structured data and pointers along with the dynamic memory allocation capabilities of C allows the creation of linked lists. Utilizing these concepts, an effective and easy-to-read C program has been written for finite element analysis. The C program presented demonstrates the use of these techniques for interactive finite mesh generation. The strengths of C are compared to that of Fortran 77 and Fortran 90. It has been found that for finite element programming C is in many aspects superior to Fortran 77. However, it has some disadvantages in comparison with Fortran 90 concerning array processing.

Keywords:
本文献已被 ScienceDirect 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号