OOF2: The Manual

Name

getFlux — Retrieve a Flux object by name

Synopses

C++ Synopsis

#include "engine/flux.h"
static Flux *Flux::getFlux(const std::string& name); 

Python Synopsis

from ooflib.SWIG.engine import flux
f = flux.getFlux(name) 

Source Files

  • SRC/engine/flux.h: C++ headers
  • SRC/engine/flux.C: C++ code
  • SRC/engine/flux.spy: Python code included in flux.swg

Parameters

name

The name of an existing Flux.

Description

getFlux returns a previously created Flux object. In C++ it returns a pointer to the base class, which may be cast to the derived class, e.g:

VectorFlux *hf = dynamic_cast<VectorFlux*>(getField("Heat_Flux")); 

In Python, it returns a reference to an object of the appropriate derived class:

>>> hf = getFlux("Heat_Flux")
>>> type(hf)
<class 'ooflib.SWIG.engine.flux.VectorFlux'> 

getFlux is defined in the main OOF2 namespace so that it can be used freely in scripts, text mode and the Console Window.