10
ElVis: A System for the Accurate and Interactive Visualization of High-Order Finite Element Solutions Blake Nelson, Eric Liu, Robert Haimes, and Robert M. Kirby, Member, IEEE Fig. 1. Pressure field on the ONERA M6 Wing (Section 5.1.2), rendered using ElVis and illustrating the application of color maps and contour lines on curved and planar surfaces. Abstract—This paper presents the Element Visualizer (ElVis), a new, open-source scientific visualization system for use with high- order finite element solutions to PDEs in three dimensions. This system is designed to minimize visualization errors of these types of fields by querying the underlying finite element basis functions (e.g., high-order polynomials) directly, leading to pixel-exact repre- sentations of solutions and geometry. The system interacts with simulation data through runtime plugins, which only require users to implement a handful of operations fundamental to finite element solvers. The data in turn can be visualized through the use of cut surfaces, contours, isosurfaces, and volume rendering. These visualization algorithms are implemented using NVIDIA’s OptiX GPU-based ray-tracing engine, which provides accelerated ray traversal of the high-order geometry, and CUDA, which allows for effective parallel evaluation of the visualization algorithms. The direct interface between ElVis and the underlying data differentiates it from existing visualization tools. Current tools assume the underlying data is composed of linear primitives; high-order data must be interpolated with linear functions as a result. In this work, examples drawn from aerodynamic simulations–high-order discontinuous Galerkin finite element solutions of aerodynamic flows in particular–will demonstrate the superiority of ElVis’ pixel-exact approach when compared with traditional linear-interpolation methods. Such methods can introduce a number of inaccuracies in the resulting visualization, making it unclear if visual artifacts are genuine to the solution data or if these artifacts are the result of interpolation errors. Linear methods additionally cannot properly visualize curved geometries (elements or boundaries) which can greatly inhibit developers’ debugging efforts. As we will show, pixel-exact visualization exhibits none of these issues, removing the visualization scheme as a source of uncertainty for engineers using ElVis. Index Terms—High-order finite elements, spectral/hp elements, discontinuous Galerkin, fluid flow simulation, cut surface extraction, contours, isosurfaces. 1 Introduction High-order finite element methods (a variant of which are the spectral/hp element methods considered in this work [12]) have ad- vanced to the point that they are now commonly applied to many real- world engineering problems, such as those found in fluid mechanics, solid mechanics and electromagnetics [25, 11]. An attractive feature of these methods is that convergence can be obtained by reducing the size of an element (h adaptivity), by increasing the polynomial or- der within an element ( p adaptivity), or by combining these two ap- B. Nelson and R.M. Kirby are with the School of Computing and the Scientific Computing and Imaging Institute at the University of Utah, E-mail: bnelson,[email protected]. E. Liu and R. Haimes are with the Department of Aeronautics and Astronautics, MIT, E-mail: ehliu,[email protected]. Manuscript received 31 March 2012; accepted 1 August 2012; posted online 14 October 2012; mailed on 5 October 2012. For information on obtaining reprints of this article, please send e-mail to: [email protected]. proaches. Meshes built with high-order solutions in mind can obtain the same level of accuracy with far fewer degrees of freedom than their linear counterparts [36]. Engineers working with high-order simulation data encounter sig- nificant obstacles when attempting to generate accurate visualizations. The underlying finite element basis functions are represented in terms of nonlinear functions (e.g., the high-order polynomials considered in this work), yet most visualization methods assume that the basis func- tions are linear. Therefore, to generate a visualization, the simulation data must first be converted into a linear format. While linear interpo- lation enables the engineer to produce the desired image, it introduces error into the visualization. This leads to the common question: are the features and artifacts seen in the visualization part of the high- order data, or are they errors introduced through the visualization pro- cess? Unfortunately, visualization errors arising from linear interpola- tion look the same as genuine solution artifacts arising from problems such as insufficient mesh resolution. With traditional interpolation- based rendering techniques, engineers are hard-pressed to differentiate between the numerous potential causes of visual artifacts. The sever- ity of these visualization errors can be mitigated by refining the linear 2325 1077-2626/12/$31.00 © 2012 IEEE Published by the IEEE Computer Society IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL. 18, NO. 12, DECEMBER 2012

ElVis: A System for the Accurate and Interactive Visualization of … · 2014-08-29 · ElVis: A System for the Accurate and Interactive Visualization of High-Order Finite Element

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ElVis: A System for the Accurate and Interactive Visualization of … · 2014-08-29 · ElVis: A System for the Accurate and Interactive Visualization of High-Order Finite Element

ElVis: A System for the Accurate and Interactive Visualization ofHigh-Order Finite Element Solutions

Blake Nelson, Eric Liu, Robert Haimes, and Robert M. Kirby, Member, IEEE

Fig. 1. Pressure field on the ONERA M6 Wing (Section 5.1.2), rendered using ElVis and illustrating the application of color maps andcontour lines on curved and planar surfaces.

Abstract—This paper presents the Element Visualizer (ElVis), a new, open-source scientific visualization system for use with high-order finite element solutions to PDEs in three dimensions. This system is designed to minimize visualization errors of these typesof fields by querying the underlying finite element basis functions (e.g., high-order polynomials) directly, leading to pixel-exact repre-sentations of solutions and geometry. The system interacts with simulation data through runtime plugins, which only require usersto implement a handful of operations fundamental to finite element solvers. The data in turn can be visualized through the use ofcut surfaces, contours, isosurfaces, and volume rendering. These visualization algorithms are implemented using NVIDIA’s OptiXGPU-based ray-tracing engine, which provides accelerated ray traversal of the high-order geometry, and CUDA, which allows foreffective parallel evaluation of the visualization algorithms. The direct interface between ElVis and the underlying data differentiates itfrom existing visualization tools. Current tools assume the underlying data is composed of linear primitives; high-order data must beinterpolated with linear functions as a result. In this work, examples drawn from aerodynamic simulations–high-order discontinuousGalerkin finite element solutions of aerodynamic flows in particular–will demonstrate the superiority of ElVis’ pixel-exact approachwhen compared with traditional linear-interpolation methods. Such methods can introduce a number of inaccuracies in the resultingvisualization, making it unclear if visual artifacts are genuine to the solution data or if these artifacts are the result of interpolationerrors. Linear methods additionally cannot properly visualize curved geometries (elements or boundaries) which can greatly inhibitdevelopers’ debugging efforts. As we will show, pixel-exact visualization exhibits none of these issues, removing the visualizationscheme as a source of uncertainty for engineers using ElVis.

Index Terms—High-order finite elements, spectral/hp elements, discontinuous Galerkin, fluid flow simulation, cut surface extraction,contours, isosurfaces.

1 Introduction

High-order finite element methods (a variant of which are thespectral/hp element methods considered in this work [12]) have ad-vanced to the point that they are now commonly applied to many real-world engineering problems, such as those found in fluid mechanics,solid mechanics and electromagnetics [25, 11]. An attractive featureof these methods is that convergence can be obtained by reducing thesize of an element (h adaptivity), by increasing the polynomial or-der within an element (p adaptivity), or by combining these two ap-

• B. Nelson and R.M. Kirby are with the School of Computing and theScientific Computing and Imaging Institute at the University of Utah,E-mail: bnelson,[email protected].

• E. Liu and R. Haimes are with the Department of Aeronautics andAstronautics, MIT, E-mail: ehliu,[email protected].

Manuscript received 31 March 2012; accepted 1 August 2012; posted online14 October 2012; mailed on 5 October 2012.For information on obtaining reprints of this article, please sende-mail to: [email protected].

proaches. Meshes built with high-order solutions in mind can obtainthe same level of accuracy with far fewer degrees of freedom than theirlinear counterparts [36].

