OEGridBase

class OEGridBase : public OEGridAbstractBase

This class represents OEGridBase.

The following methods are publicly inherited from OEGridAbstractBase:

Clear

GetTitle

GetZMid

GetDataType

GetXDim

IsDataType

GetDim

GetXMid

IsSpacingSet

GetMid

GetYDim

SetTitle

GetSize

GetYMid

GetSpacing

GetZDim

The following methods are publicly inherited from OEBase:

operator=

GetData

IsDataType

operator+=

GetDataIter

SetBaseData

AddBaseData

GetDataType

SetBoolData

AddData

GetDoubleData

SetData

Clear

GetFloatData

SetDoubleData

CreateCopy

GetIntData

SetFloatData

DeleteData

GetStringData

SetIntData

GetBoolData

HasData

SetStringData

The following classes derive from this class:

Clear

Clear() -> None

Reallocates memory for the grid, effectively clearing all the grid values. Calls through to OEBase.Clear.

CreateCopy

CreateCopy() -> OEBase

Makes a copy of the grid instance.

ElementToGridIdx

ElementToGridIdx(el: int) -> (ix: int, iy: int, iz: int)

The element ‘el’ is the one dimensional index into the grid points. This function converts this one dimensional index into the three dimensional indices (ix, iy, iz) for the associated grid point. Returns false if ‘el’ is outside the array bounds.

ElementToSpatialCoord

ElementToSpatialCoord(el: int) -> (x: float, y: float, z: float)

The element ‘el’ is the one dimensional index into the grid points. This function converts this one dimensional index into the Cartesian coordinates (x,y,z) of the associated grid point. Returns false if ‘el’ is outside the array bounds.

GetDataType

GetDataType() -> void

GetDim

bool GetDim(unsigned int &xdim, unsigned int &ydim, unsigned int &zdim) const

Retrieves the grid dimensions (i.e. the wideness of the grid for a specific axis) into ‘xdim’, ‘ydim’, ‘zdim’ arguments.

GetMid

bool GetMid(float &x, float &y, float &z) const

Retrieves the grid midpoint (i.e. the center of the grid) into ‘midx’, ‘midy’ and ‘midz’ arguments. The midpoint defines where the grid is located in Cartesian space. Returns false if the midpoint is not completely defined (! IsXMidSet() || ! IsYMidSet() || ! IsZMidSet())

GetSize

GetSize() -> int

Returns the number of grid points inside this grid.

GetSpacing

GetSpacing() -> float

Returns the length between grid points.

GetTitle

GetTitle() -> str

Returns the title of this grid. The title defaults to an empty string.

GetX

GetX(ix: int) -> float

Returns the x-component of the Cartesian coordinate for the grid points with the x-index of ‘ix’.

GetXDim

GetXDim() -> int

Returns how many grid points there are for the x-dimension of this grid.

GetXIdx

GetXIdx(x: float) -> int

Returns the grid index in the x-dimension for the grid point identified by ‘x’, that corresponds to the x-component of the Cartesian coordinates.

GetXIdx(el: int) -> int

Returns the grid index in the x-dimension for the grid point identified by ‘el’, that corresponds to a specific point in the grid.

GetXInc

GetXInc() -> int

Returns the increment to be added or subtracted to the grid point index to access the neighbor grid points along the x-axis.

GetXMax

GetXMax() -> float

Returns the maximum extent of this grid along the x-axis.

GetXMid

GetXMid() -> float

Returns the center of this grid along the x-axis.

GetXMin

GetXMin() -> float

Returns the minimum extent of this grid along the x-axis.

GetY

GetY(iy: int) -> float

Returns the y-component of the Cartesian coordinate for the grid points with the y-index of ‘iy’.

GetYDim

GetYDim() -> int

Returns how many grid points there are for the y-dimension of this grid.

GetYIdx

GetYIdx(y: float) -> int

Returns the grid index in the y-dimension for the grid point identified by ‘y’, that corresponds to the y-component of the Cartesian coordinates.

GetYIdx(el: int) -> int

Returns the grid index in the y-dimension for the grid point identified by ‘el’, that corresponds to a specific point in the grid.

GetYInc

GetYInc() -> int

Returns the increment to be added or subtracted to the grid point index to access the neighbor grid points along the y-axis.

GetYMax

GetYMax() -> float

Returns the maximum extent of this grid along the y-axis.

GetYMid

GetYMid() -> float

Returns the center of this grid along the y-axis.

GetYMin

GetYMin() -> float

Returns the minimum extent of this grid along the y-axis.

GetZ

GetZ(iz: int) -> float

Returns the z-component of the Cartesian coordinate for the grid points with the z-index of ‘iz’.

GetZDim

GetZDim() -> int

Returns how many grid points there are for the z-dimension of this grid.

GetZIdx

GetZIdx(z: float) -> int

Returns the grid index in the z-dimension for the grid point identified by ‘z’, that corresponds to the z-component of the Cartesian coordinates.

GetZIdx(el: int) -> int

Returns the grid index in the z-dimension for the grid point identified by ‘el’, that corresponds to a specific point in the grid.

GetZInc

GetZInc() -> int

Returns the increment to be added or subtracted to the grid point index to access the neighbor grid points along the z-axis.

GetZMax

GetZMax() -> float

Returns the maximum extent of this grid along the z-axis.

GetZMid

GetZMid() -> float

Returns the center of this grid along the z-axis.

GetZMin

GetZMin() -> float

Returns the minimum extent of this grid along the z-axis.

GridIdxToElement

GridIdxToElement(ix: int, iy: int, iz: int) -> int

Converts the three dimensional grid indices (ix,iy,iz) into the one dimensional grid point index ‘el’. Returns false if (ix,iy,iz) are outside the grid bounds.

GridIdxToSpatialCoord

GridIdxToSpatialCoord(ix: int, iy: int, iz: int) -> (x: float, y: float, z: float)

Converts the three dimensional grid indices (ix,iy,iz) into the Cartesian coordinates (x,y,z) of the associated grid point. Returns false if (ix,iy,iz) are outside the grid bounds.

IsDataType

IsDataType(type: void) -> bool

Returns whether type is the same as the instance this method is called on.

IsInGrid

IsInGrid(x: float, y: float, z: float) -> bool
IsInGrid(ix: int, iy: int, iz: int) -> bool

Returns whether the given coordinates are located within the grid bounds.

IsSpacingSet

IsSpacingSet() -> bool

Returns whether the spacing for this grid has been specified.

IsTitleSet

IsTitleSet() -> bool

Returns whether there is a title associated with this grid.

IsXMidSet

IsXMidSet() -> bool

Returns whether the midpoint for this grid has been specified for the x-dimension.

IsYMidSet

IsYMidSet() -> bool

Returns whether the midpoint for this grid has been specified for the y-dimension.

IsZMidSet

IsZMidSet() -> bool

Returns whether the midpoint for this grid has been specified for the z-dimension.

SetTitle

SetTitle(title: str) -> bool

Sets the title associated with this grid.

SpatialCoordToElement

SpatialCoordToElement(x: float, y: float, z: float) -> int

Converts the Cartesian coordinates (x,y,z) into the grid point index ‘el’. Returns false if (x,y,z) are outside the grid bounds.

SpatialCoordToGridIdx

SpatialCoordToGridIdx(x: float, y: float, z: float) -> (ix: int, iy: int, iz: int)

Converts the Cartesian coordinates (x,y,z) into the three dimensional indices (ix,iy,iz). Returns false if (x,y,z) are outside the grid bounds.