Page 300 - The Combined Finite-Discrete Element Method
P. 300

ALTERNATIVE HARDWARE ARCHITECTURES        283

           available in ten or twenty years time. In the meantime, the role of computational mechanics
           of discontinua is to develop suitable accurate and robust computational solutions.


           9.4 WHY THE C PROGRAMMING LANGUAGE?

           It is most often the case that combined finite-discrete element systems are large. This
           makes the reduction of CPU and RAM requirements very important. This can be done in
           several ways:
           • design fast algorithmic solutions,
           • use robust hardware, or
           • implement the algorithms in such a way that the program is made to run faster and is
             more efficient in terms of RAM.
           There are several ways in which a particular algorithm can be implemented in a more
           efficient way. Most of them are connected to the computer language used. For instance,
           applications implemented in assembler are usually faster than those implemented in FOR-
           TRAN. The problem is that assembler is a low level language, where transparency
           becomes difficult as soon as the code exceeds few hundred lines. At the other end of
           the spectrum are high level, object-oriented languages such as C++ or Java. The problem
           with those is that speed is not always easy to achieve, especially with Java.
             The C computer language seems to cover both ends of the spectrum. Features such
           as pointers, pointers to functions, dynamic memory allocation, shift operators, etc. make
           this language very suitable for writing very fast codes that are gentle in terms of RAM
           requirements. It is worth mentioning, for instance, that the UNIX operating system is
           written in C. Thus, a computer program written in C becomes almost an extension of the
           operating system itself.
             Features such as structures, private and public data and methods (functions) make this
           language suitable for writing very large transparent codes. In fact C++ is an extension
           of C, where additional features such as inheritance, classes and virtual objects are added.
           Some C++ compilers compile the C++ code by first translating it into C and then using
           a C compiler to compile the C translation of the code.


           9.5 ALTERNATIVE HARDWARE ARCHITECTURES

           Combined finite-discrete element simulations are computationally much more intensive
           than the more familiar finite element methods. Thus, many CPU critical simulations are
           almost impossible on present day sequential architectures. A solution to at least some of
           these CPU and/or RAM intensive combined finite-discrete element simulations is sought
           in the form of parallel and distributed computing.


           9.5.1   Parallel computing


           Implementation of parallel computing in combined finite-discrete element simulations
           requires access to parallel machines. These machines are characterised by a number of
   295   296   297   298   299   300   301   302   303   304   305