escript::DataTypes Namespace Reference

Contains the types to represent Shapes, Regions, RegionLoop ranges and vectors of data as well as the functions to manipulate them. More...

## Classes

class | DataVectorAlt
class | DataVectorTaipan
| DataVectorTaipan implements an arbitrarily long vector of data values. DataVectorTaipan is the underlying data container for Data objects. More...

## Typedefs

typedef std::vector< int > | ShapeType
| The shape of a single datapoint. More...
typedef std::vector< std::pair< int, int > > | RegionType
typedef std::vector< std::pair< int, int > > | RegionLoopRangeType
typedef long | vec_size_type
typedef double | real_t
| type of all real-valued scalars in escript More...
typedef std::complex< real_t > | cplx_t
| complex data type More...
typedef int | index_t
| type for array/matrix indices used both globally and on each rank More...
typedef std::vector< index_t > | IndexVector
typedef index_t | dim_t
typedef escript::DataTypes::DataVectorAlt< real_t > | RealVectorType
| Vector to store underlying data. More...
typedef escript::DataTypes::DataVectorAlt< cplx_t > | CplxVectorType

## Functions

int | noValues (const DataTypes::ShapeType &shape)
| Calculate the number of values in a datapoint with the given shape. More...
int | noValues (const DataTypes::RegionLoopRangeType &region)
| Calculate the number of values for the given region. More...
std::string | shapeToString (const DataTypes::ShapeType &shape)
| Return the given shape as a string. More...
DataTypes::RegionType | getSliceRegion (const DataTypes::ShapeType &shape, const bp::object &key)
DataTypes::ShapeType | getResultSliceShape (const DataTypes::RegionType &region)
| Determine the shape of the specified slice region. More...
DataTypes::RegionLoopRangeType | getSliceRegionLoopRange (const DataTypes::RegionType &region)

Modify region to copy from in order to deal with the case where one range in the region contains identical indexes, eg: <<1,1><0,3><0,3>> This situation implies we want to copy from an object with rank greater than that of this object. eg: we want to copy the values from a two dimensional slice out of a three dimensional object into a two dimensional object. We do this by taking a slice from the other object where one dimension of the slice region is of size 1. So in the above example, we modify the above region like so: <<1,2><0,3><0,3>> and take this slice. More...

std::string | createShapeErrorMessage (const std::string &messagePrefix, const DataTypes::ShapeType &other, const DataTypes::ShapeType &thisShape)
| Produce a string containing two shapes. More...
index_t | index_t_min ()
| Returns the minimum finite value for the index_t type. More...
index_t | index_t_max ()
| Returns the maximum finite value for the index_t type. More...
real_t | real_t_max ()
| Returns the maximum finite value for the real_t type. More...
real_t | real_t_eps ()
| Returns the machine epsilon for the real_t type. More...
DataTypes::RegionType | getSliceRegion (const DataTypes::ShapeType &shape, const boost::python::object &key)
| Determine the region specified by the given python slice object. More...
int | getRank (const DataTypes::ShapeType &shape)
| Return the rank (number of dimensions) of the given shape. More...
vec_size_type | getRelIndex (const DataTypes::ShapeType &shape, vec_size_type i)
| Compute the offset (in 1D vector) of a given subscript with a shape. More...
vec_size_type | getRelIndex (const DataTypes::ShapeType &shape, vec_size_type i, vec_size_type j)
| Compute the offset (in 1D vector) of a given subscript with a shape. More...
vec_size_type | getRelIndex (const DataTypes::ShapeType &shape, vec_size_type i, vec_size_type j, vec_size_type k)
| Compute the offset (in 1D vector) of a given subscript with a shape. More...
vec_size_type | getRelIndex (const DataTypes::ShapeType &shape, vec_size_type i, vec_size_type j, vec_size_type k, vec_size_type m)
| Compute the offset (in 1D vector) of a given subscript with a shape. More...
bool | checkShape (const ShapeType &s1, const ShapeType &s2)
| Test if two shapes are equal. More...
bool | checkOffset (vec_size_type offset, int size, int noval)
void | pointToStream (std::ostream &os, const RealVectorType::ElementType *data, const ShapeType &shape, int offset, bool needsep=true, const std::string &sep=",")
| Display a single value (with the specified shape) from the data. More...
std::string | pointToString (const RealVectorType &data, const ShapeType &shape, int offset, const std::string &prefix)
| Display a single value (with the specified shape) from the data. More...
void | copyPoint (RealVectorType &dest, vec_size_type doffset, vec_size_type nvals, const RealVectorType &src, vec_size_type soffset)
| Copy a point from one vector to another. Note: This version does not check to see if shapes are the same. More...
void | fillComplexFromReal (const RealVectorType &r, CplxVectorType &c)
| copy data from a real vector to a complex vector The complex vector will be resized as needed and any previous values will be replaced. More...
template<class VEC >
void | copySlice (VEC &left, const ShapeType &leftShape, typename VEC::size_type leftOffset, const VEC &other, const ShapeType &otherShape, typename VEC::size_type otherOffset, const RegionLoopRangeType &region)
| Copy a data slice specified by the given region and offset from the "other" vector into the "left" vector at the given offset. More...
template<typename VEC >
void | copySliceFrom (VEC &left, const ShapeType &leftShape, typename VEC::size_type leftOffset, const VEC &other, const ShapeType &otherShape, typename VEC::size_type otherOffset, const RegionLoopRangeType &region)
| Copy data into a slice specified by the given region and offset in the left vector from the other vector at the given offset. More...
void | releaseUnusedMemory ()
| releases unused memory in the memory manager. More...