Engineers working with high-order simulation data encounter sig-nificant obstacles when attempting to generate accurate visualizations.The underlying finite element basis functions are represented in termsof nonlinear functions (e.g., the high-order polynomials considered inthis work), yet most visualization methods assume that the basis func-tions are linear. Therefore, to generate a visualization, the simulationdata must first be converted into a linear format. While linear interpo-lation enables the engineer to produce the desired image, it introduceserror into the visualization. This leads to the common question: arethe features and artifacts seen in the visualization part of the high-order data, or are they errors introduced through the visualization pro-cess? Unfortunately, visualization errors arising from linear interpola-tion look the same as genuine solution artifacts arising from problemssuch as insufficient mesh resolution. With traditional interpolation-based rendering techniques, engineers are hard-pressed to differentiatebetween the numerous potential causes of visual artifacts. The sever-ity of these visualization errors can be mitigated by refining the linear

2325

1077-2626/12/$31.00 © 2012 IEEE Published by the IEEE Computer Society

IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL. 18, NO. 12, DECEMBER 2012

Page 2: ElVis: A System for the Accurate and Interactive Visualization of … · 2014-08-29 · ElVis: A System for the Accurate and Interactive Visualization of High-Order Finite Element

approximations, but this approach does not scale well, requiring toomuch computational time and storage to be practical [27].

A variety of visualization algorithms developed in recent yearsaddress interpolation-based errors by using the high-order data di-rectly. However, these techniques are scattered across multiple soft-ware packages and tools; as a result, the barrier to entry is high forusers. Additionally, existing methods assume knowledge of the un-derlying basis functions used, requiring that the data first be convertedinto the appropriate format for each tool used.

To address these issues, we need an integrated visualization systemthat is designed specifically for high-order finite element solutions.Specifically, such a system must have the following features:

• Extensible Architecture: To support data originating fromany high-order simulation, the system’s visualization algorithmsshould be decoupled from the data representation, allowing themto change independently of each other. The advantage of this ap-proach is that the visualization algorithms can be improved asnew techniques and algorithms are developed, while engineersare free to choose whatever basis functions are most appropriatefor the scenarios under investigation. This architecture enablesthe system to support methods currently in use, as well as meth-ods that have not yet been developed.

• Accurate Visualization: To avoid introducing error into the vi-sualization, the high-order system must work with the high-orderdata directly. Specifically, the system must be able to evalu-ate the solution at arbitrary locations in the domain to machineprecision. The system must also support visualization methodsthat have been developed based on the a priori knowledge thatthe data was produced by a high-order finite element simulation.These methods will ideally make use of the smoothness prop-erties of the high-order field on the interior of each elements,while respecting the breaks in continuity that may occur at ele-ment boundaries.

• Interactive Performance: In terms of computational resourcesrequired, using the high-order data directly carries significantlyhigher costs than using simpler linear approximations. Whilea high-order system is not expected to provide the same levelof performance as its linear counterparts, it should provide aninteractive experience on a standard desktop workstation (i.e., itshould not require expensive, special purpose hardware).

In this paper we describe the Element Visualizer (ElVis), a newhigh-order finite element visualization system that meets the require-ments listed above. We demonstrate ElVis’ utility by using it to vi-sualize finite element simulations produced by ProjectX, which is ageneral-purpose PDE solver with an emphasis on aerospace applica-tions [7, 21, 6, 36, 35]. Specifically, we will consider the visualizationsnecessary during the debugging and verification processes of modelgeneration.

2 Related WorkIn recent years, there has been a growing awareness of the errorscaused by using linear methods to visualize high-order data. Thishas lead to the development of many new algorithms that have beendesigned to accurately render high-order fields. In this section, weprovide a brief overview of these algorithms.

A popular visualization technique is the use of color maps and con-tours on surfaces (element and geometry boundaries) and cut-surfaces.These techniques allow the engineer to gain detailed information aboutspecific locations in the data set. There are several schemes that applycolor maps to planar data. In one approach, the color map is generatedby what is called a polynomial basis texture [8]. Each basis functionused in the high-order field is sampled onto a triangular texture map.The colors in the triangle are not generated by linear interpolation, butinstead by the linear combination of the appropriate textures, based onthe triangle’s order. In this way, a set of basis textures can be generated

in a pre-processing step, and then, assuming there is sufficient resolu-tion in the texture, accurate images can be generated for all high-ordertriangles. Another method uses an OpenGL fragment shader to cal-culate the field’s value at each fragment’s location, resulting in moreaccurate lookup into the color map [4]. Finally, another method ana-lytically calculates the intersection of a plane and quadratic tetrahedra,then uses a ray tracer to apply the color map to the new primitive [32].

Most of the work dealing with the generation of contour lines dealsonly with 2D high-order elements. A common theme is to generatethe contours in an element’s reference space (which we will definein Section 3) and then transform them into global (world) space fordisplay. One approach [15] creates contour lines in an element’s ref-erence space by subdividing the domain and using linear interpolationwithin these sub-domains to create a piecewise linear contour. Anotherapproach steps along a direction orthogonal to the field’s gradient [3],where each step is controlled by a user-defined step size. A methodfor generating contour lines over quadrilateral elements by determin-ing the shape of the contour in reference space and then generating apolyline to approximate it was developed in [28] and later extended tolinear and quadratic triangles in [29].

The only 3D contouring algorithm [13] generates contour lines oncut-planes through finite element volumes. The procedure first locatesa seed point for the contour line along the element’s boundary. It thensteps in a direction orthogonal to the field’s gradient, using a user-controlled step size, to generate a polyline representing the contour.It differs from the previously described methods in that the plane isa three-dimensional entity. At each step, the contour can, and oftendoes, move off of the cut-surface. The method introduces a correctionterm to fix this problem and keep the contour on the cut-plane. Aswith the other object-space contour methods described, the step size isuseful to determine how accurately the polyline represents the contourin world space, but is not as useful in expressing how accurate the finalimage is, as it can be accurate from one view but have large error inanother.

Several approaches have been developed for volume renderinghigh-order fields. An analytic solution to the volume rendering integralwas developed in [34] for linear and quadratic tetrahedra. Numerical,point-based solutions for high-order tetrahedra were presented in [37],and solutions for arbitrary elements and order have been developed aswell [30]. Approaches for isosurface rendering have been developedfor quadratic tetrahedra using analytical calculation of the isosurface inreference space [33] and through ray-tracing approaches [32]. Otherapproaches include using a ray tracer for arbitrary elements of arbi-trary order [19], a point-based approach that uses particles that activelyseek and distribute themselves on the isosurface [16] and a hybrid sys-tem that combines isosurface-seeking particles and ray-tracing [23].Finally, new approaches for creating line-type features in scalar andvector fields [22] have recently been developed that are optimized forhigh-order fields.

3 High-Order Finite Element MethodsA finite element volume is represented by the triangulation TH of anopen, bounded domain Ω into a mesh of Ne non-overlapping elementsκi. Ω exists in what is called the world space. The elements κi aresuch that Ω =

⋃i≤Ne

κi and κi⋂

κ j = /0,∀i 6= j. The four basic ele-ment shapes for 3D finite elements are the tetrahedron, hexahedron,(triangular) prism, and (square-base) pyramid.

3.1 Element Reference Spaces

The elements of the triangulation can come in a multitude of sizes andshapes in the world space; treating each as its own unique entity iscumbersome. Thus, it is common practice to standardize a referencespace for each element shape. For example, one choice for the refer-ence space of a tetrahedron is the tetrahedron with corners at (0,0,0),(1,0,0), (0,1,0), and (0,0,1). Then a function (or composition offunctions) Φ : R3 → R3 provides the continuous, bijective mappingfrom the reference space to the world space. Additionally, the Jaco-bian determinant (henceforth simply called the Jacobian) of this trans-formation must be positive to guarantee that the inverse exists and that

2326 IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL. 18, NO. 12, DECEMBER 2012

Page 3: ElVis: A System for the Accurate and Interactive Visualization of … · 2014-08-29 · ElVis: A System for the Accurate and Interactive Visualization of High-Order Finite Element

x = Φ(η)

u(x,y)

x

y

TH

Fig. 2. (Left) - Illustration of the mapping between reference and worldspace for a tetrahedron. Reference points are denoted by η , and worldspace points by x. (Right) - Degree p polynomials interpolate the solu-tion within elements, but discontinuities are allowed at element bound-aries; 2D example.

