The C++ implementation of refined level set grid (RLSG) method
Description
In this thesis, a FORTRAN code is rewritten in C++ with an object oriented ap-
proach. There are several reasons for this purpose. The first reason is to establish
the basis of a GPU programming. To write programs that utilize GPU hardware,
CUDA or OpenCL is used which only support C and C++. FORTRAN has a feature
that lets its programs to call C/C++ functions. FORTRAN sends relevant data to
C/C++, which in turn sends that data to OpenCL. Although this approach works,
it makes the code messy and bulky and in the end more difficult to deal with. More-
over, there is a slight performance decrease from the additional data copy. This is
the motivation to have the code entirely written in C++ to make it more uniform,
efficient and clean. The second reason is the object oriented feature of the C++. The
“abstraction”, “inheritance” and “run-time polymorphism” features of C++ provide
some form of classes and objects, the ability to build new abstractions, and some
form of run-time binding, respectively. In recent years, some of popular codes has
been rewritten in C++ which were initially in FORTRAN. One of these softwares is
LAMMPS.
In this code the level set equation is solved by RLSG method to track the interface in
two phase flow. In gas/fluid flows, the surface tension is important and only exists at
the interface. Therefore, the location and some geometric features of interface need
to be evaluated which can be achieved by solving the level set equation.
proach. There are several reasons for this purpose. The first reason is to establish
the basis of a GPU programming. To write programs that utilize GPU hardware,
CUDA or OpenCL is used which only support C and C++. FORTRAN has a feature
that lets its programs to call C/C++ functions. FORTRAN sends relevant data to
C/C++, which in turn sends that data to OpenCL. Although this approach works,
it makes the code messy and bulky and in the end more difficult to deal with. More-
over, there is a slight performance decrease from the additional data copy. This is
the motivation to have the code entirely written in C++ to make it more uniform,
efficient and clean. The second reason is the object oriented feature of the C++. The
“abstraction”, “inheritance” and “run-time polymorphism” features of C++ provide
some form of classes and objects, the ability to build new abstractions, and some
form of run-time binding, respectively. In recent years, some of popular codes has
been rewritten in C++ which were initially in FORTRAN. One of these softwares is
LAMMPS.
In this code the level set equation is solved by RLSG method to track the interface in
two phase flow. In gas/fluid flows, the surface tension is important and only exists at
the interface. Therefore, the location and some geometric features of interface need
to be evaluated which can be achieved by solving the level set equation.
Date Created
The date the item was original created (prior to any relationship with the ASU Digital Repositories.)
2015
Agent
- Author (aut): Safarkhani, Salar
- Thesis advisor (ths): Herrmann, Mrcus
- Committee member: Oswald, Jay
- Committee member: Rykczewski, Konrad
- Publisher (pbl): Arizona State University