Skip to content

Using_Spotters

Jason Harvey edited this page Feb 19, 2021 · 1 revision

Using Spotters

Spotters are a little different from links in that the shape on the GunnsDraw drawing can refer to any spotter class, whereas a link shape always refers to a specific link class. This makes them very flexible.

The spotter’s shape data defines which run-time class it instantiates, in its Class shape data field. The GunnsDraw shape library GUNNS_Spotters.xml contains shapes for the built-in spotters in the gunns/ repository, with their Class field already filled out. However, there is also an empty spotter shape in library GUNNS_Generic.xml that can be used for any spotter, including your own custom spotters — it just requires a little more manual input to configure it.

Adding a Spotter Instance to a Drawing

Adding a spotter is very similar to adding links & nodes:

Step 1

To use a spotter in your drawing, drag the Spotter shape from the GunnsDraw shape library onto the drawing, just like you would a link shape:

Step 2

Just like with a link, give the spotter instance a unique name by selecting it and typing the name. The name appears as its label, next to the shape:

Step 3

Fill in and add to the spotter instance’s shape data by right-clicking on it and selecting Edit Data…. This is described in the help pages for the Empty Spotter and the Spotters Library shapes.

Core Spotters and Their Use

This table lists the spotter classes in gunns/ and their suggested constructor argument values in GunnShow-generated networks.

Spotter Class Constructor Argument Types Suggested Argument Values
GunnsBasicIslandAnalyzer GunnsNodeList & netNodeList
GunnsFluidIslandAnalyzer GunnsNodeList & netNodeList
GunnsFluidFlowIntegrator GunnsFluidLink & (link name)
GunnsMinorStepLogDumper Gunns & netSolver
const std::vector<GunnsBasicLink*> & netLinks
GunnsFluidNetworkConservationErrors GunnsNodeList & netNodeList
GunnsFluidVolumeMonitor GunnsNodeList & netNodeList
GunnsFluidLink & (link name)
GunnsSensorAnalogWrapper (none)
Clone this wiki locally