the desired orientation is maintained. In the linear case, this mappingcan be conceptualized as a combination of translation, rotation, andscaling operations. In the high-order setting, the mapping is nonlinear.A diagrammatic example of these mappings for a tetrahedron is shownin Figure 2.

Since Φ is a bijection with positive Jacobian, it can be inverted tocompute the reference point corresponding to a particular world point.Unfortunately, Φ−1 generally does not have a closed-form. As a result,a more general root-finding scheme must be used. For high-order ele-ments, Φ−1 is also nonlinear and a scheme like the Newton-RaphsonMethod is required.

3.2 Basis FunctionsA standard finite element practice is to describe the function Φ interms of element-wise basis functions defined on the reference space.The space spanned by these functions is finite dimensional. In thiswork, examples will apply a basis that is polynomial in the refer-ence coordinates, but other choices (e.g., Fourier basis) are possibleas well. For example, consider a function F(ξ ) ∈ P p1,p2,p3 withrespect to the reference element, where p1, p2, p3 denote (possibly)different polynomial orders in the three principle directions and ξ isa reference coordinate. This basis choice is associated with at most(p1 +1)(p2 +1)(p3 +1) degrees of freedom.

3.3 Solution Representation under Continuous and Discontinu-ous Finite Elements

Similar to the geometry, the solution representation is also commonlywritten in terms of basis functions. The solution basis can be differentthan the geometry basis; in this work, polynomials are used again. Invisualization applications, it is important to distinguish between con-tinuous and discontinuous finite elements. In continuous finite ele-ments, the solution is defined to be continuous across element bound-aries. As a result, the value of the solution at every point in the domainis uniquely defined. With discontinuous elements, this is not the case:discontinuities can exist at element boundaries and in general, solu-tions are multi-valued along such boundaries; see Figure 2.

The discontinuous setting raises some challenges for visualization.For example, contour “lines” may have discontinuities at elementboundaries since the underlying solution value could “jump.” Simi-larly, isosurfaces may have holes in them. Any derived, continuoussolution representation used within the visualization system is onlyguaranteed to be valid within individual elements.

4 The Element Visualizer (ELVIS)ElVis is a system that has been developed to implement the fea-tures necessary for high-order visualization, as described in Section1: namely, visualization accuracy, interactive performance, and exten-sible support for arbitrary high-order finite element systems.

ElVis is designed to provide visualization tools that are broadly ap-plicable to any high-order finite element solution. ElVis’ implemen-tation is generic and aims to decouple the implementation of the vi-sualization from the implementation of the high-order basis functions.ElVis achieves this goal through the use of plugins, which provide asimplified interface to the high-order data by exposing the minimalamount of functionality required to generate a visualization. In thisway, it is broadly applicable to a wide variety of simulation products,

and gives each product wide latitude on how it behaves behind thescenes. We discuss plugins in more detail in Section 4.1.

Once the data is accessible to ElVis through a plugin, ElVis can per-form the required visualizations without knowledge of the details ofthe underlying simulation. ElVis’ visualization algorithms focus par-ticular attention on the two often competing goals of image accuracyand interactive performance. Image accuracy is obtained by devisinghigh-order specific versions of common visualization strategies (cut-surfaces, isosurfaces, and volume rendering). Performance is achievedby careful implementation of these algorithms as parallel algorithmson a NVIDIA GPU, using the OptiX [24] ray-tracing engine and Cuda[1] as the framework. We present more details about ElVis’ visualiza-tion capabilities in Section 4.2.

4.1 Extensibility Module

One of the fundamental challenges of creating a general-purpose visu-alization system for high-order finite element simulations is that thereis no single set of basis functions that is appropriate in all simulationsettings. Therefore, each simulation system chooses the basis that ismost suited for the problems at hand. This means that ElVis cannot beimplemented in terms of any specific basis and expect to be used witharbitrary simulation systems. The Extensibility Module addresses thisissue by providing a plugin interface that acts as a bridge between thevisualization system and the simulation package. The module acceptsplugins written in one of two ways, each providing different trade-offsas described below. The first type of plugin is the data conversion plu-gin, which is used to convert a data set from the format used by thesimulation package to the format used by ElVis’ default plugin, theNektar++ extension [2]. The second plugin type is the runtime plu-gin, which provides an interface for ElVis to interactively query thesimulation data on both the CPU and GPU.

The purpose of the data conversion plugin is to convert fields andgeometry from the format used by the simulation package into the na-tive Nektar++ format used by ElVis. The Nektar++ data format is sup-ported through a default runtime plugin (described below) that is dis-tributed with ElVis as a reference implementation for the developmentof plugins for other simulation systems. Nektar++ uses a polynomialbasis to represent its data, and the data conversion plugin is responsiblefor projecting the field from the simulation package onto the polyno-mial basis used by Nektar++. Projection of the data then occurs as fol-lows. First, ElVis queries the plugin to obtain information about eachelement’s type (e.g., hexahedron, tetrahedron) and the desired polyno-mial order of the converted data set. For simulations already using apolynomial basis, this can be chosen so that the projection introducesno error beyond floating-point rounding errors. For other bases, it canbe set to the level needed to meet the desired accuracy requirements.ElVis then queries the plugin to determine if the resulting projectionshould be represented using functions that are continuous or discon-tinuous at element boundaries. Finally, ElVis samples the field at acollection of points determined by the choices made in the previoussteps and creates the projected data set.

The advantages of this approach when compared to runtime plugins(described below) are that they will generally require less coding and,once the conversion is done, ElVis will have no runtime dependencieson the simulation package. Another advantage is that ElVis handles allof the details about file formats and data storage—the plugin is onlyresponsible for sampling the solution. The downside is that the nativeinternal format represents fields and geometry as the tensor productof one-dimensional polynomials [12]. Therefore, data sets from simu-lation packages where fields are represented by non-polynomial basisfunctions cannot be represented exactly, so this approach will intro-duce projection error into the visualization. Another disadvantage isthat simulations using non-standard elements do not fit the input re-quirements described above and cannot be converted.

Runtime plugins are loaded into ElVis each time it is run; theyprovide access to a simulation’s data during the rendering process.The data can be accessed directly in the format used by the simula-tion (e.g., polynomial or Fourier basis functions) without the need toconvert formats first. However, implementing a runtime plugin re-

2327NELSON ET AL: ELVIS: A SYSTEM FOR THE ACCURATE AND INTERACTIVE VISUALIZATION OF HIGH-ORDER FINITE…

Page 4: ElVis: A System for the Accurate and Interactive Visualization of … · 2014-08-29 · ElVis: A System for the Accurate and Interactive Visualization of High-Order Finite Element

quires significantly more code than the data conversion approach, andit also requires a working knowledge of both OptiX and Cuda. All ofElVis’ visualization algorithms are implemented on the GPU; there-fore, all runtime plugins must provide a means to access data fields onthe GPU.

A runtime plugin consists of three components:

• Volume Representation Component: This component is re-sponsible for reading a volume on the CPU and then transferringit to the GPU. ElVis imposes only one restriction on the wayin which the volume’s data is represented and accessed on theGPU, leaving the choice of optimal implementation to the exten-sion. The sole requirement is that the data be accessible to theOptiX-based ray-tracer through a specially named node in theray-tracer’s scene graph.

• Volume Evaluation Component: All of the visualization meth-ods described in the next section require the ability to evaluate ahigh-order field and its gradient at arbitrary locations within anelement. These functions must be implemented on a GPU andwill be called a large number of times for each of the visualiza-tion methods discussed in the next section, so extra care must betaken to ensure that they are as efficient as possible.

• Ray-Tracing Component: Finally, the ray-tracing componentconnects the OptiX portion of ElVis to the simulation data. Thiscomponent is not responsible for handling the high-level me-chanics of the ray-tracer; however, it is responsible for providingsome of the primitives used by ElVis to perform the ray-tracing.Examples include providing ray-element intersection tests, ele-ment and element face bounding box procedures, and tests forwhether a point is located in an element.