## Variables

static const int | maxRank =4
| The maximum number of dimensions a datapoint can have. More...
static const ShapeType | scalarShape
| Use this instead of creating empty shape objects for scalars. More...
Taipan | arrayManager

## Detailed Description

Contains the types to represent Shapes, Regions, RegionLoop ranges and vectors of data as well as the functions to manipulate them.

Note
  The contents of the namespace are spread between DataTypes.h and DataVector.h

## Typedef Documentation

## cplx_t

typedef std::complex<real_t> escript::DataTypes::cplx_t

complex data type

## CplxVectorType

typedef escript::DataTypes::DataVectorAlt<cplx_t> escript::DataTypes::CplxVectorType

## dim_t

typedef index_t escript::DataTypes::dim_t

## index_t

typedef int escript::DataTypes::index_t

type for array/matrix indices used both globally and on each rank

## IndexVector

typedef std::vector<index_t> escript::DataTypes::IndexVector

## real_t

typedef double escript::DataTypes::real_t

type of all real-valued scalars in escript

## RealVectorType

typedef escript::DataTypes::DataVectorAlt<real_t> escript::DataTypes::RealVectorType

Vector to store underlying data.

## RegionLoopRangeType

typedef std::vector<std::pair<int, int> > escript::DataTypes::RegionLoopRangeType

## RegionType

typedef std::vector<std::pair<int, int> > escript::DataTypes::RegionType

## ShapeType

typedef std::vector<int> escript::DataTypes::ShapeType

The shape of a single datapoint.

## vec_size_type

typedef long escript::DataTypes::vec_size_type

## Function Documentation

## checkOffset()

bool escript::DataTypes::checkOffset | ( | vec_size_type | offset,
|  | int | size,
|  | int | noval
| ) |  |

inline

Referenced by copySlice(), and copySliceFrom().

## checkShape()

bool escript::DataTypes::checkShape | ( | const ShapeType & | s1,
|  | const ShapeType & | s2
| ) |  |

inline

Test if two shapes are equal.

Referenced by escript::DataTagged::addTaggedValue(), escript::DataExpanded::copy(), escript::DataTagged::setSlice(), escript::DataConstant::setSlice(), escript::DataExpanded::setSlice(), and escript::DataTagged::setTaggedValue().

## copyPoint()

void escript::DataTypes::copyPoint | ( | RealVectorType & | dest,
|  | vec_size_type | doffset,
|  | vec_size_type | nvals,
|  | const RealVectorType & | src,
|  | vec_size_type | soffset
| ) |  |

Copy a point from one vector to another. Note: This version does not check to see if shapes are the same.

Parameters

  dest | - vector to copy to
  doffset | - beginning of the target datapoint in dest
  nvals | - the number of values comprising the datapoint
  src | - vector to copy from
  soffset | - beginning of the datapoint in src

Referenced by escript::DataExpanded::copy(), and escript::DataExpanded::DataExpanded().

## copySlice()

template<class VEC >

