OOF2: The Manual


FieldIndex — Base class for index objects


C++ Synopsis

#include "engine/fieldindex.h"
class FieldIndex {
  virtual FieldIndex* cloneIndex() const;
  virtual int integer() const;
  virtual bool in_plane() const;
  virtual void set(const std::vector<int>* components);
  virtual std::vector<int>* components() const;

Python Synopsis

from oof2.SWIG.engine.fieldindex import FieldIndex
class FieldIndex:
  def cloneIndex(self)
  def integer(self)
  def in_plane(self)
  def set(self, components)
  def components(self)

Source Files

  • SRC/engine/fieldindex.h: C++ header
  • SRC/engine/fieldindex.C: C++ source code
  • SRC/engine/fieldindex.swg: SWIG source code
  • SRC/engine/fieldindex.spy: python code included in the swig output


FieldIndex is the abstract base class for classes which refer to the components of multi-dimensional Fields, Fluxes, and Equations. The different subclasses refer to components of scalars,[56] vectors, and tensors.


Because FieldIndex objects are most often used when wrapped within an IndexP object, and because the IndexP provides a similar API, this section mostly just refers to the IndexP documentation.

virtual FieldIndex *cloneIndex() const

cloneIndex returns a pointer to a new copy of the derived class object. The pointer must be explicitly deallocated. See IndexP::cloneIndex.

virtual int integer() const

See IndexP::integer.

virtual bool in_plane() const

See IndexP::in_plane.

virtual void set(const std::vector<int> *components)

See IndexP::set.

virtual std::vector<int>* components() const

See IndexP::components.

[56] Trivially.