4.2 VisualizationIn this section, we discuss the visualization methods for scalar fieldsthat are currently available in ElVis; namely, color maps and contourson cut-surfaces [20], isosurfaces [19], and volume rendering [18].Each of these visualization methods is discussed in greater detail inthe references provided. The scalar field restriction is not a funda-mental limitation of the ElVis framework; rather, it is a reflection ofthe algorithms that have been developed for the initial release. Futurereleases will support visualization of high-order vector fields.

The visualization algorithms discussed below all require quick andefficient point location queries. ElVis uses a bounding volume hi-erarchy, which is supplied by OptiX, to accelerate all point locationqueries.

4.2.1 Surface VisualizationA surface visualization is where the scalar field is plotted on a surfaceusing color maps, isocontours or both [20]. These types of visualiza-tions, while conceptually simple, are very useful for the engineer whenstudying the simulation. Much of the interesting behavior occurs on ornear certain domain boundaries (e.g., a wing), and it makes sense to beable to plot the behavior of the field on these surfaces accurately. Anoverview of the surface rendering algorithm is presented in Algorithm1, with details in Nelson et al. [20].

ElVis supports the rendering of an arbitrary number of cut-planesand surfaces, of which the curved faces lying on domain boundariesare common choices. In Figure 1, we show an example of the pressurefield on an ONERA M6 wing (see Section 5.1.2 for details) and on aplane cutting through the wing. A color map is applied and contourlines are plotted on the wing’s curved surface and on the cut-plane’sflat surface.

ElVis also has the ability to plot the intersection of the 3D mesh anda surface through an extension of the contouring algorithm discussedabove. It is often useful to see the mesh on a surface to verify thatthe mesh has been generated correctly, as well as to aid in debugging.Oftentimes features may appear in the visualization that appear outof place, but turn out to be reasonable if they occur next to a meshboundary. An example of such a feature is a discontinuous contour

ALGORITHM 1: Surface VisualizationStep 1 - Sample the field on the surface.if Surface is a cell face then

Sample the scalar field using the basis functions defined for the face.else

Cast a secondary ray to find the enclosing element.Sample the scalar field using the element’s basis functions.

end

Step 2 - Visualize the scalar samples.if Rendering Color Maps then

Use the scalar value as a lookup into a color table.else if Rendering Contours then

Use the scalar value to determine if the contour crosses the pixel, using the crossingtests from [20].

end

Fig. 3. Isosurface of Mach number 0.1919 for the delta wing simula-tion (Section 5.1.1), showing the development and roll up of the vortexstructures along the leading edge and downstream of the wing. Notethe crack in the surface arises because the underlying solution is froma DG method.

line in a DG field. In this scenario, a break in the contour is expectedat element boundaries, but not in the interior of the element. Furtherexamples that apply the meshing tool can be found in Section 5.

4.2.2 Isosurfaces

Isosurfaces in ElVis [16, 19] take advantage of the smoothness prop-erties of high-order finite element solutions to project the field alonga ray onto a polynomial. Once the polynomial is created, accuratelyfinding the location of an isosurface is a root-finding problem [19]. Wegive an overview of this procedure in Algorithm 2. We note that thisprocedure is only valid on the interior of elements, where the solutionis guaranteed to be smooth, so our isosurface algorithm operates onelement-partitioned segments along the ray.

An advantage this method has over existing object-space methodsis that it respects the features of the high-order data. In particular, un-less care is taken, object-space isosurfacing methods such as marchingcubes can miss valid features of DG simulations, such as discontinu-ities across element boundaries that can cause cracks in the isosurface,and isosurfaces that exist entirely within an element. An example ofthis can be seen in Figure 3, where we plot an isosurface of the Machnumber for the delta-wing simulation described in Section 5.1.1.

ALGORITHM 2: Isosurface Algorithm

Input: A ray R(t) and a list of all elements E traversed by the ray, ordered by intersectiondistance, and desired isovalue ρ .

foreach Element Ei ∈ E doDetermine ray entrance ta and exit tb for element Ei.

Evaluate the field on the ray segment [ta, tb] using interval arithmetic to obtain fieldbounds [ fmin, fmax].

if ρ ∈ [ fmin, fmax] thenPerform root-finding procedure to identify the location of the isosurface.

endend

2328 IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL. 18, NO. 12, DECEMBER 2012

Page 5: ElVis: A System for the Accurate and Interactive Visualization of … · 2014-08-29 · ElVis: A System for the Accurate and Interactive Visualization of High-Order Finite Element

4.2.3 Volume Rendering

In some scenarios, isosurfaces can be noisy and difficult to interpret.In these cases, it can be useful to use volume rendering to represent theisosurface. When applied to high-order solutions, ElVis uses an algo-rithm that takes advantage of the structure of the field to provide betterconvergence properties than those available through existing methods[18]. By doing this, ElVis is able to display more accurate images fora given amount of time.

Volume rendering proceeds in a manner similar to isosurface gener-ation. The ray traverses the volume and as it encounters each element,it categorizes the field along the ray in the element, then applies anoptimized volume rendering algorithm.

4.2.4 Combining Visualizations

A constant challenge for high-order visualization is the computationalcost of each of the algorithms described above. This comes from thecost of sampling a high-order field (primarily the cost of convertingworld points to reference points and evaluating the field) and the costof traversing the volume with a ray (where ray-element intersectionscan be of high-order and require expensive, iterative root finding pro-cedures). Several of the visualization algorithms above have beenshown to be interactive while maintaining accuracy when applied inisolation; but combining these visualization methods into a single im-age without taking into account their interactions leads to slow perfor-mance.

Instead, when multiple visualization methods are used in a singleimage, we create a system of communication and sharing betweenmodules to minimize the cost. The first optimization is sample shar-ing, where samples taken for one module can be reused in another. Forexample, when a surface color map is generated, the samples can alsobe used to generate the contours. The second optimization is occlu-sion sharing. We render the surface modules first, since they are thecheapest, and use the depth information obtained by those modulesto terminate the mesh traversal portion of the isosurface and volumerendering algorithms once the occluding structure has been reached.Finally, the isosurface and volume rendering modules share the meshtraversal algorithm, reducing the number of ray-element intersectiontests that are performed.

5 ResultsThis section demonstrates the capabilities and advantages of ElVisthrough several examples. We focus our attention on cut-surface andisosurface visualizations, as ProjectX users do not currently use vol-ume rendering in their engineering analysis. Our examples are takenlargely from engineering problems solved or being worked on withProjectX; some examples were synthetic problems designed to demon-strate specific capabilities. The following subsection describes thesources of our examples, enumerated as series of cases. Then we showresults and comparisons with current visualization “best-practices”used by ProjectX developers.

5.1 Simulation Examples

We preface this subsection by noting that the upcoming cases are allcharacterized by quadratic geometry representations and cubic solu-tion representations. These are not limitations of ProjectX nor ElVis;rather, both pieces of software can handle different order geometry andsolution representations in different elements. However, they are rep-resentative of cases being examined by ProjectX engineers at present.Additionally, these relatively low polynomial orders present a “bestcase” for Visual3 in the comparisons to ElVis presented in this sec-tion. The differences that exist could only become more pronouncedat higher polynomial orders.

5.1.1 Case 1

Case 1 is an isolated half delta-wing geometry with a symmetry planerunning down the center chord-line of the wing. The case was orig-inally proposed by [14] to demonstrate the efficacy of their adapta-tion strategy. Delta-wings are common geometries for CFD testingdue to their relatively simple geometry and the complexities involved

in the vortex formation along the leading edge of the wing and thesubsequent roll-up of those vortices. The equations being solved arethe compressible Navier-Stokes equations. The flow conditions areM∞ = 0.3, Rec = 4000, and α = 12.5. The solution was obtainedthrough ProjectX, using an output-adaptive automated solution strat-egy [35].

The delta-wing geometry is linear. The computational mesh con-sists of 5032 linear, tetrahedral elements with 10434 total faces (lineartriangles). The solution was computed with cubic polynomials.

5.1.2 Case 2Case 2 is an isolated ONERA M6 wing again with a symmetry planerunning down the center chord-line [26]. We are presenting a subsonic,turbulent flow over the same geometry (transonic was not available).The flow conditions are Rec = 11.72×106, M∞ = 0.3, and α = 3.06.The flow is fully turbulent; the RANS equations are being solved withthe Spalart-Allmaras model for closure. As before, the solution wasobtained using ProjectX.