void escript::DataTypes::copySlice | ( | VEC & | left,
|  | const ShapeType & | leftShape,
|  | typename VEC::size_type | leftOffset,
|  | const VEC & | other,
|  | const ShapeType & | otherShape,
|  | typename VEC::size_type | otherOffset,
|  | const RegionLoopRangeType & | region
| ) |  |

Copy a data slice specified by the given region and offset from the "other" vector into the "left" vector at the given offset.

Parameters

  left | - vector to copy into
  leftShape | - shape of datapoints for the left vector
  leftOffset | - location within left to start copying to
  other | - vector to copy from
  otherShape | - shape of datapoints for the other vector
  otherOffset | - location within other vector to start copying from
  region | - Input - Region in other vector to copy data from.

References checkOffset(), ESYS_ASSERT, getRank(), getRelIndex(), getResultSliceShape(), and noValues().

Referenced by escript::DataConstant::DataConstant(), escript::DataExpanded::DataExpanded(), and escript::DataTagged::DataTagged().

## copySliceFrom()

template<typename VEC >

void escript::DataTypes::copySliceFrom | ( | VEC & | left,
|  | const ShapeType & | leftShape,
|  | typename VEC::size_type | leftOffset,
|  | const VEC & | other,
|  | const ShapeType & | otherShape,
|  | typename VEC::size_type | otherOffset,
|  | const RegionLoopRangeType & | region
| ) |  |

Copy data into a slice specified by the given region and offset in the left vector from the other vector at the given offset.

Parameters

  left | - vector to copy into
  leftShape | - shape of datapoints for the left vector
  leftOffset | - location within left to start copying to
  other | - vector to copy from
  otherShape | - shape of datapoints for the other vector
  otherOffset | - location within other vector to start copying from
  region | - Input - Region in the left vector to copy data to.

References checkOffset(), ESYS_ASSERT, getRank(), getRelIndex(), getResultSliceShape(), and noValues().

Referenced by escript::DataTagged::setSlice(), escript::DataConstant::setSlice(), and escript::DataExpanded::setSlice().

## createShapeErrorMessage()

std::string escript::DataTypes::createShapeErrorMessage | ( | const std::string & | messagePrefix,
|  | const DataTypes::ShapeType & | other,
|  | const DataTypes::ShapeType & | thisShape
| ) |  |

Produce a string containing two shapes.

Parameters

  messagePrefix | - Beginning of the message.
  other | - displayed in the message as "Other shape"
  thisShape | - displayed in the message as "This shape"

References shapeToString().

Referenced by escript::DataTagged::addTaggedValue(), escript::DataExpanded::copy(), escript::DataTagged::setSlice(), escript::DataConstant::setSlice(), escript::DataExpanded::setSlice(), and escript::DataTagged::setTaggedValue().

## fillComplexFromReal()

void escript::DataTypes::fillComplexFromReal | ( | const RealVectorType & | r,
|  | CplxVectorType & | c
| ) |  |

copy data from a real vector to a complex vector The complex vector will be resized as needed and any previous values will be replaced.

References OMP_LOOP_IDX_T, escript::DataTypes::DataVectorAlt< T >::resize(), and escript::DataTypes::DataVectorAlt< T >::size().

Referenced by escript::DataConstant::complicate(), escript::DataExpanded::complicate(), escript::DataTagged::complicate(), and escript::DataExpanded::setTaggedValue().

## getRank()

int escript::DataTypes::getRank | ( | const DataTypes::ShapeType & | shape | ) |

inline

Return the rank (number of dimensions) of the given shape.

Parameters

  shape |

Returns
  the rank.

Referenced by escript::antihermitian(), escript::antisymmetric(), copySlice(), copySliceFrom(), escript::determineResultShape(), getRelIndex(), escript::hermitian(), escript::matMult(), escript::matrix_inverse(), pointToString(), escript::swapaxes(), escript::symmetric(), escript::trace(), and escript::transpose().

## getRelIndex() [1/4]

vec_size_type escript::DataTypes::getRelIndex | ( | const DataTypes::ShapeType & | shape,
|  | vec_size_type | i
| ) |  |

inline

Compute the offset (in 1D vector) of a given subscript with a shape.

Parameters

  shape | - Input - Shape of the datapoint.
  i | - Input - subscript to locate.

Returns
  offset relative to the beginning of the datapoint.

References ESYS_ASSERT, getRank(), and noValues().

