OOF2: The Manual

Name

ScalarFieldIndex — Index object for a scalar Field

Synopses

C++ Synopsis

#include "engine/fieldindex.h"
	    
class ScalarFieldIndex: , virtual public FieldIndex {
}

Python Synopsis

from oof2.SWIG.engine.fieldindex import ScalarFieldIndex
	    
class ScalarFieldIndex(FieldIndex):
pass

Derived Classes

Source Files

  • SRC/engine/fieldindex.h: C++ header
  • SRC/engine/fieldindex.C: C++ source code
  • SRC/engine/fieldindex.swg: SWIG source code

Description

For OOF2's component addressing mechanism to be generic, all subclasses of Field must have an associated FieldIndex type. ScalarFieldIndex is the FieldIndex for ScalarField. It is a trivial class — it stores no data and most of its methods are no-ops — since scalar fields have only one component.

The argument to ScalarFieldIndex::set is ignored. ScalarField::components returns a pointer to a std::vector<int> with length zero.