The computational mesh consists of 70631 quadratic elements with146221 faces (quadratic triangles); meshing limitations restrict us toa quadratic geometry representation. The solution polynomials arecubic.

5.1.3 Case 3Case 3 is synthetic example meant to demonstrate the mesh-plottingcapability of ElVis. The geometry is a hemisphere. The mesh is com-posed of 443 quadratic tetrahedra with 1037 faces (quadratic trian-gles). Case 2 also uses curved elements, but the curvature is almost un-noticeable except on boundary faces. This mesh has noticeably curvedelements away from the geometry as well.

5.1.4 Case 4Case 4 is another synthetic example designed to show how ElVis candisplay negative Jacobians naturally. “Real” computational mesheswith negative Jacobians are not usable; as a result these are discarded.Thus it was simpler to create a one element mesh with very obviousnegative Jacobian issues. The mesh consists of one quadratic tetrahe-dron with four faces (quadratic triangles). The tetrahedron has cornersat (0,0,0), (1,0,0), (0,1,0), and (0,0,1). The mesh was created by firstplacing quadratic nodes at their locations on the linear element. Thenthe quadratic node at (0.5,0,0) was moved to (0.5,0,0.6), causing theelement to intersect itself and leading to negative Jacobians.

5.2 ProjectXAs mentioned above, all results generated in this section are from so-lutions produced by the ProjectX software. The results considered inthis paper arise from solutions of the compressible Navier-Stokes andRANS equations. ProjectX implements a high-order DiscontinuousGalerkin (DG) finite element method; DG features relevant to visual-ization were discussed in Section 3. It also strives to increase the levelof solution automation in modern CFD by taking the engineer “out ofthe loop” through estimation and control of errors in outputs of interest(e.g., lift, drag) [7, 36]. Solution automation is accomplished throughan iterative mesh optimization process, which is driven by error esti-mates based on the adjoints of outputs of interest [35].

We have worked closely with ProjectX engineers to endow ElViswith visualization and interface features that they would find useful.Visualization has great potential to aid ProjectX developers’ ability tounderstand and analyze their solutions. It has perhaps even greater ap-plication in the realm of software debugging, where visual accuracyis of the utmost importance since it is often difficult to discern visualartifacts from genuine or erroneous (i.e., a result of a software bug)solution features. As we will discuss below, to date, visual inaccura-cies in their current software have often inhibited ProjectX engineers’analysis and debugging efforts.

5.3 Comparison Visualization SoftwareProjectX developers currently use Visual3 [10, 9] to examine and at-tempt to understand their solution data. The reasons are simple: Vi-sual3 is freely available, can deal with general (linear) element types,

2329NELSON ET AL: ELVIS: A SYSTEM FOR THE ACCURATE AND INTERACTIVE VISUALIZATION OF HIGH-ORDER FINITE…

Page 6: ElVis: A System for the Accurate and Interactive Visualization of … · 2014-08-29 · ElVis: A System for the Accurate and Interactive Visualization of High-Order Finite Element

(a) ElVis (b) Visual3 0 Refinements

(c) Visual3 1 Refinement (d) Visual3 2 Refinements

Fig. 4. Plotting Mach Number at the leading edge of the delta wing(Case 1) at the symmetry plane with ElVis (a) and Visual3 using 0 (b),1 (c), and 2 (d) levels of refinement.

is extendable and there is local knowledge of this software. Visual3supports a number of usage modes; e.g., cut-planes, surface rendering,surface contours, isosurfaces and streamlines/streaklines. ProjectX de-velopers use Visual3 to explore their solution data and to support de-bugging of all aspects of their solver.

At present, Visual3 is rather dated and more modern methods (e.g.,those discussed in Section 2) exist. Visual3 is a complete, well-tested,and thoroughly-documented application with a functional GUI and aclearly-specified API. Cutting-edge visualization software often lackthese features. Moreover, until recently, native high-order visualiza-tion on commodity hardware was not possible. Ultimately, ProjectXdevelopers are not members of the visualization community; they donot have the time or expertise to dedicate towards turning prototypesoftware and technology demonstrators into full-fledged visualizationsystems. As a result, ProjectX developers continue to use Visual3since it is a robust and familiar tool.

Visual3 operates on a set of linear shape primitives (tetrahedron,hexahedron, pyramid, and prism). The solution data and computa-tional mesh must be transferred onto these linear primitives (via in-terpolation) for visualization to occur. Since ProjectX produces high-order solutions on curved meshes, some error is introduced throughthe linear interpolation. To decrease visualization error, each individ-ual element of the visualization mesh can be uniformly refined (in thereference space) a user-specified number of times. Due to computetime and memory constraints, ProjectX developers typically use 0 or 1level of refinement. In this paper, 2 levels of refinement are performedin some cases for the sake of comparison. However there is usuallyinsufficient memory for 3 levels of refinement on our typical work-stations; additionally in the ever-larger simulations run by ProjectXdevelopers and users, 2 levels of refinement is often infeasible as well.

5.4 Visualization Accuracy

As discussed above, the primary motivation behind this work is theability to achieve accurate visualizations of high-order data. In thissection, we demonstrate ElVis’ accuracy, and describe how this en-ables ProjectX engineers to interpret and debug their simulation datamore effectively.

5.4.1 Surface Rendering

We begin with visualizations of the leading edge of the delta wing(Section 5.1.1) at the symmetry plane, which we show in Figure 4.The black region is the airfoil at mid-span; the wing is not plotted sothat it does not occlude any of the details of the boundary layer. Thisset of figures compares the pixel-exact rendering of ElVis to linearly-interpolated results from Visual3. For comparison, Visual3 results areposted with 0, 1, and 2 levels of uniform refinement.

As rendered by Visual3 with 0 refinements (Figure 4b), the char-acteristics of the solution are entirely unclear. The boundary layer

Fig. 5. A zoomed out ElVis generated image of the delta wing from Case1 showing the location of the cut-plane used in Figure 6. The cut planeis located 0.2 chords behind the trailing edge of the wing.

appears wholly unresolved and severe mesh imprinting can be seen.It is not clear whether the apparent lack of resolution is due to a poorquality solution, bugs in the solver, or visualization errors. Even at onelevel of refinement (Figure 4c), the Visual3 results are still marred byvisual errors. Again, mesh imprinting is substantial and the thicknessof the boundary layer is not intelligible.

The Visual3 results continue to improve at 2 levels of refinement(Figure 4d) with the rough location of the boundary layer finally be-coming apparent. But mesh imprinting is still a problem, and engi-neers could easily interpret this image as the result of a poor qualitysolution. Only the ElVis result (Figure 4a), clearly indicates the lo-cation of the boundary layer and clearly demonstrates where solutionquality is locally poor due to insufficient mesh resolution. Althoughnot shown here, distinct differences similar to the effects at the lead-ing edge on the symmetry plane are also observed at the delta wing’strailing edge and along its entire leading edge.

ProjectX developers were genuinely surprised at the difference be-tween between Figures 4d and 4a. In fact, since users had only gen-erated and viewed Figures 4b and 4c previously, the common miscon-ception was that resolution at the leading edge (and indeed in manyother regions around the wing) was severely lacking.

However, had the ProjectX solver been subject to a software bug,engineers expressed that they would have been hard pressed to inter-pret Visual3 results to aid these efforts. Specifically, at 0 or 1 levelof refinement, the visualization quality is so poor that developers areoften unable to discern the precise source of solution artifacts. Unfor-tunately, a misdiagnosis can lead to a great deal of time wasted on a“wild goose chase.” As a result, visualization has not played as largea role as it could in debugging practices.

5.4.2 Contour Lines

For our next example, we illustrate the generation of contour lines.Contours are useful visualization primitives since they, unlike colorplots, limit the amount of information being conveyed and allow formore detailed and targeted images. In particular, it can be difficult tointerpret the magnitude and shape of a field’s gradient through colormaps; this is much easier with contours.

