OESkewGrid

class OESkewGrid : public OEGridAbstractBase

This class represents OESkewGrid.

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

Constructors

OESkewGrid() -> OESkewGrid

Creates a one point OESkewGrid grid object.

OESkewGrid(rhs: OESkewGrid) -> OESkewGrid
OESkewGrid(f: OESkewGridImpl) -> OESkewGrid
OESkewGrid(g: OEScalarGrid) -> OESkewGrid
OESkewGrid(f: OEFixedFloatGrid) -> OESkewGrid

Creates a OESkewGrid object and copies the entire contents of the ‘rhs’.

operator bool

IsValid() -> bool

AsRegularGrid

AsRegularGrid() -> OEFixedFloatGrid

Clear

Clear() -> None

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

CreateCopy

CreateCopy() -> OESkewGrid

Makes a copy of the grid instance.

ElementToGridIdx

ElementToGridIdx(el: int) -> Tuple[int, int, 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) -> Tuple[float, float, 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

Returns the data type of the grid.

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 &midx, float &midy, float &midz) 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())

GetReentrant

GetReentrant() -> int

GetSize

GetSize() -> int

Returns the number of grid points inside this grid.

GetSpaceGroup

GetSpaceGroup() -> int

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.

GetType

GetType() -> int

Returns the data type tag for the grid.

GetUnitCell

GetUnitCell(A: float, B: float, C: float, alpha: float,
            beta: float, gamma: float) -> bool

GetXDim

GetXDim() -> int

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

GetXMid

GetXMid() -> float

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

GetYDim

GetYDim() -> int

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

GetYMid

GetYMid() -> float

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

GetZDim

GetZDim() -> int

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

GetZMid

GetZMid() -> float

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

HasSpaceGroup

HasSpaceGroup() -> bool

HasUnitCell

HasUnitCell() -> bool

IsDataType

IsDataType(type: void) -> bool

Returns whether type is the same as the instance this method is called on (i.e. OESkewGrid).

IsRegular

IsRegular() -> bool

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.

SetDim

SetDim(xdim: int, ydim: int, zdim: int) -> bool

Sets the number of grid points for each dimension.

SetMid

SetMid(midx: float, midy: float, midz: float) -> bool

Sets the mid-point (center) of the grid.

SetReentrant

SetReentrant(state: bool = True) -> None

SetSpaceGroup

SetSpaceGroup(group: int) -> bool

SetSpacing

SetSpacing(spacing: float) -> bool

Sets the length between grid points.

SetTitle

SetTitle(title: str) -> bool

Sets the title associated with this grid.

SetType

SetType(type: int) -> None

Sets the tag associated with this grid.

SetUnitCell

SetUnitCell(A: float, B: float, C: float, alpha: float,
            beta: float, gamma: float, nx: int, ny: int, nz: int) -> bool

SetValues

SetValues(values: OEFloatArray, length: int) -> bool