Package esys :: Package escript :: Module escriptcpp :: Class Data
[hide private]
[frames] | no frames]

Class Data

 object --+    
          |    
??.instance --+
              |
             Data

Represents a collection of datapoints. It is used to store the values of a function. For more details please consult the c++ class documentation.
Instance Methods [hide private]
float
_Lsup(...)
Returns: the Lsup-norm of the object
Data
__abs__(...)
Returns: absolute value
 
__add__(...)
__add__( (Data)arg1, (object)arg2) -> object
 
__div__(...)
__div__( (Data)arg1, (object)arg2) -> object
Data
__getitem__(...)
Used by the python [] operator
 
__iadd__(...)
__iadd__( (object)arg1, (object)arg2) -> object
 
__idiv__(...)
__idiv__( (object)arg1, (object)arg2) -> object
 
__imul__(...)
__imul__( (object)arg1, (object)arg2) -> object
 
__init__(...)
__init__( (object)arg1) -> None
 
__isub__(...)
__isub__( (object)arg1, (object)arg2) -> object
 
__mul__(...)
__mul__( (Data)arg1, (object)arg2) -> object
Data
__neg__(...)
Returns: negation of the values in this object
Data
__pos__(...)
__pos__( (Data)arg1) -> Data :
Data
__pow__(...)
Used by the python ** operator
 
__radd__(...)
__radd__( (Data)arg1, (object)arg2) -> object
 
__rdiv__(...)
__rdiv__( (Data)arg1, (object)arg2) -> object
 
__reduce__(...)
helper for pickle
 
__rmul__(...)
__rmul__( (Data)arg1, (object)arg2) -> object
Data
__rpow__(...)
__rpow__( (Data)arg1, (object)arg2) -> Data :
 
__rsub__(...)
__rsub__( (Data)arg1, (object)arg2) -> object
 
__rtruediv__(...)
__rtruediv__( (Data)arg1, (object)arg2) -> Data
 
__setitem__(...)
Used by the python [] operator
 
__str__(...)
__str__( (Data)arg1) -> str
 
__sub__(...)
__sub__( (Data)arg1, (object)arg2) -> object
 
__truediv__(...)
__truediv__( (Data)arg1, (object)arg2) -> Data
 
_acos(...)
_acos( (Data)arg1) -> Data
 
_acosh(...)
_acosh( (Data)arg1) -> Data
 
_asin(...)
_asin( (Data)arg1) -> Data
 
_asinh(...)
_asinh( (Data)arg1) -> Data
 
_atan(...)
_atan( (Data)arg1) -> Data
 
_atanh(...)
_atanh( (Data)arg1) -> Data
 
_cos(...)
_cos( (Data)arg1) -> Data
 
_cosh(...)
_cosh( (Data)arg1) -> Data
 
_eigenvalues(...)
_eigenvalues( (Data)arg1) -> Data
 
_eigenvalues_and_eigenvectors(...)
_eigenvalues_and_eigenvectors( (Data)arg1 [, (float)tol=1e-13]) -> tuple
 
_erf(...)
_erf( (Data)arg1) -> Data
 
_exp(...)
_exp( (Data)arg1) -> Data
 
_grad(...)
_grad( (Data)arg1 [, (FunctionSpace)arg2]) -> Data
float
_inf(...)
Returns: minimum value over all components and all data points
tuple
_integrateToTuple(...)
Returns: Calculate the integral over the function space domain as a python tuple
 
_interpolate(...)
_interpolate( (Data)arg1, (FunctionSpace)arg2) -> Data
 