In Figure 6, we show a comparison of contours on a cut-plane be-hind the trailing edge of the delta wing (Section 5.1.1). The imageswere generated using ElVis and Visual3, once again using 0, 1, and2 levels of refinement for the latter. Figure 5 provides a zoomed outview, showing the location of the cut-plane relative to the wing.

The images in Figure 6 reiterate the observations from the discus-sion of surface rendering. With 0 and 1 level of refinement (Figure 6band c), most of the contour lines produced by Visual3 are extremely in-accurate. These images do little to illuminate the vortex structure theyare trying to show. The situation improves somewhat with 2 levels ofrefinement in Visual3 (Figure 6d), but substantial errors remain.

As before with surface rendering, the errors present in the Visual3outputs at all tested levels of refinement are too great to properly sup-port visualization as a debugging tool. The resolution of vortex struc-tures like the one shown in Figures 5 and 6 is a prime candidate forthe application of high-order methods, because vortexes are smoothflow features. They are also extremely common, arising as importantfeatures for lift and drag calculations in any 3D lifting flow, amongst

2330 IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL. 18, NO. 12, DECEMBER 2012

Page 7: ElVis: A System for the Accurate and Interactive Visualization of … · 2014-08-29 · ElVis: A System for the Accurate and Interactive Visualization of High-Order Finite Element

(a) ElVis (b) Visual3 0 Refinements

(c) Visual3 1 Refinement (d) Visual3 2 Refinements

Fig. 6. Plotting Mach number contours at the trailing edge of the deltawing (Case 1). An overview of this scenario is shown in Figure 5, witha detailed view of the contours on the trailing cut-plane generated byElVis (a) and Visual3 using 0 (b), 1 (c), and 2 (d) levels of refinement.For visual clarity, we have modified the contour lines produced by bothsystems so they are thicker than the default one pixel width.

other things. Here, we are only showing a solution with cubic polyno-mials; with the even higher polynomial orders that could be applied tovortex flows, linear interpolation-based visualization methods will beeven more inadequate.

5.5 Curved Mesh Visualization

Following on the footsteps of the previous section on accuracy, it isimpossible to accurately visualize curved geometries with only linearinterpolation techniques. Here we will examine a mesh where highlycurved elements can be seen clearly: the hemisphere from Case 3.With 0 levels of refinement (Figure 7b), the Visual3 results are not ob-viously hemispherical at all. Figures 7c and 7d, showing 1 and 2 lev-els of refinement respectively, provide successively greater indicationthat the underlying geometry is in fact curved. However, without thecolor scheme which helps outline true element boundaries (as opposedto boundaries generated through refinement), typical Visual3 displayscan make it difficult to discern which computational element containsto a particular point on the screen. This issue is further compoundedby the fact that curved elements are linearized.

Figure 7a does not have any of these issues. Produced by ElVis,this representation accurately represents the curved surface. Engineerswould be readily able to localize particular flow features or artifacts tospecific elements for further investigation during debugging or analy-sis. ProjectX developers and users are given easy and direct access tocurved geometries and curved elements, capabilities that were impos-sible using Visual3.

5.6 Negative Jacobian Visualization

Negative Jacobians can be extremely difficult to detect. In general,negative Jacobians manifest in elements whose reference to worldspace mapping is not invertible since it becomes multi-valued. As aresult, their presence can lead to severe stability and convergence is-sues. In general, detecting negative Jacobians amounts to a multivari-ate root-finding problem of high-order polynomials. This procedureis very costly and it is not practical to search every element. Instead,

(a) ElVis (b) Visual3 0 Refinements

(c) Visual3 1 Refinement (d) Visual3 2 Refinements

Fig. 7. A top-down view of the hemisphere from Case 3. The meshplotting tools of Visual3 and ElVis are enabled.

(a) (b)

Fig. 8. Views of Case 4 (negative Jacobians in a single tetrahedron)rendered with ElVis. Colors show Jacobian values from -0.5 to 0.0. Leftis a view of the x+ y+ z = 1 face being intersected by the x− y face.Right is a view of the x− z face, where the self-intersection effect of thequadratic node at (0.5,0,0.6) is apparent.

finite element practitioners typically check for negative Jacobians at aspecific set of sample points (usually related to the integration rulesused); unfortunately sampling is not a sufficient condition for detec-tion.

If negative Jacobians are suspected (e.g., through convergence fail-ure of the solver), visualization of problematic elements is a potentialpath for deciding whether Jacobian issues played a role. At present,ProjectX developers have no way of directly visualizing negative Ja-cobians. Linear tetrahedral elements have constant Jacobians; thus thelinear visualization mesh produced for Visual3 is of little use when itis used to visualize inverted elements. However, ElVis is not subjectto such constraints since it handles curved elements naturally. Case4 demonstrates our ability to directly visualize negative Jacobians asshown in Figure 8.

5.7 Distance Function VisualizationA distance function is a scalar field defined by

d(~x) = in f|~x−~p| : S(~p) = 0 (1)

where S is an implicit definition of a surface. In regard to ProjectX,the distance function is an important part of the Spalart-Allmaras tur-bulence model, which is used in Case 2. In fact, wall-distances areneeded by most turbulence models. In aerospace applications, turbu-lent effects typically first arise due to very near-wall viscous interac-tions. The consequences of incorrect distance computations can vary

2331NELSON ET AL: ELVIS: A SYSTEM FOR THE ACCURATE AND INTERACTIVE VISUALIZATION OF HIGH-ORDER FINITE…

Page 8: ElVis: A System for the Accurate and Interactive Visualization of … · 2014-08-29 · ElVis: A System for the Accurate and Interactive Visualization of High-Order Finite Element

widely, from having no effect, to producing incorrect results, to reduc-ing solver robustness or even preventing convergence all together.

Visualization has the potential to be a valuable first attempt at di-agnosing distance calculation errors. Developers can inspect the dis-tance field for smoothness and make other qualitative judgments onthe quality of the computation. Although visualization cannot guaran-tee that distance computations are correct, they can provide confidenceand more importantly one would hope that visualization would makesubstantial errors in distance computations apparent.

Existing visualization packages introduce error into this visualiza-tion because they must interpolate high-order surfaces and interpolatethe distance data, the latter of which is not even a polynomial field.Linear interpolation introduces a number of problems. It is impossibleto judge the quality of distance calculations without at least being ableto see the true shape of the underlying geometry. As a result, ProjectXdevelopers typically find themselves unable to use visualization to aidin debugging distance computations; let us see why.

Figure 9 is meant to demonstrate the difficulty experienced by Pro-jectX developers when using Visual3 to help diagnose problems withdistance function computations. In the 0 refinement case (Figure 9b),the visualization mesh is so coarse that almost nothing can be learnedfrom this image, except possibly that the distance computation is notproducing completely random numbers. The 1 refinement case Fig-ure 9c) does little to improve the situation. Here, a large protrusionis visible on the right and a large recess is visible near the top of theisosurface. Other confusing-looking regions are also present. After 2levels of refinement (Figure 9d), Visual3 gives strong evidence that abug is present in the distance computation, but the linear interpolationis still preventing rendering of the expected smooth surface.

On the other hand, ElVis renders (Figure 9a) a smooth surface withone substantial protrusion (corresponding to the protruded region seenin Figures 9c and 9d). From the ElVis result, the fact that the distancecomputation is wrong is obvious. Additionally, the ElVis result wasobtained in seconds, in stark contrast to performing 2 uniform refine-ments in Visual3.

Figure 10 shows the result from plotting the correct distance func-tion in Visual3 and in ElVis. The effect of the bug was very local (man-ifested in the large protrusion on the right side). The images from Fig-ure 9 are largely unchanged, hence only the highest resolution Visual3image was replicated. Indeed, the 0 refinement results from Visual3with the bug fixed appears indistinguishable from Figure 9b, making

(a) ElVis (b) Visual3 0 Refinements

(c) Visual3 1 Refinement (d) Visual3 2 Refinements

Fig. 9. Plotting the isosurface for a distance of 6.2886 to the surface ofthe ONERA wing (Case 2) with ElVis (a) and Visual3 using 0 (b), 1 (c),and 2 (d) levels of refinement. Here, the underlying distance computa-tion has a bug.

