Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
cexpr Struct Reference

#include <view.h>

Collaboration diagram for cexpr:
[legend]

Data Fields

charexpr
 
scalar s
 

Detailed Description

Basilisk View

This module defines functions which compute various graphical representations ("drawings") of Basilisk fields, including reconstructed Volume-Of-Fluid facets and colorscale representations of cross-sections of scalar fields. These representations are rendered using OpenGL and can be saved in various formats (PPM, Gnuplot, OBJ, KML, PDF, SVG etc.).

Installation

In contrast with other Basilisk modules, this module relies on additional libraries which needs to be installed and linked with the Basilisk program. See [INSTALL::visualisation]() for instructions.

Usage

A simple example would look like:

...
#include "view.h"
...
/** @brief Event: image (t = 1) */
void event_image (void) {
clear();
draw_vof ("f");
box();
save ("image.ppm");
}

The clear() function resets the image, draw_vof() and box() add two graphical representations and save() saves the resulting image in PPM format. See User functions for a detailed documentation.

The resulting program needs to be linked with the appropriate libraries. This can be done automatically using something like:

qcc -autolink -Wall -O2 program.c -o program -lm

or manually using e.g.:

qcc -Wall -O2 program.c -o program -L\f$BASILISK/gl -lglutils -lfb_tiny -lm

Implementation

We include the various helper functions defined either by the system or by the Basilisk libraries in gl/.

A cache of "compiled" expressions

The cache has a maximum size and least-used expressions are discarded first.

Definition at line 73 of file view.h.

Field Documentation

◆ expr

char* cexpr::expr

Definition at line 74 of file view.h.

◆ s

scalar cexpr::s

Definition at line 75 of file view.h.


The documentation for this struct was generated from the following file: