• No results found

SimVis Application Construction and Use

Visual programming environments are one of the most successful solutions to the development of in- teractive SimVis applications in the research community. Such environments provide an architecture that supports rapid and intuitive application construction and interactive steering in the form of visual dataflow networks. The user can focus on steering the final application or on the development of cus- tom numerical or visualisation code.

However flexible, most existing SimVis visual programming environments have important limi- tations, especially with respect to the development of new software components or the integration of independently developed components. In particular, we focus on object-oriented (OO) software tech- niques, which offer well established tools in the software engineering community for large-scale code organisation and reuse. Both object orientation and visual dataflow programming are new techniques. Consequently, the combination of their advantages in the field of SimVis software design has been ad- dressed only partially.

The aim of this thesis is to provide a SimVis system that offers a close combination of the above two techniques. We approach this by first designing an abstract architecture that combines the dataflow and object-oriented modelling principles. This architecture extends the object-oriented constructions of the C++ language, such as typing, inheritance, and encapsulation, with the basic elements needed by dataflow modelling, namely input-output ports and the update operation. The combination of the two results in the MC++ component specification language, described in chapter 3.

MC++ provides a non-intrusive manner for extending C++ class libraries with the dataflow ele- ments that make them eligible for use in dataflow network construction. We use a black-box, non

intrusive code integration approach, in contrast to existing solutions for dataflow component design. Rather than modifying the semantics of the C++ language by adding new constructions to its syntax or designing a new language from scratch, as done by various SimVis systems, we defined MC++ as a ’shell’ language, or meta-language. This implies two things. First, the MC++ specification files, or meta-files, are separately analysed (e.g. parsed and interpreted) from the C++ files they extend. This makes the MC++ language implementation simple and easy to extend. Secondly, the original C++ code stays completely unchanged, which keeps it directly usable in other contexts, e.g. outside our SimVis environment.

The second step of our work takes the OO-dataflow architecture and the MC++ language to a con- crete implementation, theVISSIONsimulation and visualisation environment. Due to the syntactic and semantic separation of concerns of C++ and MC++ described above, the implementation ofVISSION was relatively simple, as compared to other similar SimVis environments. The key element of the im- plementation was the use of a C++ interpreter, or virtual machine, responsible for the dynamic C++ component loading and code execution. The concern separation mentioned above enabled us to com- pletely reuse an existing C++ virtual machine coming as about 80,000 lines of C/C++ source code. In contrast, the MC++ virtual machine we implemented ourselves is not larger than 20,000 C++ lines. The total of 100,000 lines of code is to be compared with similar SimVis system kernels of over 400,000 lines [113, 44, 118]. The design ofVISSIONis the object of chapter 5.

Similarly to existing visual SimVis application builders,VISSIONalso offers a visual programming interface for application construction and component interfaces for interactive monitoring and steering of applications. The architecture ofVISSION, based on the C++ and MC+ virtual machines, enables the automatic construction of both component iconic representations and component user interfaces out of the component specification written in MC++. Practically, this means that all SimVis user in- terface related aspects are provided inVISSIONwith no programming effort. The construction and use ofVISSION’s visual interfaces is described in chapter 4.

Our intention was not only to provide a better theoretical architectural framework for SimVis en- vironments and an eventual prototype implementation. The success of any software environment is ultimately measured by its effectivity and efficiency when facing its users. Consequently, we have extensively usedVISSIONfor the whole pipeline of SimVis component development, and application design and use, both for numerical simulation, as well as for visualisation applications. In the area of numerical simulation, we usedVISSIONfor the computational steering of an electro-chemical drilling (ECD) numerical simulation, as described in Section 6.2. The ECD problem illustrates well the use of VISSIONfor producing turn-key applications, in which end users can intuitively control and monitor a process via a simple interface.

A more extensive numerical application design and integration inVISSION is represented by the NUMLABcomponent library. NUMLABoffers a comprehensive set of C++ components for modelling a large class of numerical applications, such as ordinary and partial differential equations discretised and solved with various methods, on 2D and 3D domains. NUMLABwas developed as an independent C++ library. Its integration inVISSIONand coupling with various visualisation components demon- strates well the claim of easy application-independent component integration. Moreover, the object- oriented design of the NUMLABlibrary enables the modelling of a large class of numerical problem with a small set of software components. A major aim in the design of NUMLABwas orthogonality, which allows the application designer to easily interchange one component type with another one of a similar type, such as the interchange of numerical solvers, preconditioners, or mesh generators. As all these actions are done viaVISSION’s visual interface, numerical experimentation is greatly simplified as compared with other similar software applications. NUMLABis presented in section 6.3.

SIONof the over 500 components of the VTK visualisation library demonstrates again the flexibility of the proposed architecture. Several tens of visualisation applications were built using VTK components inVISSION, such as scalar, flow, and image data visualisation. These are described in Section 7.2.

Finally, we look at another application domain, namely realistic rendering. Similarly to the ECD application, we have integrated a C++ library for radiosity computations in VISSION. Using this li- brary, one can easily set up a 3D scene, initiate its rendering, and experiment interactively with the various parameters of the radiosity pipeline. Compared to the classical file input-output radiosity ap- plications, this allows a more intuitive understanding and control of the convergence issues involved in the radiosity process. This application is the object of Section 7.4.