(a) ElVis (b) Visual3 2 Refinements

Fig. 10. The same view as shown in Figure 9 but with the underlyingdistance computation fixed.

this level of Visual3 resolution useless for debugging. At 1 level ofrefinement, the right-side bump is gone, but there are so many otherrecesses and protrusions that ProjectX developers indicate they wouldhave little confidence that the distance evaluation is correct. After 2levels of refinement (Figure 9d), the Visual3 results look believablefor a linear interpolation of the distance field. Nonetheless, ProjectXdevelopers indicated that they would much rather have debugged thedistance function with ElVis, even if Visual3 could perform more re-finements without additional compute and storage overhead.

In fact, ProjectX developers used the distance computations shownin Figure 9 for a period of months before finding the bug that causedthe large protrusion shown in the isosurfaces. They had checked thedistance function using views similar to those shown in Figures 9band 9c. However, due to the lack of clarity in those images and sincethe solver appeared to be performing reasonably, no issues were sus-pected.

When presented with the before and after views from Figures 9aand 10a, one ProjectX developer expressed great frustration that ElViswas not available during the development of the distance function. Itwould have saved him many hours of confusion, greatly acceleratingthe debugging process by providing clear and direct access to the un-derlying data.

5.8 PerformanceFor ElVis to be useful, it must be able to provide images that are bothaccurate and interactive. To examine performance, we tested threedifferent scenarios in both the delta and ONERA wing data sets. Fortest 1, we rendered a color map and ten contour lines on a cut-planethrough each wing (similar to the view shown in Figure 5). Test 2measures the performance of rendering color maps and ten contourlines on the element surfaces directly (as shown in Figure 1). The finaltest consists of an isosurface rendering in each data set. The resultsof these performance tests, along with the amount of memory used bythe GPU during rendering, is shown in Figure 11.

We found that visualizations of regions with highly anisotropic el-ements performed worse than regions without. The root cause of thisbehavior is that these types of elements often produce bounding boxesthat significantly overestimate the element’s footprint, which reducesthe effectiveness of ElVis’ acceleration structures. To illustrate thepractical impact, we rendered views with many anisotropic elements(denoted as “detail” in Figure 11) and views with few (denoted as“overview”).

For all test cases, we measured performance and memory usage asthe image size increases and as the number of elements in the data setincreases. To create the data sets, the implied metric fields from Case1 and Case 2 were scaled and new meshes were generated [17]. Testswere run on a desktop workstation equipped with an NVIDIA TeslaC2050 GPU and Intel Xeon W3520 quad-core processor running at2.6 GHz. The Cuda and OptiX kernels were executed using doubleprecision floating point numbers.

Figures 11(a) and 11(b) indicate that our method scales well withincreasing image size. Figures 11(d) and 11(e) show that it also scalesbetter than linear as the number of elements in the volume increases.This is important since, compared to traditional finite element methodswhich routinely use 100s of millions of elements, high-order solutions

2332 IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL. 18, NO. 12, DECEMBER 2012

Page 9: ElVis: A System for the Accurate and Interactive Visualization of … · 2014-08-29 · ElVis: A System for the Accurate and Interactive Visualization of High-Order Finite Element

600×600 1000×1000 1800×180010−2

10−1

100

101

102

Linear

Image Size

Tim

e(s)

Delta wing cut-plane (detail). Delta wing cut-plane (overview).Delta wing surfaces (detail). Delta wing surfaces (overview).ONERA wing cut-plane (detail). ONERA wing cut-plane (overview).ONERA wing surfaces (detail). ONERA wing surfaces (overview).

(a) Cut-surface performance as image size increases

600×600 1000×1000 1800×180010−2

10−1

100

101

102

Linear

Image Size

Tim

e(s)

Delta wing isosurface (detail).Delta wing isosurface (overview).ONERA wing isosurface (detail).ONERA wing isosurface (overview).

(b) Isosurface performance as image size in-creases

600×600 1000×1000 1800×1800300

400

500

630

800

1000

1250

1600

Linear

Image Size

Mem

ory

(MB)

Delta wingOnera wing

(c) GPU memory usage as the image size in-creases

104 105 10610−1

100

101

Linear

Number of Elements

Tim

e(s)

Delta wing cut-plane (detail). Delta wing cut-plane (overview).Delta wing surfaces (detail). Delta wing surfaces (overview).ONERA wing cut-plane (detail). ONERA wing cut-plane (overview).ONERA wing surfaces (detail). ONERA wing surfaces (overview).

(d) Cut-surface performance as the number of elementsincreases for a 1000×1000 image

104 105 106100

101

102

Linear

Number of Elements

Tim

e(s)

Delta wing isosurface (detail).Delta wing isosurface (overview).ONERA wing isosurface (detail).ONERA wing isosurface (overview).

(e) Isosurface performance as number of ele-ments increases for a 1000×1000 image

104 105 106500

630

800

1000

1250

1600

2000

2400

Linear

Number of Elements

Mem

ory

(MB)

Delta wingOnera wing

(f) GPU memory usage as the number of ele-ments increases

Fig. 11. Performance and memory usage for the delta and ONERA wing when varying the image size and number of elements.

rarely consist of volumes with as much as a million elements. In fact,the only real constraint on volume size is the memory required, shownin Figure 11(f), which limits the size of the volume that can be storedon the Tesla 2050 to approximately 1.5 million elements. The iso-surface algorithm we are currently using is an adapted version of thealgorithm shown by Nelson et al. [19] that has not yet been optimizedfor GPU execution, which results in the relatively poor performanceof isosurfaces when compared to cut-surfaces. We plan on developingnew, GPU-specific algorithms for isosurface generation to address thisissue.

6 ConclusionThis paper presents ElVis, a new high-order finite element visual-ization system. ElVis was designed with an extensible architecture;it provides interactive performance; and it produces accurate, pixel-exact visualizations. The final point deserves further emphasis: ElVismakes few assumptions about the underlying data, nor does it use ap-proximations when evaluating the solution. This degree of accuracyis a substantial step beyond what is possible in contemporary, linearinterpolation-based methods. ElVis provides users with direct accessto their finite element solution data either through conversion to knownstorage formats or by querying user-provided code directly. Directdata access is a capability previously unavailable to most finite elementpractitioners, and judging from the reactions of ProjectX developers,this capability is immensely valuable. We show that the software de-sign elements behind ElVis reduce barriers to entry (in terms of codingeffort) for new users. ElVis is also readily available as a full-fledged,ready-to-use application, making it a good choice for finite elementpractitioners seeking a native high-order visualization system.

The capabilities demonstrated here are the components of ElVis’initial release, which has been focused on scalar field visualization.This is not a fundamental limitation of the software; future releases

will address additional visualization capabilities to address additionaluser requests. In particular, our next release will address vector fields.While techniques exist for generating streamlines in high-order fields[31, 5], it is not immediately apparent how this will extend to a GPUimplementation; additional capabilities will need to be developed forElVis to support these features. Additionally, the direct-access to so-lution data will allow ElVis to naturally handle solutions involving cutcells [7], a capability not available in any current visualization system.

Even as it stands now, every ProjectX developer wanted to knowhow to “get [ElVis] on my computer” or “when can I start using[ElVis].” ElVis fills a major gap that has existed in scientific visu-alization. While solvers are moving toward high-order methods, vi-sualization systems continue to apply linear interpolations. ProjectXdevelopers and users were hard-pressed to debug their solver and ana-lyze the results it produced. High levels of visualization errors causeddevelopers to misdiagnose bugs and arrive at erroneous conclusionsabout mesh resolution, amongst other issues. These problems couldhave been avoided with ElVis. Ultimately, everyone involved agreesthat ElVis would be a welcome and valuable addition to their kit ofdevelopment, debugging, and analysis tools.

AcknowledgmentsThe authors would like to thank the entire ProjectX team for theirmany contributions, including the solutions used in our examples andmany insightful discussions over the course of this work. This workis supported under ARO W911NF-08-1-0517 (Program Manager Dr.Mike Coyle), Department of Energy (DOE NET DE-EE0004449),and the DOE Computational Science Graduate Fellowship (DOE DE-FG02-97ER25308). Infrastructure support provided through NSF-IIS-0751152.