Referenced by escript::antihermitian(), escript::antisymmetric(), escript::WrappedArray::convertArrayC(), escript::WrappedArray::convertArrayR(), escript::WrappedArray::convertNumpyArray(), escript::WrappedArray::convertNumpyArrayC(), escript::DataTypes::DataVectorTaipan::copyFromArrayToOffset(), escript::DataTypes::DataVectorAlt< T >::copyFromArrayToOffset(), copySlice(), copySliceFrom(), escript::DataExpanded::copyToDataPoint(), escript::eigenvalues(), escript::eigenvalues_and_eigenvectors(), escript::WrappedArray::getElt(), escript::WrappedArray::getEltC(), escript::hermitian(), escript::matMult(), escript::matrix_inverse(), pointToString(), escript::swapaxes(), escript::symmetric(), escript::trace(), and escript::transpose().

## getRelIndex() [2/4]

vec_size_type escript::DataTypes::getRelIndex | ( | const DataTypes::ShapeType & | shape,
|  | vec_size_type | i,
|  | vec_size_type | j
| ) |  |

inline

Compute the offset (in 1D vector) of a given subscript with a shape.

Parameters

  shape | - Input - Shape of the datapoint.
  i | - Input - row
  j | - Input - column

Returns
  offset relative to the beginning of the datapoint.

References ESYS_ASSERT, getRank(), and noValues().

## getRelIndex() [3/4]

vec_size_type escript::DataTypes::getRelIndex | ( | const DataTypes::ShapeType & | shape,
|  | vec_size_type | i,
|  | vec_size_type | j,
|  | vec_size_type | k
| ) |  |

inline

Compute the offset (in 1D vector) of a given subscript with a shape.

Parameters

  shape | - Input - Shape of the datapoint.
  i,j,k | - Input - subscripts to locate.

Returns
  offset relative to the beginning of the datapoint.

References ESYS_ASSERT, getRank(), and noValues().

## getRelIndex() [4/4]

vec_size_type escript::DataTypes::getRelIndex | ( | const DataTypes::ShapeType & | shape,
|  | vec_size_type | i,
|  | vec_size_type | j,
|  | vec_size_type | k,
|  | vec_size_type | m
| ) |  |

inline

Compute the offset (in 1D vector) of a given subscript with a shape.

Parameters

  shape | - Input - Shape of the datapoint.
  i,j,k,m | - Input - subscripts to locate.

Returns
  offset relative to the beginning of the datapoint.

References ESYS_ASSERT, getRank(), and noValues().

## getResultSliceShape()

DataTypes::ShapeType escript::DataTypes::getResultSliceShape | ( | const DataTypes::RegionType & | region | ) |

Determine the shape of the specified slice region.

Parameters

  region | - Input - Slice region

Referenced by copySlice(), copySliceFrom(), escript::DataTagged::DataTagged(), escript::DataTagged::setSlice(), escript::DataConstant::setSlice(), and escript::DataExpanded::setSlice().

## getSliceRegion() [1/2]

DataTypes::RegionType escript::DataTypes::getSliceRegion | ( | const DataTypes::ShapeType & | shape,
|  | const boost::python::object & | key
| ) |  |

Determine the region specified by the given python slice object.

Parameters

  shape | - Input - Shape of the object being sliced.
  key | - Input - python slice object specifying region to be returned.

The slice object is a tuple of n python slice specifiers, where n <= the rank of this Data object. Each slice specifier specifies the range of indexes to be sliced from the corresponding dimension. The first specifier corresponds to the first dimension, the second to the second and so on. Where n < the rank, the remaining dimensions are sliced across the full range of their indices.

Each slice specifier is of the form "a:b", which specifies a slice from index a, up to but not including index b. Where index a is omitted a is assumed to be 0. Where index b is omitted, b is assumed to be the length of this dimension. Where both are omitted (eg: ":") the slice is assumed to encompass that entire dimension.

Where one of the slice specifiers is a single integer, eg: [1], we want to generate a rank-1 dimension object, as opposed to eg: [1,2] which implies we want to take a rank dimensional object with one dimension of size 1.

The return value is a vector of pairs with length equal to the rank of this object. Each pair corresponds to the range of indices from the corresponding dimension to be sliced from, as specified in the input slice object.

Examples:

For a rank 1 object of shape(5):