_interpolateTable3d(...)
_interpolateTable3d( (Data)table, (object)Amin, (float)Astep, (float)B, (Data)Bmin, (float)Bstep, (float)C, (Data)Cmin, (float)Cstep, (float)undef=1.0000000000000001e+50, (float)check_boundaries=False, (bool)For internal use only.
 
_inverse(...)
Returns: inverse of square matricies
 
_log(...)
_log( (Data)arg1) -> Data
 
_log10(...)
_log10( (Data)arg1) -> Data
 
_maxval(...)
_maxval( (Data)arg1) -> Data
 
_minval(...)
_minval( (Data)arg1) -> Data
 
_nonsymmetric(...)
_nonsymmetric( (Data)arg1) -> Data
 
_sign(...)
_sign( (Data)arg1) -> Data
 
_sin(...)
_sin( (Data)arg1) -> Data
 
_sinh(...)
_sinh( (Data)arg1) -> Data
 
_sqrt(...)
_sqrt( (Data)arg1) -> Data
float
_sup(...)
Returns: the maximum value over all data points.
 
_swap_axes(...)
_swap_axes( (Data)arg1, (int)arg2, (int)arg3) -> Data
 
_symmetric(...)
_symmetric( (Data)arg1) -> Data
 
_tan(...)
_tan( (Data)arg1) -> Data
 
_tanh(...)
_tanh( (Data)arg1) -> Data
 
_trace(...)
_trace( (Data)arg1, (int)arg2) -> Data
 
_transpose(...)
_transpose( (Data)arg1, (int)arg2) -> Data
 
_whereNegative(...)
_whereNegative( (Data)arg1) -> Data
 
_whereNonNegative(...)
_whereNonNegative( (Data)arg1) -> Data
 
_whereNonPositive(...)
_whereNonPositive( (Data)arg1) -> Data
 
_whereNonZero(...)
_whereNonZero( (Data)arg1 [, (float)tol=0.0]) -> Data
 
_wherePositive(...)
_wherePositive( (Data)arg1) -> Data
 
_whereZero(...)
_whereZero( (Data)arg1 [, (float)tol=0.0]) -> Data
 
copy(...)
Make this object a copy of other
 
copyWithMask(...)
Selectively copy values from other Data.Datapoints which correspond to postive values in mask will be copied from other
 
delay(...)
Convert this object into lazy representation
 
dump(...)
Save the data as a netCDF file
 
expand(...)
Convert the data to expanded representation if it is not expanded already.
Domain
getDomain(...)
FunctionSpace
getFunctionSpace(...)
int
getNumberOfDataPoints(...)
Returns: Number of datapoints in the object
positive int
getRank(...)
Returns: the number of indicies required to address a component of a datapoints
tuple
getShape(...)
getShape( (Data)arg1) -> tuple :
int
getTagNumber(...)
Return tag number for the specified datapoint
tuple
getTupleForDataPoint(...)
Returns: Value of the specified datapoint
tuple
getTupleForGlobalDataPoint(...)
Get a specific datapoint from a specific process
 
interpolate(...)
Interpolate this object's values into a new functionspace.
Data
interpolateTable(...)
Creates a new Data object by interpolating using the source data (which are looked up in table) A must be the outer dimension on the table
bool
isConstant(...)
Returns: True if this Data is an instance of DataConstant
bool
isEmpty(...)
Is this object an instance of DataEmpty
bool
isExpanded(...)
Returns: True if this Data is expanded.
bool
isLazy(...)
Returns: True if this Data is lazy.
 
isProtected(...)
Can this instance be modified.
bool
isReady(...)
Returns: True if this Data is not lazy.
bool
isTagged(...)
Returns: True if this Data is expanded.
 
maxGlobalDataPoint(...)
Please consider using getSupLocator() from pdetools instead.
 
minGlobalDataPoint(...)
Please consider using getInfLocator() from pdetools instead.
 
resolve(...)
Convert the data to non-lazy representation.
 
saveDX(...)
Save the object in DX format.
 
saveVTK(...)
Save the object in VTK format.
 
setProtection(...)
Disallow modifications to this data object
 
setTaggedValue(...)
Set the value of tagged Data.
 
setToZero(...)
After this call the object will store values of the same shape as before but all components will be zero.
 
setValueOfDataPoint(...)
setValueOfDataPoint( (Data)arg1, (int)dataPointNo, (object)value) -> None
 
tag(...)
Convert data to tagged representation if it is not already tagged or expanded
 
toListOfTuples(...)
Return the datapoints of this object in a list.

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  __instance_size__ = 40
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_Lsup(...)

 
_Lsup( (Data)arg1) -> float :
Returns: float
the Lsup-norm of the object

Note: If the Data contains no values, zero will be returned instead.

__abs__(...)

 
__abs__( (Data)arg1) -> Data :
Returns: Data
absolute value

__iadd__(...)

 

__iadd__( (object)arg1, (object)arg2) -> object

__iadd__( (object)arg1, (Data)arg2) -> object

__idiv__(...)

 

__idiv__( (object)arg1, (object)arg2) -> object

__idiv__( (object)arg1, (Data)arg2) -> object

__imul__(...)

 

__imul__( (object)arg1, (object)arg2) -> object

__imul__( (object)arg1, (Data)arg2) -> object

__init__(...)
(Constructor)

 

__init__( (object)arg1) -> None

__init__( (object)arg1, (object)value [, (FunctionSpace)what [, (bool)expand]]) -> None

__init__( (object)arg1, (float)value, (tuple)shape [, (FunctionSpace)what [, (bool)expand]]) -> None

__init__( (object)arg1, (Data)value, (FunctionSpace)what) -> None

__init__( (object)arg1, (Data)arg2) -> None

Overrides: object.__init__

__isub__(...)

 

__isub__( (object)arg1, (object)arg2) -> object

__isub__( (object)arg1, (Data)arg2) -> object

__neg__(...)

 
__neg__( (Data)arg1) -> Data :
Returns: Data
negation of the values in this object

__pos__(...)

 

__pos__( (Data)arg1) -> Data :

The unary + operator
Returns: Data

__pow__(...)

 
__pow__( (Data)arg1, (object)arg2) -> Data :
Used by the python ** operator

__pow__( (Data)arg1, (Data)arg2) -> Data

Returns: Data

__reduce__(...)

 
helper for pickle
Overrides: object.__reduce__
(inherited documentation)

__rpow__(...)

 

__rpow__( (Data)arg1, (object)arg2) -> Data :

Used by the python ** operator
Returns: Data

__setitem__(...)
(Index assignment operator)

 
__setitem__( (Data)arg1, (object)arg2, (object)arg3) -> None :
Used by the python [] operator
__setitem__( (Data)arg1, (object)arg2, (Data)arg3) -> None :
Used by the python [] operator

__str__(...)
(Informal representation operator)

 

__str__( (Data)arg1) -> str

__str__( (Data)arg1) -> object

Overrides: object.__str__

__truediv__(...)

 

__truediv__( (Data)arg1, (object)arg2) -> Data

__truediv__( (Data)arg1, (Data)arg2) -> Data

_inf(...)

 
_inf( (Data)arg1) -> float :
Returns: float
minimum value over all components and all data points

Note: If the Data contains no values a large positive value will be returned instead.

_integrateToTuple(...)

 
_integrateToTuple( (Data)arg1) -> object :
Returns: tuple
Calculate the integral over the function space domain as a python tuple

_interpolateTable3d(...)

 
_interpolateTable3d( (Data)table, (object)Amin, (float)Astep, (float)B, (Data)Bmin, (float)Bstep, (float)C, (Data)Cmin, (float)Cstep, (float)undef=1.0000000000000001e+50, (float)check_boundaries=False, (bool)For internal use only. Please use the interpolateTable function.) -> Data

_inverse(...)

 
_inverse( (Data)arg1) -> Data :
Returns:
inverse of square matricies

_sup(...)

 
_sup( (Data)arg1) -> float :
Returns: float
the maximum value over all data points.

Note: If the Data contains no values a large negative value will be returned instead.

_trace(...)

 

_trace( (Data)arg1, (int)arg2) -> Data

_trace( (Data)arg1, (int)arg2) -> Data

copy(...)

 
copy( (Data)arg1, (Data)other) -> None :
Make this object a copy of other
copy( (Data)arg1) -> Data :
Notes:
  • The two objects will act independently from now on. That is, changing other after this call will not change this object and vice versa.
  • In the no argument form, a new object will be returned which is an independent copy of this object.

copyWithMask(...)

 
copyWithMask( (Data)arg1, (Data)other, (Data)mask) -> None :
Selectively copy values from other Data.Datapoints which correspond to postive values in mask will be copied from other
Parameters:
  • other (Data) - source of values
  • mask (Scalar Data)

dump(...)

 
dump( (Data)arg1, (str)fileName) -> None :
Save the data as a netCDF file
Parameters:
  • fileName (string)

getNumberOfDataPoints(...)

 
getNumberOfDataPoints( (Data)arg1) -> int :
Returns: int
Number of datapoints in the object

getRank(...)

 
getRank( (Data)arg1) -> int :
Returns: positive int
the number of indicies required to address a component of a datapoints

getShape(...)

 

getShape( (Data)arg1) -> tuple :

Returns the shape of the datapoints in this object as a python tuple. Scalar data has the shape ()
Returns: tuple

getTagNumber(...)

 
getTagNumber( (Data)arg1, (int)dpno) -> int :
Return tag number for the specified datapoint
Parameters:
  • dpno (int) - datapoint number
Returns: int

getTupleForDataPoint(...)

 
getTupleForDataPoint( (Data)arg1, (int)dataPointNo) -> object :
Parameters:
  • dataPointNo (int) - datapoint to access
Returns: tuple
Value of the specified datapoint

getTupleForGlobalDataPoint(...)

 
getTupleForGlobalDataPoint( (Data)arg1, (int)procNo, (int)dataPointNo) -> object :
Get a specific datapoint from a specific process
Parameters:
  • procNo (positive int) - MPI rank of the process
  • dataPointNo (int) - datapoint to access
Returns: tuple

interpolateTable(...)

 
interpolateTable( (Data)arg1, (object)table, (float)Amin, (float)Astep, (Data)B, (float)Bmin, (float)Bstep [, (float)undef=1.0000000000000001e+50 [, (bool)check_boundaries=False]]) -> Data :
Creates a new Data object by interpolating using the source data (which are looked up in table) A must be the outer dimension on the table

interpolateTable( (Data)arg1, (object)table, (float)Amin, (float)Astep [, (float)undef=1.0000000000000001e+50 [, (bool)check_boundaries=False]]) -> Data

Parameters:
  • table - two dimensional collection of values
  • Amin (float) - The base of locations in table
  • Astep (float) - size of gap between each item in the table
  • undef (float) - upper bound on interpolated values
  • B (Data) - Scalar representing the second coordinate to be mapped into the table
  • Bmin (float) - The base of locations in table for 2nd dimension
  • Bstep (float) - size of gap between each item in the table for 2nd dimension
  • check_boundaries - if true, then values outside the boundaries will be rejected. If false, then boundary values will be used.
Returns: Data
Raises:
  • RuntimeError(DataException) - if the cordinates do not map into the table or if the interpolated value is above undef

isConstant(...)

 
isConstant( (Data)arg1) -> bool :
Returns: bool
True if this Data is an instance of DataConstant

Note: This does not mean the data is immutable.

isEmpty(...)

 
isEmpty( (Data)arg1) -> bool :
Is this object an instance of DataEmpty
Returns: bool

Note: This is not the same thing as asking if the object contains datapoints.

isExpanded(...)

 
isExpanded( (Data)arg1) -> bool :
Returns: bool
True if this Data is expanded.

isLazy(...)

 
isLazy( (Data)arg1) -> bool :
Returns: bool
True if this Data is lazy.

isProtected(...)

 
isProtected( (Data)arg1) -> bool :
Can this instance be modified. :rtype: bool

isReady(...)

 
isReady( (Data)arg1) -> bool :
Returns: bool
True if this Data is not lazy.

isTagged(...)

 
isTagged( (Data)arg1) -> bool :
Returns: bool
True if this Data is expanded.

saveDX(...)

 
saveDX( (Data)arg1, (str)fileName) -> None :
Save the object in DX format.
Parameters:
  • fileName (string) - filename

saveVTK(...)

 
saveVTK( (Data)arg1, (str)fileName) -> None :
Save the object in VTK format.
Parameters:
  • fileName (string)

setProtection(...)

 
setProtection( (Data)arg1) -> None :
Disallow modifications to this data object

Note: This method does not allow you to undo protection.

setTaggedValue(...)

 
setTaggedValue( (Data)arg1, (int)tagKey, (object)value) -> None :
Set the value of tagged Data.
setTaggedValue( (Data)arg1, (str)name, (object)value) -> None :
Parameters:
  • tagKey (int) - tag to update
  • name (string) - tag to update
  • value (object which acts like an array, tuple or list) - value to set tagged data to

setValueOfDataPoint(...)

 

setValueOfDataPoint( (Data)arg1, (int)dataPointNo, (object)value) -> None

setValueOfDataPoint( (Data)arg1, (int)arg2, (object)arg3) -> None

setValueOfDataPoint( (Data)arg1, (int)arg2, (float)arg3) -> None :

Modify the value of a single datapoint.
Parameters:
  • dataPointNo (int)
  • value (float or an object which acts like an array, tuple or list)

Warning: Use of this operation is discouraged. It prevents some optimisations from operating.

toListOfTuples(...)

 
toListOfTuples( (Data)arg1 [, (bool)scalarastuple=False]) -> object :
Return the datapoints of this object in a list. Each datapoint is stored as a tuple.
Parameters:
  • scalarastuple - if True, scalar data will be wrapped as a tuple. True => [(0), (1), (2)]; False => [0, 1, 2]