2333NELSON ET AL: ELVIS: A SYSTEM FOR THE ACCURATE AND INTERACTIVE VISUALIZATION OF HIGH-ORDER FINITE…

Page 10: ElVis: A System for the Accurate and Interactive Visualization of … · 2014-08-29 · ElVis: A System for the Accurate and Interactive Visualization of High-Order Finite Element

References

[1] Cuda. developer.nvidia.com/category/zone/cudazone, 2012.[2] Nektar++. http://www.nektar.info, 2012.[3] J. Akin, W. Gray, and Q. Zhang. Colouring isoparametric contours. En-

gineering Computations, 1:36–41, 1984.[4] M. Brasher and R. Haimes. Rendering planar cuts through quadratic and

cubic finite elements. In Proceedings of the conference on Visualization’04, VIS ’04, pages 409–416, Washington, DC, USA, 2004. IEEE Com-puter Society.

[5] G. Coppola, S. J. Sherwin, and J. Peiro. Nonlinear particle tracking forhigh-order elements. J. Comput. Phys., 172:356–386, September 2001.

[6] L. T. Diosady and D. L. Darmofal. Massively parallel solution tech-niques for higher-order finite-element discretizations in CFD. In AdaptiveHigh-Order Methods in Computational Fluid Dynamics. World Scien-tific, 2011.

[7] K. J. Fidkowski and D. L. Darmofal. A triangular cut-cell adap-tive method for higher-order discretizations of the compressible Navier-Stokes equations. J. Comput. Phys., 225:1653–1672, 2007.

[8] B. Haasdonk, M. Ohlberger, M. Rumpf, A. Schmidt, and K. G. Siebert.Multiresolution visualization of higher order adaptive finite element sim-ulations. Computing, 70:181–204, July 2003.

[9] R. Haimes and D. Darmofal. Visualization in computational fluid dy-namics: A case study. In IEEE Computer Society, Visualization, pages392–397. IEEE Computer Society Press, 1991.

[10] R. Haimes and M. Giles. Visual3: Interactive unsteady unstructured 3dvisualization. AIAA 91-0794, 1991.

[11] G. Karniadakis, E. Bullister, and A. Patera. A spectral element methodfor solution of two- and three-dimensional time dependent Navier-Stokesequations. In Finite Element Methods for Nonlinear Problems, Springer-Verlag, page 803, 1985.

[12] G. E. Karniadakis and S. J. Sherwin. Spectral/hp element methods forCFD. Oxford University Press, New-York, NY, USA, 1999.

[13] G. D. Kontopidis and D. E. Limbert. A predictor-corrector contouringalgorithm for isoparametric 3d elements. International Journal for Nu-merical Methods in Engineering, 19(7):995–1004, 1983.

[14] T. Leicht and R. Hartmann. Error estimation and anisotropic mesh re-finement for 3d laminar aerodynamic flow simulations. J. Comput. Phys.,229:7344–7360, 2010.

[15] J. L. Meek and G. Beer. Contour plotting of data using isoparametricelement representation. International Journal for Numerical Methods inEngineering, 10(4):954–957, 1976.

[16] M. Meyer, B. Nelson, R. Kirby, and R. Whitaker. Particle systems for ef-ficient and accurate high-order finite element visualization. IEEE Trans-actions on Visualization and Computer Graphics, 13:1015–1026, 2007.

[17] T. Michal and J. Krakos. Anisotropic mesh adaptation through edge prim-itive operations. AIAA 2012-159, 2012.

[18] B. Nelson. Accurate and Interactive Visualization of High-Order FiniteElement Fields. PhD thesis, University of Utah, 2012.

[19] B. Nelson and R. M. Kirby. Ray-tracing polymorphic multidomain spec-tral/hp elements for isosurface rendering. IEEE Transactions on Visual-ization and Computer Graphics, 12:114–125, January 2006.

[20] B. Nelson, R. M. Kirby, and R. Haimes. GPU-based interactive cut-surface extraction from high-order finite element fields. IEEE Transac-tions on Visualization and Computer Graphics, 17(12):1803–1811, Dec.2011.

[21] T. Oliver and D. Darmofal. Impact of turbulence model irregularity onhigh-order discretizations. AIAA 2009-953, 2009.

[22] C. Pagot, D. Osmari, F. Sadlo, D. Weiskopf, T. Ertl, and J. Comba. Effi-cient parallel vectors feature extraction from higher-order data. ComputerGraphics Forum, 30(3):751–760, 2011.

[23] C. Pagot, J. Vollrath, F. Sadlo, D. Weiskopf, T. Ertl, and J. ao LuizDihl Comba. Interactive Isocontouring of High-Order Surfaces. In H. Ha-gen, editor, Scientific Visualization: Interactions, Features, Metaphors,volume 2 of Dagstuhl Follow-Ups, pages 276–291. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 2011.

[24] S. G. Parker, J. Bigler, A. Dietrich, H. Friedrich, J. Hoberock, D. Luebke,D. McAllister, M. McGuire, K. Morley, A. Robison, and M. Stich. Optix:A general purpose ray tracing engine. ACM Transactions on Graphics,August 2010.

[25] A. Patera. A spectral method for fluid dynamics: Laminar flow in a chan-nel expansion. J. Comp. Phys., 54:468, 1984.

[26] V. Schmitt and F. Charpin. Pressure distributions on the onera-m6-wing

at transonic mach numbers. AGARD AR 138, 1979.[27] W. Schroeder, F. Bertel, M. Malaterre, D. Thompson, P. Pebay,

R. O’Barall, and S. Tendulkar. Framework for visualizing higher-orderbasis functions. In Visualization, 2005. VIS 05. IEEE, pages 43 – 50,2005.

[28] C. Singh and D. Sarkar. A simple and fast algorithm for the plotting ofcontours using quadrilateral meshes. Finite Elem. Anal. Des., 7:217–228,December 1990.

[29] C. Singh and J. Singh. Accurate contour plotting using 6-node triangularelements in 2d. Finite Elem. Anal. Des., 45:81–93, January 2009.

[30] M. Uffinger, S. Frey, and T. Ertl. Interactive high-quality visualization ofhigher-order finite elements. Computer Graphics Forum, 29(2):337–346,2010.

[31] D. Walfisch, J. K. Ryan, R. M. Kirby, and R. Haimes. One-sided smoothness-increasing accuracy-conserving filtering for enhancedstreamline integration through discontinuous fields. J. Sci. Comput.,38(2):164–184, Feb. 2009.

[32] D. F. Wiley, H. Childs, B. Hamann, and K. Joy. Ray casting curved-quadratic elements. In O. Deussen, C. D. Hansen, D. Keim, and D. Saupe,editors, Data Visualization 2004, pages 201–209. Eurographics/IEEETCVG, ACM Siggraph, 2004.

[33] D. F. Wiley, H. R. Childs, B. F. Gregorski, B. Hamann, and K. I. Joy.Contouring curved quadratic elements. In Proceedings of the symposiumon Data visualisation 2003, VISSYM ’03, pages 167–176, Aire-la-Ville,Switzerland, Switzerland, 2003. Eurographics Association.

[34] P. L. Williams, N. L. Max, and C. M. Stein. A high accuracy volumerenderer for unstructured data. IEEE Transactions on Visualization andComputer Graphics, 4:37–54, January 1998.

[35] M. Yano and D. Darmofal. An optimization framework for anisotropicsimplex mesh adaptation: application to aerodynamic flows. AIAA2012–0079, Jan. 2012.

[36] M. Yano, J. M. Modisette, and D. Darmofal. The importance of meshadaptation for higher-order discretizations of aerodynamic flows. AIAA2011–3852, June 2011.

[37] Y. Zhou and M. Garland. Interactive point-based rendering of higher-order tetrahedral data. IEEE Transactions on Visualization and ComputerGraphics, 12(5):2006, 2006.

2334 IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL. 18, NO. 12, DECEMBER 2012