getSliceRegion(:) => < <0,5> > getSliceRegion(2:3) => < <2,3> > getSliceRegion(:3) => < <0,3> > getSliceRegion(2:) => < <2,5> >

For a rank 2 object of shape(4,5):

getSliceRegion(2:3) => < <2,3> <0,5> > getSliceRegion(2) => < <2,3> <0,5> > NB: but return object requested will have rank 1, shape(5), with values taken from index 2 of this object's first dimension.

For a rank 3 object of shape (2,4,6):

getSliceRegion(0:2,0:4,0:6) => < <0,2> <0,4> <0,6> > getSliceRegion(:,:,:) => < <0,2> <0,4> <0,6> > getSliceRegion(0:1) => < <0,1> <0,4> <0,6> > getSliceRegion(:1,0:2) => < <0,1> <0,2> <0,6> >

Note: Not unit tested in c++.

## getSliceRegion() [2/2]

DataTypes::RegionType escript::DataTypes::getSliceRegion | ( | const DataTypes::ShapeType & | shape,
|  | const bp::object & | key
| ) |  |

Referenced by escript::Data::getItem().

## getSliceRegionLoopRange()

DataTypes::RegionLoopRangeType escript::DataTypes::getSliceRegionLoopRange | ( | const DataTypes::RegionType & | region | ) |

Modify region to copy from in order to deal with the case where one range in the region contains identical indexes, eg: <<1,1><0,3><0,3>> This situation implies we want to copy from an object with rank greater than that of this object. eg: we want to copy the values from a two dimensional slice out of a three dimensional object into a two dimensional object. We do this by taking a slice from the other object where one dimension of the slice region is of size 1. So in the above example, we modify the above region like so: <<1,2><0,3><0,3>> and take this slice.

Referenced by escript::DataConstant::DataConstant(), escript::DataExpanded::DataExpanded(), escript::DataTagged::DataTagged(), escript::DataTagged::setSlice(), escript::DataConstant::setSlice(), and escript::DataExpanded::setSlice().

## index_t_max()

index_t escript::DataTypes::index_t_max | ( |  | ) |

inline

Returns the maximum finite value for the index_t type.

Referenced by dudley::util::getFlaggedMinMaxInt(), finley::util::getFlaggedMinMaxInt(), dudley::util::getMinMaxInt(), finley::util::getMinMaxInt(), dudley::DudleyDomain::resolveNodeIds(), and finley::FinleyDomain::resolveNodeIds().

## index_t_min()

index_t escript::DataTypes::index_t_min | ( |  | ) |

inline

Returns the minimum finite value for the index_t type.

Referenced by dudley::util::getFlaggedMinMaxInt(), finley::util::getFlaggedMinMaxInt(), dudley::util::getMinMaxInt(), finley::util::getMinMaxInt(), and paso::util::iMax().

## noValues() [1/2]

int escript::DataTypes::noValues | ( | const RegionLoopRangeType & | region | ) |

Calculate the number of values for the given region.

Referenced by noValues().

## noValues() [2/2]

int escript::DataTypes::noValues | ( | const ShapeType & | shape | ) |

Calculate the number of values in a datapoint with the given shape.

References noValues().

Referenced by escript::binaryOpDataReadyHelperCCC(), escript::binaryOpDataReadyHelperECE(), escript::binaryOpDataReadyHelperEEC(), escript::binaryOpDataReadyHelperEEE(), escript::binaryOpDataReadyHelperEET(), escript::binaryOpDataReadyHelperETE(), escript::binaryOpDataReadyHelperTCT(), escript::binaryOpDataReadyHelperTTC(), escript::binaryOpDataReadyHelperTTT(), escript::checkOffset(), escript::WrappedArray::convertArrayC(), escript::WrappedArray::convertArrayR(), escript::WrappedArray::convertNumpyArray(), escript::WrappedArray::convertNumpyArrayC(), escript::DataTypes::DataVectorTaipan::copyFromArray(), escript::DataTypes::DataVectorAlt< T >::copyFromArray(), escript::DataTypes::DataVectorTaipan::copyFromArrayToOffset(), escript::DataTypes::DataVectorAlt< T >::copyFromArrayToOffset(), copySlice(), copySliceFrom(), escript::DataTagged::DataTagged(), getRelIndex(), escript::Data::getValueOfGlobalDataPointAsTuple(), escript::MPIDataReducer::groupSend(), escript::matrix_inverse(), speckley::Brick::randomFill(), ripley::Rectangle::randomFillWorker(), escript::MPIDataReducer::recvFrom(), escript::reductionOpVector(), escript::DataLazy::resolveNodeReduction(), escript::saveDataCSV(), and escript::trace().

