Toward Opaque Typedefs for C++1Y
Although this paper is self-contained, it logically follows our discussion, begun several years ago in N1706 and continued in N1891, of a feature oft-requested for C++: an opaque typedef , sometimes termed a strong typedef . The earlier of those works was presented to WG21 on 2004-10-20 during the Redmond meeting, and the later work was presented during the Berlin meeting on 2005-04-06. Both presentations resulted in very strong encouragement to continue development of such a language feature.1 Alas, the press of other obligations has until recently not permitted us to resume our explorations.
The Role of Implicit Conversions in Erroneous Function Argument Swapping in C++
Argument selection defects, in which the programmer has chosen the wrong argument to a function call is a widely investigated problem. The compiler can detect such misuse of arguments based on the argument and parameter type in case of statically typed programming languages. When adjacent parameters have the same type, or they can be converted between one another, the potential error will not be diagnosed. Related research is usually confined to exact type equivalence, often ignoring potential implicit or explicit conversions. However, in current mainstream languages, like C++, built-in conversions between numerics and user-defined conversions may significantly increase the number of mistakes to go unnoticed. We investigated the situation for C and C++ languages where functions are defined with multiple adjacent parameters that allow arguments to pass in the wrong order. When implicit conversions are taken into account, the number of mistake-prone function declarations significantly increases compared to strict type equivalence. We analysed the outcome and categorised the offending parameter types. The empirical results should further encourage the language and library development community to emphasise the importance of strong typing and the restriction of implicit conversion.
Computational fluid dynamics as a development tool for rotary blood pumps.
Computational fluid dynamics (CFD) is beginning to significantly impact the development of biomedical devices, in particular rotary cardiac assist devices. The University of Pittsburgh's McGowan Center for Artificial Organ Development has extensively used CFD as the primary tool to analyze and design a novel axial flow blood pump having a magnetically suspended rotor. The blood-contacting surfaces of the pump were developed using a design strategy based on CFD that involved closely coupling a Navier-Stokes solver to a parameterized geometry modeler and advanced mesh movement techniques. CFD-based blood damage models for shear-induced hemolysis as well as surrogate functions describing thrombosis potential were employed to help guide design improvements. This CFD-based design approach resulted in the timely development of a pump subjected to multiple geometric refinements without building expensive physical prototypes for each design iteration. A physical prototype of the final improved pump was fabricated and experimentally analyzed using particle imaging flow visualization. The CFD predicted results correlated well with the experimental data including pressure-flow (H-Q) performance and specific flow field features. It is estimated that the present CFD-based design approach shortened the overall design time frame from an order of years to months.