## pointToStream()

void escript::DataTypes::pointToStream | ( | std::ostream & | os,
|  | const RealVectorType::ElementType * | data,
|  | const ShapeType & | shape,
|  | int | offset,
|  | bool | needsep = `true`,
|  | const std::string & | sep = `","`
| ) |  |

Display a single value (with the specified shape) from the data.

Despite its similar name this function behaves differently to pointToString. There are no prefixes or (i,j,k) identifiers on each field. each datapoint is printed without new lines. It also works with double* rather than vectors so be careful what you pass it.

Parameters

  os | - stream to write to
  data | - vector containing the datapoint
  shape | - shape of the datapoint
  offset | - start of the datapoint within data
  needsep | - Does this output need to start with a separator
  sep | - separator string to print between components

Referenced by escript::saveDataCSV().

## pointToString()

std::string escript::DataTypes::pointToString | ( | const RealVectorType & | data,
|  | const ShapeType & | shape,
|  | int | offset,
|  | const std::string & | prefix
| ) |  |

Display a single value (with the specified shape) from the data.

Parameters

  data | - vector containing the datapoint
  shape | - shape of the datapoint
  offset | - start of the datapoint within data
  prefix | - string to prepend to the output

References ESYS_ASSERT, getRank(), getRelIndex(), and escript::DataTypes::DataVectorAlt< T >::size().

Referenced by escript::DataLazy::resolveNodeTProd(), escript::DataLazy::resolveNodeTProdCplx(), escript::DataConstant::toString(), escript::DataExpanded::toString(), and escript::DataTagged::toString().

## real_t_eps()

real_t escript::DataTypes::real_t_eps | ( |  | ) |

inline

Returns the machine epsilon for the real_t type.

Referenced by paso::Function::derivative(), ripley::Brick::findNode(), ripley::Rectangle::findNode(), paso::FCT_Solver::initialize(), paso::TransportProblem::solve(), and paso::Solver().

## real_t_max()

real_t escript::DataTypes::real_t_max | ( |  | ) |

inline

Returns the maximum finite value for the real_t type.

Referenced by finley::FinleyDomain::addDiracPoints(), paso::ReactiveSolver::getSafeTimeStepSize(), paso::FCT_FluxLimiter::setU_tilde(), and paso::TransportProblem::solve().

## releaseUnusedMemory()

void escript::DataTypes::releaseUnusedMemory | ( |  | ) |

releases unused memory in the memory manager.

References arrayManager, and escript::Taipan::release_unused_arrays().

Referenced by BOOST_PYTHON_MODULE().

## shapeToString()

std::string escript::DataTypes::shapeToString | ( | const DataTypes::ShapeType & | shape | ) |

Return the given shape as a string.

Parameters

  shape | - Input.

Referenced by createShapeErrorMessage(), escript::DataAbstract::operandCheck(), escript::DataLazy::resolveNodeBinary(), escript::DataLazy::resolveNodeBinaryCplx(), escript::DataLazy::resolveNodeTProd(), and escript::DataLazy::resolveNodeTProdCplx().

## Variable Documentation

## arrayManager

Taipan escript::DataTypes::arrayManager

Referenced by escript::DataTypes::DataVectorTaipan::copyFromArray(), escript::DataTypes::DataVectorTaipan::DataVectorTaipan(), escript::DataTypes::DataVectorTaipan::operator=(), releaseUnusedMemory(), escript::DataTypes::DataVectorTaipan::resize(), and escript::DataTypes::DataVectorTaipan::~DataVectorTaipan().

## maxRank

const int escript::DataTypes::maxRank =4

static

The maximum number of dimensions a datapoint can have.

Referenced by escript::DataConstant::dump(), escript::DataExpanded::dump(), escript::DataTagged::dump(), and escript::load().

## scalarShape

const ShapeType escript::DataTypes::scalarShape

static

Use this instead of creating empty shape objects for scalars.

Referenced by escript::Data::dp_algorithm(), escript::TestDomain::getX(), and ripley::Rectangle::randomFillWorker().