escript
Revision_
|
Data represents a collection of datapoints. More...
#include <Data.h>
Public Member Functions | |
Data () | |
Default constructor. Creates a DataEmpty object. More... | |
Data (const Data &inData) | |
Copy constructor. WARNING: Only performs a shallow copy. More... | |
Data (const Data &inData, const FunctionSpace &what) | |
Constructor from another Data object. If "what" is different from the function space of inData the inData are tried to be interpolated to what, otherwise a shallow copy of inData is returned. More... | |
Data (const DataTypes::RealVectorType &value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded) | |
Copy Data from an existing vector. More... | |
Data (DataTypes::real_t value, const DataTypes::ShapeType &dataPointShape, const FunctionSpace &what, bool expanded) | |
Constructor which creates a Data with points having the specified shape. More... | |
Data (DataTypes::cplx_t value, const DataTypes::ShapeType &dataPointShape, const FunctionSpace &what, bool expanded) | |
Constructor which creates a Data with points having the specified shape. More... | |
Data (const Data &inData, const DataTypes::RegionType ®ion) | |
Constructor which performs a deep copy of a region from another Data object. More... | |
Data (const WrappedArray &w, const FunctionSpace &what, bool expanded) | |
Constructor which copies data from a wrapped array. More... | |
Data (const boost::python::object &value, const Data &other) | |
Constructor which creates a DataConstant. Copies data from any object that can be treated like a python array/sequence. All other parameters are copied from other. More... | |
Data (boost::python::object value, boost::python::object par1=boost::python::object(), boost::python::object par2=boost::python::object(), boost::python::object par3=boost::python::object()) | |
Data (DataAbstract *underlyingdata) | |
Create a Data using an existing DataAbstract. Warning: The new object assumes ownership of the pointer! Once you have passed the pointer, do not delete it. More... | |
Data (DataAbstract_ptr underlyingdata) | |
Create a Data based on the supplied DataAbstract. More... | |
~Data () | |
Destructor. More... | |
void | copy (const Data &other) |
Make this object a deep copy of "other". More... | |
Data | copySelf () const |
Return a pointer to a deep copy of this object. More... | |
Data | delay () |
produce a delayed evaluation version of this Data. More... | |
void | delaySelf () |
convert the current data into lazy data. More... | |
void | setProtection () |
switches on update protection More... | |
bool | isProtected () const |
Returns true, if the data object is protected against update. More... | |
const boost::python::object | getValueOfDataPointAsTuple (int dataPointNo) |
Return the value of a data point as a python tuple. More... | |
void | setValueOfDataPointToPyObject (int dataPointNo, const boost::python::object &py_object) |
sets the values of a data-point from a python object on this process More... | |
void | setValueOfDataPointToArray (int dataPointNo, const boost::python::object &) |
sets the values of a data-point from a array-like object on this process More... | |
void | setValueOfDataPoint (int dataPointNo, const DataTypes::real_t) |
sets the values of a data-point on this process More... | |
void | setValueOfDataPointC (int dataPointNo, const DataTypes::cplx_t) |
const boost::python::object | getValueOfGlobalDataPointAsTuple (int procNo, int dataPointNo) |
Return a data point across all processors as a python tuple. More... | |
void | setTupleForGlobalDataPoint (int id, int proc, boost::python::object) |
Set the value of a global data point. More... | |
int | getTagNumber (int dpno) |
Return the tag number associated with the given data-point. More... | |
std::string | toString () const |
Write the data as a string. For large amounts of data, a summary is printed. More... | |
void | expand () |
Whatever the current Data type make this into a DataExpanded. More... | |
void | tag () |
If possible convert this Data to DataTagged. This will only allow Constant data to be converted to tagged. An attempt to convert Expanded data to tagged will throw an exception. More... | |
void | resolve () |
If this data is lazy, then convert it to ready data. What type of ready data depends on the expression. For example, Constant+Tagged==Tagged. More... | |
bool | hasNaN () |
returns return true if data contains NaN. More... | |
void | replaceNaN (DataTypes::real_t value) |
replaces all NaN values with value More... | |
void | replaceNaN (DataTypes::cplx_t value) |
replaces all NaN values with value More... | |
void | replaceNaNPython (boost::python::object obj) |
replaces all NaN values with value More... | |
bool | hasInf () |
void | replaceInf (DataTypes::real_t value) |
void | replaceInf (DataTypes::cplx_t value) |
void | replaceInfPython (boost::python::object obj) |
void | requireWrite () |
Ensures data is ready for write access. This means that the data will be resolved if lazy and will be copied if shared with another Data object. More... | |
bool | isExpanded () const |
Return true if this Data is expanded. More... | |
bool | actsExpanded () const |
Return true if this Data is expanded or resolves to expanded. That is, if it has a separate value for each datapoint in the sample. More... | |
bool | isTagged () const |
Return true if this Data is tagged. More... | |
bool | isConstant () const |
Return true if this Data is constant. More... | |
bool | isLazy () const |
Return true if this Data is lazy. More... | |
bool | isReady () const |
Return true if this data is ready. More... | |
bool | isEmpty () const |
bool | isComplex () const |
True if components of this data are stored as complex. More... | |
const FunctionSpace & | getFunctionSpace () const |
Return the function space. More... | |
escript::Data | getXFromFunctionSpace () const |
Returns the spatial locations of the data points. More... | |
const_Domain_ptr | getDomain () const |
Return the domain. More... | |
Domain_ptr | getDomainPython () const |
Return the domain. TODO: For internal use only. This should be removed. More... | |
unsigned int | getDataPointRank () const |
Return the rank of the point data. More... | |
int | getNumDataPoints () const |
Return the number of data points. More... | |
int | getNumSamples () const |
Return the number of samples. More... | |
int | getNumDataPointsPerSample () const |
Return the number of data points per sample. More... | |
bool | numSamplesEqual (int numDataPointsPerSample, int numSamples) const |
Returns true if the number of data points per sample and the number of samples match the respective argument. DataEmpty always returns true. More... | |
bool | isDataPointShapeEqual (int rank, const int *dimensions) const |
Returns true if the shape matches the vector (dimensions[0],..., dimensions[rank-1]). DataEmpty always returns true. More... | |
int | getNoValues () const |
Return the number of values in the shape for this object. More... | |
void | dump (const std::string fileName) const |
dumps the object into a netCDF file More... | |
const boost::python::object | toListOfTuples (bool scalarastuple=true) |
returns the values of the object as a list of tuples (one for each datapoint). More... | |
const DataTypes::real_t * | getSampleDataRO (DataTypes::RealVectorType::size_type sampleNo, DataTypes::real_t dummy=0) const |
Return the sample data for the given sample no. Please do not use this unless you NEED to access samples individually. More... | |
const DataTypes::cplx_t * | getSampleDataRO (DataTypes::CplxVectorType::size_type sampleNo, DataTypes::cplx_t dummy) const |
DataTypes::real_t * | getSampleDataRW (DataTypes::RealVectorType::size_type sampleNo, DataTypes::real_t dummy=0) |
Return the sample data for the given sample no. Please do not use this unless you NEED to access samples individually. More... | |
DataTypes::cplx_t * | getSampleDataRW (DataTypes::RealVectorType::size_type sampleNo, DataTypes::cplx_t dummy) |
const DataTypes::real_t * | getDataRO (DataTypes::real_t dummy=0) const |
Return a pointer to the beginning of the underlying data. More... | |
const DataTypes::cplx_t * | getDataRO (DataTypes::cplx_t dummy) const |
DataTypes::real_t * | getSampleDataByTag (int tag, DataTypes::real_t dummy=0) |
Return the sample data for the given tag. If an attempt is made to access data that isn't tagged an exception will be thrown. More... | |
DataTypes::cplx_t * | getSampleDataByTag (int tag, DataTypes::cplx_t dummy) |
DataTypes::RealVectorType::const_reference | getDataPointRO (int sampleNo, int dataPointNo) |
Return a reference into the DataVector which points to the specified data point. More... | |
DataTypes::RealVectorType::reference | getDataPointRW (int sampleNo, int dataPointNo) |
Return a reference into the DataVector which points to the specified data point. More... | |
DataTypes::RealVectorType::size_type | getDataOffset (int sampleNo, int dataPointNo) |
Return the offset for the given sample and point within the sample. More... | |
const DataTypes::ShapeType & | getDataPointShape () const |
Return a reference to the data point shape. More... | |
const boost::python::tuple | getShapeTuple () const |
Return the data point shape as a tuple of integers. More... | |
long | getShapeProduct () const |
Returns the product of the data point shapes. More... | |
int | getDataPointSize () const |
Return the size of the data point. It is the product of the data point shape dimensions. More... | |
DataTypes::RealVectorType::size_type | getLength () const |
Return the number of doubles stored for this Data. More... | |
bool | hasNoSamples () const |
Return true if this object contains no samples. This is not the same as isEmpty() More... | |
void | setTaggedValueByName (std::string name, const boost::python::object &value) |
Assign the given value to the tag assocciated with name. Implicitly converts this object to type DataTagged. Throws an exception if this object cannot be converted to a DataTagged object or name cannot be mapped onto a tag key. More... | |
void | setTaggedValue (int tagKey, const boost::python::object &value) |
Assign the given value to the tag. Implicitly converts this object to type DataTagged if it is constant. More... | |
void | setTaggedValueFromCPP (int tagKey, const DataTypes::ShapeType &pointshape, const DataTypes::RealVectorType &value, int dataOffset=0) |
Assign the given value to the tag. Implicitly converts this object to type DataTagged if it is constant. More... | |
void | setTaggedValueFromCPP (int tagKey, const DataTypes::ShapeType &pointshape, const DataTypes::CplxVectorType &value, int dataOffset=0) |
void | copyWithMask (const Data &other, const Data &mask) |
Copy other Data object into this Data object where mask is positive. More... | |
void | setToZero () |
set all values to zero More... | |
Data | interpolate (const FunctionSpace &functionspace) const |
Interpolates this onto the given functionspace and returns the result as a Data object. More... | |
Data | interpolateFromTable3D (const WrappedArray &table, DataTypes::real_t Amin, DataTypes::real_t Astep, DataTypes::real_t undef, Data &B, DataTypes::real_t Bmin, DataTypes::real_t Bstep, Data &C, DataTypes::real_t Cmin, DataTypes::real_t Cstep, bool check_boundaries) |
Data | interpolateFromTable2D (const WrappedArray &table, DataTypes::real_t Amin, DataTypes::real_t Astep, DataTypes::real_t undef, Data &B, DataTypes::real_t Bmin, DataTypes::real_t Bstep, bool check_boundaries) |
Data | interpolateFromTable1D (const WrappedArray &table, DataTypes::real_t Amin, DataTypes::real_t Astep, DataTypes::real_t undef, bool check_boundaries) |
Data | interpolateFromTable3DP (boost::python::object table, DataTypes::real_t Amin, DataTypes::real_t Astep, Data &B, DataTypes::real_t Bmin, DataTypes::real_t Bstep, Data &C, DataTypes::real_t Cmin, DataTypes::real_t Cstep, DataTypes::real_t undef, bool check_boundaries) |
Data | interpolateFromTable2DP (boost::python::object table, DataTypes::real_t Amin, DataTypes::real_t Astep, Data &B, DataTypes::real_t Bmin, DataTypes::real_t Bstep, DataTypes::real_t undef, bool check_boundaries) |
Data | interpolateFromTable1DP (boost::python::object table, DataTypes::real_t Amin, DataTypes::real_t Astep, DataTypes::real_t undef, bool check_boundaries) |
Data | nonuniforminterp (boost::python::object in, boost::python::object out, bool check_boundaries) |
Data | nonuniformslope (boost::python::object in, boost::python::object out, bool check_boundaries) |
Data | gradOn (const FunctionSpace &functionspace) const |
Calculates the gradient of the data at the data points of functionspace. If functionspace is not present the function space of Function(getDomain()) is used. More... | |
Data | grad () const |
boost::python::object | integrateToTuple_const () const |
Calculate the integral over the function space domain as a python tuple. More... | |
boost::python::object | integrateToTuple () |
Calculate the integral over the function space domain as a python tuple. More... | |
Data | oneOver () const |
Returns 1./ Data object. More... | |
Data | wherePositive () const |
Return a Data with a 1 for +ive values and a 0 for 0 or -ive values. More... | |
Data | whereNegative () const |
Return a Data with a 1 for -ive values and a 0 for +ive or 0 values. More... | |
Data | whereNonNegative () const |
Return a Data with a 1 for +ive or 0 values and a 0 for -ive values. More... | |
Data | whereNonPositive () const |
Return a Data with a 1 for -ive or 0 values and a 0 for +ive values. More... | |
Data | whereZero (DataTypes::real_t tol=0.0) const |
Return a Data with a 1 for 0 values and a 0 for +ive or -ive values. More... | |
Data | whereNonZero (DataTypes::real_t tol=0.0) const |
Return a Data with a 0 for 0 values and a 1 for +ive or -ive values. More... | |
DataTypes::real_t | Lsup () |
Return the maximum absolute value of this Data object. More... | |
DataTypes::real_t | Lsup_const () const |
DataTypes::real_t | sup () |
Return the maximum value of this Data object. More... | |
DataTypes::real_t | sup_const () const |
DataTypes::real_t | inf () |
Return the minimum value of this Data object. More... | |
DataTypes::real_t | inf_const () const |
Data | abs () const |
Return the absolute value of each data point of this Data object. More... | |
Data | phase () const |
Return the phase/arg/angular-part of complex values. More... | |
Data | maxval () const |
Return the maximum value of each data point of this Data object. More... | |
Data | minval () const |
Return the minimum value of each data point of this Data object. More... | |
const boost::python::tuple | minGlobalDataPoint () const |
const boost::python::tuple | maxGlobalDataPoint () const |
Data | sign () const |
Return the sign of each data point of this Data object. -1 for negative values, zero for zero values, 1 for positive values. More... | |
Data | symmetric () const |
Return the symmetric part of a matrix which is half the matrix plus its transpose. More... | |
Data | antisymmetric () const |
Return the antisymmetric part of a matrix which is half the matrix minus its transpose. More... | |
Data | hermitian () const |
Return the hermitian part of a matrix which is half the matrix plus its adjoint. More... | |
Data | antihermitian () const |
Return the anti-hermitian part of a matrix which is half the matrix minus its hermitian. More... | |
Data | trace (int axis_offset) const |
Return the trace of a matrix. More... | |
Data | transpose (int axis_offset) const |
Transpose each data point of this Data object around the given axis. More... | |
Data | eigenvalues () const |
Return the eigenvalues of the symmetric part at each data point of this Data object in increasing values. Currently this function is restricted to rank 2, square shape, and dimension 3. More... | |
const boost::python::tuple | eigenvalues_and_eigenvectors (const DataTypes::real_t tol=1.e-12) const |
Return the eigenvalues and corresponding eigenvcetors of the symmetric part at each data point of this Data object. the eigenvalues are ordered in increasing size where eigenvalues with relative difference less than tol are treated as equal. The eigenvectors are orthogonal, normalized and the sclaed such that the first non-zero entry is positive. Currently this function is restricted to rank 2, square shape, and dimension 3. More... | |
Data | swapaxes (const int axis0, const int axis1) const |
swaps the components axis0 and axis1 More... | |
Data | erf () const |
Return the error function erf of each data point of this Data object. More... | |
Data | conjugate () const |
For complex values return the conjugate values. For non-complex data return a copy. More... | |
Data | real () const |
Data | imag () const |
Data | sin () const |
Return the sin of each data point of this Data object. More... | |
Data | cos () const |
Return the cos of each data point of this Data object. More... | |
Data | bessel (int order, DataTypes::real_t(*besselfunc)(int, DataTypes::real_t)) |
Bessel worker function. More... | |
Data | besselFirstKind (int order) |
Return the Bessel function of the first kind for each data point of this Data object. More... | |
Data | besselSecondKind (int order) |
Return the Bessel function of the second kind for each data point of this Data object. More... | |
Data | tan () const |
Return the tan of each data point of this Data object. More... | |
Data | asin () const |
Return the asin of each data point of this Data object. More... | |
Data | acos () const |
Return the acos of each data point of this Data object. More... | |
Data | atan () const |
Return the atan of each data point of this Data object. More... | |
Data | sinh () const |
Return the sinh of each data point of this Data object. More... | |
Data | cosh () const |
Return the cosh of each data point of this Data object. More... | |
Data | tanh () const |
Return the tanh of each data point of this Data object. More... | |
Data | asinh () const |
Return the asinh of each data point of this Data object. More... | |
Data | acosh () const |
Return the acosh of each data point of this Data object. More... | |
Data | atanh () const |
Return the atanh of each data point of this Data object. More... | |
Data | log10 () const |
Return the log to base 10 of each data point of this Data object. More... | |
Data | log () const |
Return the natural log of each data point of this Data object. More... | |
Data | exp () const |
Return the exponential function of each data point of this Data object. More... | |
Data | sqrt () const |
Return the square root of each data point of this Data object. More... | |
Data | neg () const |
Return the negation of each data point of this Data object. More... | |
Data | pos () const |
Return the identity of each data point of this Data object. Simply returns this object unmodified. More... | |
Data | powD (const Data &right) const |
Return the given power of each data point of this Data object. More... | |
Data | powO (const boost::python::object &right) const |
Return the given power of each data point of this boost python object. More... | |
Data | rpowO (const boost::python::object &left) const |
Return the given power of each data point of this boost python object. More... | |
Data & | operator+= (const Data &right) |
Overloaded operator +=. More... | |
Data & | operator+= (const boost::python::object &right) |
Data & | operator= (const Data &other) |
Data & | operator-= (const Data &right) |
Overloaded operator -=. More... | |
Data & | operator-= (const boost::python::object &right) |
Data & | operator*= (const Data &right) |
Overloaded operator *=. More... | |
Data & | operator*= (const boost::python::object &right) |
Data & | operator/= (const Data &right) |
Overloaded operator /=. More... | |
Data & | operator/= (const boost::python::object &right) |
Data | truedivD (const Data &right) |
Newer style division operator for python. More... | |
Data | truedivO (const boost::python::object &right) |
Newer style division operator for python. More... | |
Data | rtruedivO (const boost::python::object &left) |
Newer style division operator for python. More... | |
boost::python::object | __add__ (const boost::python::object &right) |
wrapper for python add operation More... | |
boost::python::object | __sub__ (const boost::python::object &right) |
wrapper for python subtract operation More... | |
boost::python::object | __rsub__ (const boost::python::object &right) |
wrapper for python reverse subtract operation More... | |
boost::python::object | __mul__ (const boost::python::object &right) |
wrapper for python multiply operation More... | |
boost::python::object | __div__ (const boost::python::object &right) |
wrapper for python divide operation More... | |
boost::python::object | __rdiv__ (const boost::python::object &right) |
wrapper for python reverse divide operation More... | |
Data | matrixInverse () const |
return inverse of matricies. More... | |
bool | probeInterpolation (const FunctionSpace &functionspace) const |
Returns true if this can be interpolated to functionspace. More... | |
Data | getItem (const boost::python::object &key) const |
Returns a slice from this Data object. More... | |
void | setItemD (const boost::python::object &key, const Data &value) |
Copies slice from value into this Data object. More... | |
void | setItemO (const boost::python::object &key, const boost::python::object &value) |
template<class UnaryFunction > | |
void | unaryOp2 (UnaryFunction operation) |
Perform the given unary operation on every element of every data point in this Data object. More... | |
Data | getSlice (const DataTypes::RegionType ®ion) const |
Return a Data object containing the specified slice of this Data object. More... | |
void | setSlice (const Data &value, const DataTypes::RegionType ®ion) |
Copy the specified slice from the given value into this Data object. More... | |
void | print (void) |
print the data values to stdout. Used for debugging More... | |
int | get_MPIRank (void) const |
return the MPI rank number of the local data MPI_COMM_WORLD is assumed and the result of MPI_Comm_size() is returned More... | |
int | get_MPISize (void) const |
return the MPI rank number of the local data MPI_COMM_WORLD is assumed and the result of MPI_Comm_rank() is returned More... | |
MPI_Comm | get_MPIComm (void) const |
return the MPI rank number of the local data MPI_COMM_WORLD is assumed and returned. More... | |
DataAbstract * | borrowData (void) const |
return the object produced by the factory, which is a DataConstant or DataExpanded TODO Ownership of this object should be explained in doco. More... | |
DataAbstract_ptr | borrowDataPtr (void) const |
DataReady_ptr | borrowReadyPtr (void) const |
DataTypes::RealVectorType::const_reference | getDataAtOffsetRO (DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy) |
Return a pointer to the beginning of the datapoint at the specified offset. TODO Eventually these should be inlined. More... | |
DataTypes::RealVectorType::reference | getDataAtOffsetRW (DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy) |
DataTypes::CplxVectorType::const_reference | getDataAtOffsetRO (DataTypes::CplxVectorType::size_type i, DataTypes::cplx_t dummy) |
DataTypes::CplxVectorType::reference | getDataAtOffsetRW (DataTypes::CplxVectorType::size_type i, DataTypes::cplx_t dummy) |
DataTypes::RealVectorType & | getExpandedVectorReference (DataTypes::real_t dummy=0) |
Ensures that the Data is expanded and returns its underlying vector Does not check for exclusive write so do that before calling if sharing Is a posibility. More... | |
DataTypes::CplxVectorType & | getExpandedVectorReference (DataTypes::cplx_t dummy) |
size_t | getNumberOfTaggedValues () const |
For tagged Data returns the number of tags with values. For non-tagged data will return 0 (even Data which has been expanded from tagged). More... | |
void | complicate () |
template<typename Scalar > | |
bp::object | integrateWorker () const |
template<class BinaryOp > | |
real_t | lazyAlgWorker (real_t init) |
Private Member Functions | |
void | init_from_data_and_fs (const Data &inData, const FunctionSpace &functionspace) |
template<typename S > | |
void | maskWorker (Data &other2, Data &mask2, S sentinel) |
template<class BinaryOp > | |
DataTypes::real_t | lazyAlgWorker (DataTypes::real_t init) |
DataTypes::real_t | LsupWorker () const |
DataTypes::real_t | supWorker () const |
DataTypes::real_t | infWorker () const |
template<typename Scalar > | |
boost::python::object | integrateWorker () const |
void | calc_minGlobalDataPoint (int &ProcNo, int &DataPointNo) const |
void | calc_maxGlobalDataPoint (int &ProcNo, int &DataPointNo) const |
Data | minval_nonlazy () const |
Data | maxval_nonlazy () const |
void | operandCheck (const Data &right) const |
Check *this and the right operand are compatible. Throws an exception if they aren't. More... | |
template<class BinaryFunction > | |
DataTypes::real_t | reduction (BinaryFunction operation, DataTypes::real_t initial_value) const |
Perform the specified reduction algorithm on every element of every data point in this Data object according to the given function and return the single value result. More... | |
template<class BinaryFunction > | |
Data | dp_algorithm (BinaryFunction operation, DataTypes::real_t initial_value) const |
Reduce each data-point in this Data object using the given operation. Return a Data object with the same number of data-points, but with each data-point containing only one value - the result of the reduction operation on the corresponding data-point in this Data object. More... | |
void | typeMatchLeft (Data &right) const |
Convert the data type of the RHS to match this. More... | |
void | typeMatchRight (const Data &right) |
Convert the data type of this to match the RHS. More... | |
void | initialise (const DataTypes::RealVectorType &value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded) |
Construct a Data object of the appropriate type. More... | |
void | initialise (const DataTypes::CplxVectorType &value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded) |
void | initialise (const WrappedArray &value, const FunctionSpace &what, bool expanded) |
void | initialise (const DataTypes::real_t value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded) |
void | initialise (const DataTypes::cplx_t value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded) |
const DataReady * | getReady () const |
DataReady * | getReady () |
DataReady_ptr | getReadyPtr () |
const_DataReady_ptr | getReadyPtr () const |
bool | isShared () const |
void | forceResolve () |
void | exclusiveWrite () |
if another object is sharing out member data make a copy to work with instead. This code should only be called from single threaded sections of code. More... | |
void | checkExclusiveWrite () |
checks if caller can have exclusive write to the object More... | |
void | set_m_data (DataAbstract_ptr p) |
Modify the data abstract hosted by this Data object For internal use only. Passing a pointer to null is permitted (do this in the destructor) More... | |
void | TensorSelfUpdateBinaryOperation (const Data &right, escript::ES_optype operation) |
Private Attributes | |
bool | m_protected |
bool | m_lazy |
DataAbstract_ptr | m_data |
Friends | |
class | DataAbstract |
class | TestDomain |
template<typename S > | |
Data | condEvalWorker (escript::Data &mask, escript::Data &trueval, escript::Data &falseval, S sentinel) |
Data | randomData (const boost::python::tuple &shape, const FunctionSpace &what, long seed, const boost::python::tuple &filter) |
Create a new Expanded Data object filled with pseudo-random data. More... | |
Data represents a collection of datapoints.
Description: Internally, the datapoints are actually stored by a DataAbstract object. The specific instance of DataAbstract used may vary over the lifetime of the Data object. Some methods on this class return references (eg getShape()). These references should not be used after an operation which changes the underlying DataAbstract object. Doing so will lead to invalid memory access. This should not affect any methods exposed via boost::python.
Data::Data | ( | ) |
Default constructor. Creates a DataEmpty object.
Constructors.
Referenced by __add__(), dp_algorithm(), and getSlice().
Data::Data | ( | const Data & | inData | ) |
Copy constructor. WARNING: Only performs a shallow copy.
Data::Data | ( | const Data & | inData, |
const FunctionSpace & | what | ||
) |
Constructor from another Data object. If "what" is different from the function space of inData the inData are tried to be interpolated to what, otherwise a shallow copy of inData is returned.
Data::Data | ( | const DataTypes::RealVectorType & | value, |
const DataTypes::ShapeType & | shape, | ||
const FunctionSpace & | what, | ||
bool | expanded | ||
) |
Copy Data from an existing vector.
Data::Data | ( | DataTypes::real_t | value, |
const DataTypes::ShapeType & | dataPointShape, | ||
const FunctionSpace & | what, | ||
bool | expanded | ||
) |
Constructor which creates a Data with points having the specified shape.
value | - Input - Single real value applied to all Data. |
dataPointShape | - Input - The shape of each data point. |
what | - Input - A description of what this data represents. |
expanded | - Input - Flag, if true fill the entire container with the given value. Otherwise a more efficient storage mechanism will be used. |
|
explicit |
Constructor which creates a Data with points having the specified shape.
value | - Input - Single complex value applied to all Data. |
dataPointShape | - Input - The shape of each data point. |
what | - Input - A description of what this data represents. |
expanded | - Input - Flag, if true fill the entire container with the given value. Otherwise a more efficient storage mechanism will be used. |
Data::Data | ( | const Data & | inData, |
const DataTypes::RegionType & | region | ||
) |
Data::Data | ( | const WrappedArray & | w, |
const FunctionSpace & | what, | ||
bool | expanded | ||
) |
Constructor which copies data from a wrapped array.
w | - Input - Input data. |
what | - Input - A description of what this data represents. |
expanded | - Input - Flag, if true fill the entire container with the value. Otherwise a more efficient storage mechanism will be used. |
References initialise().
Data::Data | ( | const boost::python::object & | value, |
const Data & | other | ||
) |
Constructor which creates a DataConstant. Copies data from any object that can be treated like a python array/sequence. All other parameters are copied from other.
value | - Input - Input data. |
other | - Input - contains all other parameters. |
Data::Data | ( | boost::python::object | value, |
boost::python::object | par1 = boost::python::object() , |
||
boost::python::object | par2 = boost::python::object() , |
||
boost::python::object | par3 = boost::python::object() |
||
) |
This constructor subsumes a number of previous python ones.
Data(const boost::python::object& value, const FunctionSpace& what=FunctionSpace(), bool expanded=false);
Data(DataTypes::real_t value, const boost::python::tuple& shape=boost::python::make_tuple(), const FunctionSpace& what=FunctionSpace(), bool expanded=false);
and a new
Data(cplx_t value, const boost::python::tuple& shape=boost::python::make_tuple(), const FunctionSpace& what=FunctionSpace(), bool expanded=false);
|
explicit |
Create a Data using an existing DataAbstract. Warning: The new object assumes ownership of the pointer! Once you have passed the pointer, do not delete it.
|
explicit |
Create a Data based on the supplied DataAbstract.
Data::~Data | ( | ) |
Destructor.
bp::object Data::__add__ | ( | const boost::python::object & | right | ) |
wrapper for python add operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
bp::object Data::__div__ | ( | const boost::python::object & | right | ) |
wrapper for python divide operation
Referenced by BOOST_PYTHON_MODULE().
bp::object Data::__mul__ | ( | const boost::python::object & | right | ) |
wrapper for python multiply operation
Referenced by BOOST_PYTHON_MODULE().
bp::object Data::__rdiv__ | ( | const boost::python::object & | right | ) |
wrapper for python reverse divide operation
Referenced by BOOST_PYTHON_MODULE().
bp::object Data::__rsub__ | ( | const boost::python::object & | right | ) |
wrapper for python reverse subtract operation
Referenced by BOOST_PYTHON_MODULE().
bp::object Data::__sub__ | ( | const boost::python::object & | right | ) |
wrapper for python subtract operation
Referenced by BOOST_PYTHON_MODULE().
Data Data::abs | ( | ) | const |
Return the absolute value of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::acos | ( | ) | const |
Return the acos of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::acosh | ( | ) | const |
Return the acosh of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
bool Data::actsExpanded | ( | ) | const |
Return true if this Data is expanded or resolves to expanded. That is, if it has a separate value for each datapoint in the sample.
Referenced by finley::Assemble_integrate(), speckley::DefaultAssembler2D::assembleComplexPDESingle(), speckley::DefaultAssembler3D::assembleComplexPDESingle(), speckley::DefaultAssembler2D::assembleComplexPDESystem(), speckley::DefaultAssembler3D::assembleComplexPDESystem(), ripley::Brick::assembleIntegrateImpl(), ripley::Rectangle::assembleIntegrateImpl(), speckley::Brick::assembleIntegrateWorker(), speckley::Rectangle::assembleIntegrateWorker(), finley::AssembleParameters::AssembleParameters(), dudley::AssembleParameters::AssembleParameters(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingle(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystem(), speckley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), weipa::DataVar::initFromEscript(), ripley::RipleyDomain::interpolateOnDomain(), and escript::saveDataCSV().
Data Data::antihermitian | ( | ) | const |
Return the anti-hermitian part of a matrix which is half the matrix minus its hermitian.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::antisymmetric | ( | ) | const |
Return the antisymmetric part of a matrix which is half the matrix minus its transpose.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::asin | ( | ) | const |
Return the asin of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::asinh | ( | ) | const |
Return the asinh of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::atan | ( | ) | const |
Return the atan of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::atanh | ( | ) | const |
Return the atanh of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::bessel | ( | int | order, |
DataTypes::real_t(*)(int, DataTypes::real_t) | besselfunc | ||
) |
Bessel worker function.
Data Data::besselFirstKind | ( | int | order | ) |
Return the Bessel function of the first kind for each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE().
Data Data::besselSecondKind | ( | int | order | ) |
Return the Bessel function of the second kind for each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE().
DataAbstract * Data::borrowData | ( | void | ) | const |
return the object produced by the factory, which is a DataConstant or DataExpanded TODO Ownership of this object should be explained in doco.
Referenced by escript::resolveGroup().
DataAbstract_ptr Data::borrowDataPtr | ( | void | ) | const |
Referenced by escript::DataLazy::DataLazy().
DataReady_ptr Data::borrowReadyPtr | ( | void | ) | const |
Referenced by escript::DataLazy::collapseToReady().
|
private |
|
private |
|
inlineprivate |
checks if caller can have exclusive write to the object
References isLazy(), and isShared().
Referenced by getDataAtOffsetRW().
void Data::complicate | ( | ) |
Referenced by speckley::DefaultAssembler2D::assembleComplexPDESingle(), speckley::DefaultAssembler3D::assembleComplexPDESingle(), speckley::DefaultAssembler2D::assembleComplexPDESystem(), speckley::DefaultAssembler3D::assembleComplexPDESystem(), BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), escript::ComplexData(), escript::ComplexTensor(), escript::ComplexTensor3(), escript::ComplexTensor4(), escript::condEval(), escript::MPIDataReducer::groupSend(), and escript::Scalar().
Data Data::conjugate | ( | ) | const |
For complex values return the conjugate values. For non-complex data return a copy.
Referenced by BOOST_PYTHON_MODULE().
void Data::copy | ( | const Data & | other | ) |
Make this object a deep copy of "other".
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and escript::MPIDataReducer::copyValueFrom().
Data Data::copySelf | ( | ) | const |
Return a pointer to a deep copy of this object.
References m_data.
Referenced by BOOST_PYTHON_MODULE().
Copy other Data object into this Data object where mask is positive.
Referenced by BOOST_PYTHON_MODULE(), and paso::TransportProblem::copyConstraint().
Data Data::cos | ( | ) | const |
Return the cos of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::cosh | ( | ) | const |
Return the cosh of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::delay | ( | ) |
produce a delayed evaluation version of this Data.
Referenced by BOOST_PYTHON_MODULE().
void Data::delaySelf | ( | ) |
convert the current data into lazy data.
|
inlineprivate |
Reduce each data-point in this Data object using the given operation. Return a Data object with the same number of data-points, but with each data-point containing only one value - the result of the reduction operation on the corresponding data-point in this Data object.
Perform the given data point reduction algorithm on data and return the result. Given operation combines each element within each data point into a scalar, thus argument object is a rank n Data object, and returned object is a rank 0 Data object. Calls escript::dp_algorithm.
References Data(), ESYS_ASSERT, escript::DataTagged::getDataByTagRW(), escript::DataTagged::getDefaultOffset(), getFunctionSpace(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataTagged::getOffsetForTag(), escript::DataExpanded::getPointOffset(), escript::DataAbstract::getShape(), escript::DataTagged::getTagLookup(), escript::DataExpanded::getTypedVectorRO(), escript::DataConstant::getTypedVectorRO(), escript::DataTagged::getTypedVectorRO(), escript::DataExpanded::getTypedVectorRW(), escript::DataConstant::getTypedVectorRW(), escript::DataTagged::getTypedVectorRW(), isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), m_data, escript::reductionOpVector(), and escript::DataTypes::scalarShape.
Referenced by minval_nonlazy().
void Data::dump | ( | const std::string | fileName | ) | const |
dumps the object into a netCDF file
Referenced by BOOST_PYTHON_MODULE().
Data Data::eigenvalues | ( | ) | const |
Return the eigenvalues of the symmetric part at each data point of this Data object in increasing values. Currently this function is restricted to rank 2, square shape, and dimension 3.
Referenced by BOOST_PYTHON_MODULE().
const bp::tuple Data::eigenvalues_and_eigenvectors | ( | const DataTypes::real_t | tol = 1.e-12 | ) | const |
Return the eigenvalues and corresponding eigenvcetors of the symmetric part at each data point of this Data object. the eigenvalues are ordered in increasing size where eigenvalues with relative difference less than tol are treated as equal. The eigenvectors are orthogonal, normalized and the sclaed such that the first non-zero entry is positive. Currently this function is restricted to rank 2, square shape, and dimension 3.
Referenced by BOOST_PYTHON_MODULE().
Data Data::erf | ( | ) | const |
Return the error function erf of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
|
inlineprivate |
if another object is sharing out member data make a copy to work with instead. This code should only be called from single threaded sections of code.
References forceResolve(), isShared(), m_data, and set_m_data().
Referenced by setTaggedValueByName().
Data Data::exp | ( | ) | const |
Return the exponential function of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
void Data::expand | ( | ) |
Whatever the current Data type make this into a DataExpanded.
References escript::DataAbstract::getPtr(), isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), m_data, resolve(), and set_m_data().
Referenced by dudley::DudleyDomain::addPDEToTransportProblem(), finley::FinleyDomain::addPDEToTransportProblem(), BOOST_PYTHON_MODULE(), paso::TransportProblem::copyConstraint(), dudley::DudleyDomain::interpolateOnDomain(), finley::FinleyDomain::interpolateOnDomain(), escript::MPIDataReducer::reduceLocalValue(), paso::TransportProblem::setToSolution(), and toListOfTuples().
|
inlineprivate |
References isLazy(), and resolve().
Referenced by exclusiveWrite(), getValueOfGlobalDataPointAsTuple(), and setTaggedValueByName().
MPI_Comm Data::get_MPIComm | ( | void | ) | const |
return the MPI rank number of the local data MPI_COMM_WORLD is assumed and returned.
Referenced by getValueOfGlobalDataPointAsTuple(), and matrixInverse().
int Data::get_MPIRank | ( | void | ) | const |
return the MPI rank number of the local data MPI_COMM_WORLD is assumed and the result of MPI_Comm_size() is returned
Referenced by getValueOfGlobalDataPointAsTuple().
int Data::get_MPISize | ( | void | ) | const |
return the MPI rank number of the local data MPI_COMM_WORLD is assumed and the result of MPI_Comm_rank() is returned
Referenced by toListOfTuples().
DataTypes::CplxVectorType::const_reference escript::Data::getDataAtOffsetRO | ( | DataTypes::CplxVectorType::size_type | i, |
DataTypes::cplx_t | dummy | ||
) |
DataTypes::RealVectorType::const_reference Data::getDataAtOffsetRO | ( | DataTypes::RealVectorType::size_type | i, |
DataTypes::real_t | dummy | ||
) |
Return a pointer to the beginning of the datapoint at the specified offset. TODO Eventually these should be inlined.
i | - position(offset) in the underlying datastructure |
Referenced by getValueOfGlobalDataPointAsTuple().
DataTypes::CplxVectorType::reference escript::Data::getDataAtOffsetRW | ( | DataTypes::CplxVectorType::size_type | i, |
DataTypes::cplx_t | dummy | ||
) |
DataTypes::RealVectorType::reference Data::getDataAtOffsetRW | ( | DataTypes::RealVectorType::size_type | i, |
DataTypes::real_t | dummy | ||
) |
References checkExclusiveWrite(), escript::DataReady::getDataAtOffsetRW(), and getReady().
|
inline |
Return the offset for the given sample and point within the sample.
References m_data.
Referenced by getValueOfGlobalDataPointAsTuple().
|
inline |
Return the rank of the point data.
References m_data.
Referenced by BOOST_PYTHON_MODULE(), getItem(), weipa::DataVar::initFromEscript(), escript::saveDataCSV(), and toListOfTuples().
DataTypes::RealVectorType::const_reference Data::getDataPointRO | ( | int | sampleNo, |
int | dataPointNo | ||
) |
Return a reference into the DataVector which points to the specified data point.
sampleNo | - Input - |
dataPointNo | - Input - |
DataTypes::RealVectorType::reference Data::getDataPointRW | ( | int | sampleNo, |
int | dataPointNo | ||
) |
Return a reference into the DataVector which points to the specified data point.
sampleNo | - Input - |
dataPointNo | - Input - |
|
inline |
Return a reference to the data point shape.
References m_data.
Referenced by paso::TransportProblem::copyConstraint(), escript::MPIDataReducer::getCompatibilityInfo(), getItem(), getValueOfGlobalDataPointAsTuple(), weipa::DataVar::initFromEscript(), escript::AbstractTransportProblem::insertConstraint(), isDataPointShapeEqual(), matrixInverse(), escript::MPIDataReducer::reduceRemoteValues(), setToZero(), and toListOfTuples().
int Data::getDataPointSize | ( | ) | const |
Return the size of the data point. It is the product of the data point shape dimensions.
Referenced by speckley::SpeckleyDomain::addPDEToTransportProblem(), speckley::DefaultAssembler2D::assembleComplexPDESystem(), speckley::DefaultAssembler3D::assembleComplexPDESystem(), ripley::Brick::assembleGradientImpl(), ripley::Rectangle::assembleGradientImpl(), ripley::Brick::assembleIntegrateImpl(), ripley::Rectangle::assembleIntegrateImpl(), finley::AssembleParameters::AssembleParameters(), dudley::AssembleParameters::AssembleParameters(), ripley::RipleyDomain::assemblePDE(), ripley::RipleyDomain::assemblePDEBoundary(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystemReduced(), ripley::RipleyDomain::assemblePDEDirac(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystemReduced(), ripley::RipleyDomain::averageData(), paso::TransportProblem::copyConstraint(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), ripley::RipleyDomain::dofToNodes(), finley::NodeFile::getGlobalIdRange(), speckley::RipleyCoupler::interpolate(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodesWorker(), ripley::MultiRectangle::interpolateElementsToElementsCoarserWorker(), ripley::MultiBrick::interpolateElementsToElementsCoarserWorker(), ripley::MultiRectangle::interpolateElementsToElementsFinerWorker(), ripley::MultiBrick::interpolateElementsToElementsFinerWorker(), speckley::Brick::interpolateFromCorners(), speckley::Rectangle::interpolateFromCorners(), speckley::Brick::interpolateNodesOnElementsWorker(), speckley::Rectangle::interpolateNodesOnElementsWorker(), ripley::Brick::interpolateNodesOnElementsWorker(), ripley::Rectangle::interpolateNodesOnElementsWorker(), ripley::Brick::interpolateNodesOnFacesWorker(), ripley::Rectangle::interpolateNodesOnFacesWorker(), ripley::MultiRectangle::interpolateNodesToElementsFinerWorker(), ripley::MultiBrick::interpolateNodesToElementsFinerWorker(), ripley::MultiRectangle::interpolateNodesToNodesFinerWorker(), ripley::MultiBrick::interpolateNodesToNodesFinerWorker(), ripley::RipleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFinerWorker(), ripley::MultiBrick::interpolateReducedToElementsFinerWorker(), ripley::MultiRectangle::interpolateReducedToReducedFinerWorker(), ripley::MultiBrick::interpolateReducedToReducedFinerWorker(), ripley::RipleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), paso::TransportProblem::setToSolution(), toListOfTuples(), speckley::RipleyCoupler::validInterpolation(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), and speckley::Rectangle::writeBinaryGridImpl().
|
inline |
References getNumSamples(), getReady(), escript::DataReady::getTypedVectorRO(), and isLazy().
|
inline |
Return a pointer to the beginning of the underlying data.
References getNumSamples(), getReady(), escript::DataReady::getTypedVectorRO(), and isLazy().
Referenced by escript::MPIDataReducer::groupSend(), weipa::DataVar::initFromEscript(), and escript::MPIDataReducer::sendTo().
|
inline |
Return the domain.
References escript::FunctionSpace::getDomain(), and getFunctionSpace().
Referenced by speckley::RipleyCoupler::interpolate(), ripley::MultiBrick::interpolateAcross(), ripley::MultiRectangle::interpolateAcross(), escript::MPIDataReducer::reduceLocalValue(), escript::saveDataCSV(), setTaggedValueByName(), speckley::RipleyCoupler::validInterpolation(), and escript::MPIDataReducer::valueCompatible().
|
inline |
Return the domain. TODO: For internal use only. This should be removed.
References escript::FunctionSpace::getDomainPython(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
DataTypes::CplxVectorType & Data::getExpandedVectorReference | ( | DataTypes::cplx_t | dummy | ) |
DataTypes::RealVectorType & Data::getExpandedVectorReference | ( | DataTypes::real_t | dummy = 0 | ) |
Ensures that the Data is expanded and returns its underlying vector Does not check for exclusive write so do that before calling if sharing Is a posibility.
Referenced by paso::TransportProblem::copyConstraint(), escript::MPIDataReducer::groupSend(), dudley::DudleyDomain::randomFill(), finley::FinleyDomain::randomFill(), ripley::Rectangle::randomFillWorker(), escript::MPIDataReducer::reduceRemoteValues(), and paso::TransportProblem::setToSolution().
|
inline |
Return the function space.
References m_data.
Referenced by __add__(), finley::Assemble_interpolate(), speckley::Brick::assembleGradient(), speckley::Rectangle::assembleGradient(), ripley::Brick::assembleGradientImpl(), ripley::Rectangle::assembleGradientImpl(), ripley::Brick::assembleIntegrateImpl(), ripley::Rectangle::assembleIntegrateImpl(), speckley::Brick::assembleIntegrateWorker(), speckley::Rectangle::assembleIntegrateWorker(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), BOOST_PYTHON_MODULE(), paso::TransportProblem::copyConstraint(), dp_algorithm(), escript::MPIDataReducer::getCompatibilityInfo(), escript::NullDomain::getDescription(), getDomain(), getDomainPython(), weipa::DataVar::initFromEscript(), ripley::MultiBrick::interpolateAcross(), ripley::MultiRectangle::interpolateAcross(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodesWorker(), ripley::RipleyDomain::interpolateOnDomain(), dudley::DudleyDomain::interpolateOnDomain(), finley::FinleyDomain::interpolateOnDomain(), escript::TestDomain::isValidFunctionSpaceType(), matrixInverse(), escript::operator*(), escript::operator+(), escript::operator-(), escript::operator/(), speckley::Brick::randomFill(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), escript::MPIDataReducer::reduceLocalValue(), escript::MPIDataReducer::reduceRemoteValues(), rtruedivO(), escript::saveDataCSV(), setItemO(), dudley::DudleyDomain::setNewX(), finley::FinleyDomain::setNewX(), setTaggedValueByName(), escript::FunctionSpace::setTags(), escript::FunctionSpace::setTagsByString(), speckley::SpeckleyDomain::setToGradient(), ripley::RipleyDomain::setToGradient(), dudley::DudleyDomain::setToGradient(), finley::FinleyDomain::setToGradient(), speckley::SpeckleyDomain::setToIntegrals(), dudley::DudleyDomain::setToIntegralsWorker(), finley::FinleyDomain::setToIntegralsWorker(), ripley::RipleyDomain::setToIntegralsWorker(), ripley::Brick::setToNormal(), ripley::Rectangle::setToNormal(), ripley::MultiBrick::setToNormal(), dudley::DudleyDomain::setToNormal(), finley::FinleyDomain::setToNormal(), ripley::Brick::setToSize(), speckley::Brick::setToSize(), ripley::Rectangle::setToSize(), speckley::Rectangle::setToSize(), ripley::MultiBrick::setToSize(), dudley::DudleyDomain::setToSize(), finley::FinleyDomain::setToSize(), paso::TransportProblem::setToSolution(), ripley::RipleyDomain::setToX(), dudley::DudleyDomain::setToX(), finley::FinleyDomain::setToX(), setToZero(), truedivO(), speckley::RipleyCoupler::validInterpolation(), ripley::WaveAssembler2D::WaveAssembler2D(), ripley::WaveAssembler3D::WaveAssembler3D(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), and speckley::Rectangle::writeBinaryGridImpl().
Data Data::getItem | ( | const boost::python::object & | key | ) | const |
Returns a slice from this Data object.
Data object slicing methods. /description Implements the [] get operator in python. Calls getSlice.
key | - Input - python slice tuple specifying slice to return. |
References getDataPointRank(), getDataPointShape(), getSlice(), and escript::DataTypes::getSliceRegion().
Referenced by BOOST_PYTHON_MODULE().
DataTypes::RealVectorType::size_type Data::getLength | ( | ) | const |
Return the number of doubles stored for this Data.
Referenced by escript::MPIDataReducer::groupSend(), and escript::MPIDataReducer::sendTo().
|
inline |
Return the number of values in the shape for this object.
References m_data.
Referenced by setToZero().
size_t Data::getNumberOfTaggedValues | ( | ) | const |
For tagged Data returns the number of tags with values. For non-tagged data will return 0 (even Data which has been expanded from tagged).
Referenced by ripley::Brick::assembleIntegrateImpl(), ripley::Rectangle::assembleIntegrateImpl(), speckley::Brick::assembleIntegrateWorker(), speckley::Rectangle::assembleIntegrateWorker(), and escript::MPIDataReducer::getCompatibilityInfo().
|
inline |
Return the number of data points.
References getNumDataPointsPerSample(), and getNumSamples().
Referenced by BOOST_PYTHON_MODULE(), ripley::RipleyDomain::dofToNodes(), and toListOfTuples().
|
inline |
Return the number of data points per sample.
References m_data.
Referenced by ripley::RipleyDomain::averageData(), speckley::SpeckleyDomain::copyData(), getNumDataPoints(), getValueOfGlobalDataPointAsTuple(), weipa::DataVar::initFromEscript(), ripley::RipleyDomain::multiplyData(), numSamplesEqual(), print(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), ripley::Brick::setToSize(), ripley::Rectangle::setToSize(), ripley::MultiBrick::setToSize(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), and speckley::Rectangle::writeBinaryGridImpl().
|
inline |
Return the number of samples.
References m_data.
Referenced by speckley::SpeckleyDomain::addPDEToTransportProblem(), ripley::RipleyDomain::averageData(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), getDataRO(), getNumDataPoints(), getValueOfGlobalDataPointAsTuple(), weipa::DataVar::initFromEscript(), ripley::RipleyDomain::multiplyData(), numSamplesEqual(), and print().
|
inlineprivate |
References ESYS_ASSERT, and m_data.
|
inlineprivate |
References ESYS_ASSERT, and m_data.
Referenced by getDataAtOffsetRW(), getDataRO(), getSampleDataRO(), getSampleDataRW(), and toListOfTuples().
|
inlineprivate |
References ESYS_ASSERT, and m_data.
|
inlineprivate |
References ESYS_ASSERT, and m_data.
|
inline |
|
inline |
const DataTypes::cplx_t* escript::Data::getSampleDataRO | ( | DataTypes::CplxVectorType::size_type | sampleNo, |
DataTypes::cplx_t | dummy | ||
) | const |
|
inline |
Return the sample data for the given sample no. Please do not use this unless you NEED to access samples individually.
sampleNo | - Input - the given sample no. |
References getReady(), escript::DataReady::getSampleDataRO(), m_data, and escript::DataLazy::resolveSample().
Referenced by finley::Assemble_integrate(), dudley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_2D(), dudley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_System_C(), speckley::DefaultAssembler2D::assembleComplexPDESingle(), speckley::DefaultAssembler3D::assembleComplexPDESingle(), speckley::DefaultAssembler2D::assembleComplexPDESystem(), speckley::DefaultAssembler3D::assembleComplexPDESystem(), ripley::Brick::assembleGradientImpl(), ripley::Rectangle::assembleGradientImpl(), ripley::Brick::assembleIntegrateImpl(), ripley::Rectangle::assembleIntegrateImpl(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingleReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingleReduced(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystemReduced(), ripley::RipleyDomain::assemblePDEDirac(), speckley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingleReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingleReduced(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystemReduced(), ripley::RipleyDomain::averageData(), speckley::RipleyCoupler::calculate(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), ripley::RipleyDomain::dofToNodes(), speckley::Rectangle::gradient_order10(), speckley::Brick::gradient_order4(), speckley::Brick::gradient_order5(), speckley::Rectangle::gradient_order5(), speckley::Brick::gradient_order6(), speckley::Rectangle::gradient_order6(), speckley::Brick::gradient_order7(), speckley::Rectangle::gradient_order7(), speckley::Brick::gradient_order8(), speckley::Rectangle::gradient_order8(), speckley::Brick::gradient_order9(), speckley::Rectangle::gradient_order9(), weipa::DataVar::initFromEscript(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodesWorker(), ripley::MultiRectangle::interpolateElementsToElementsCoarserWorker(), ripley::MultiBrick::interpolateElementsToElementsCoarserWorker(), ripley::MultiRectangle::interpolateElementsToElementsFinerWorker(), ripley::MultiBrick::interpolateElementsToElementsFinerWorker(), speckley::Brick::interpolateFromCorners(), speckley::Rectangle::interpolateFromCorners(), speckley::Brick::interpolateNodesOnElementsWorker(), speckley::Rectangle::interpolateNodesOnElementsWorker(), ripley::Brick::interpolateNodesOnElementsWorker(), ripley::Rectangle::interpolateNodesOnElementsWorker(), ripley::Brick::interpolateNodesOnFacesWorker(), ripley::Rectangle::interpolateNodesOnFacesWorker(), ripley::MultiRectangle::interpolateNodesToElementsFinerWorker(), ripley::MultiBrick::interpolateNodesToElementsFinerWorker(), ripley::MultiRectangle::interpolateNodesToNodesFinerWorker(), ripley::MultiBrick::interpolateNodesToNodesFinerWorker(), ripley::RipleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFinerWorker(), ripley::MultiBrick::interpolateReducedToElementsFinerWorker(), ripley::MultiRectangle::interpolateReducedToReducedFinerWorker(), ripley::MultiBrick::interpolateReducedToReducedFinerWorker(), ripley::RipleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), escript::saveDataCSV(), finley::NodeFile::setCoordinates(), speckley::SpeckleyDomain::setNewX(), dudley::ElementFile::setTags(), finley::ElementFile::setTags(), ripley::RipleyDomain::setTags(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), and speckley::Rectangle::writeBinaryGridImpl().
DataTypes::cplx_t* escript::Data::getSampleDataRW | ( | DataTypes::RealVectorType::size_type | sampleNo, |
DataTypes::cplx_t | dummy | ||
) |
|
inline |
Return the sample data for the given sample no. Please do not use this unless you NEED to access samples individually.
sampleNo | - Input - the given sample no. |
References getReady(), escript::DataReady::getSampleDataRW(), and isLazy().
Referenced by ripley::Brick::addToMatrixAndRHS(), ripley::Rectangle::addToMatrixAndRHS(), speckley::DefaultAssembler2D::assembleComplexPDESingle(), speckley::DefaultAssembler3D::assembleComplexPDESingle(), speckley::DefaultAssembler2D::assembleComplexPDESystem(), speckley::DefaultAssembler3D::assembleComplexPDESystem(), speckley::Brick::assembleCoordinates(), ripley::Brick::assembleCoordinates(), speckley::Rectangle::assembleCoordinates(), ripley::Rectangle::assembleCoordinates(), ripley::Brick::assembleGradientImpl(), ripley::Rectangle::assembleGradientImpl(), ripley::RipleyDomain::assemblePDEDirac(), speckley::DefaultAssembler2D::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), speckley::DefaultAssembler2D::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::RipleyDomain::averageData(), paso::TransportProblem::copyConstraint(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), ripley::RipleyDomain::dofToNodes(), speckley::Rectangle::gradient_order10(), speckley::Brick::gradient_order4(), speckley::Brick::gradient_order5(), speckley::Rectangle::gradient_order5(), speckley::Brick::gradient_order6(), speckley::Rectangle::gradient_order6(), speckley::Brick::gradient_order7(), speckley::Rectangle::gradient_order7(), speckley::Brick::gradient_order8(), speckley::Rectangle::gradient_order8(), speckley::Brick::gradient_order9(), speckley::Rectangle::gradient_order9(), speckley::RipleyCoupler::interpolate(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodesWorker(), ripley::MultiRectangle::interpolateElementsToElementsCoarserWorker(), ripley::MultiBrick::interpolateElementsToElementsCoarserWorker(), ripley::MultiRectangle::interpolateElementsToElementsFinerWorker(), ripley::MultiBrick::interpolateElementsToElementsFinerWorker(), speckley::Brick::interpolateFromCorners(), speckley::Rectangle::interpolateFromCorners(), speckley::Brick::interpolateNodesOnElementsWorker(), speckley::Rectangle::interpolateNodesOnElementsWorker(), ripley::Brick::interpolateNodesOnElementsWorker(), ripley::Rectangle::interpolateNodesOnElementsWorker(), ripley::Brick::interpolateNodesOnFacesWorker(), ripley::Rectangle::interpolateNodesOnFacesWorker(), ripley::MultiRectangle::interpolateNodesToElementsFinerWorker(), ripley::MultiBrick::interpolateNodesToElementsFinerWorker(), ripley::MultiRectangle::interpolateNodesToNodesFinerWorker(), ripley::MultiBrick::interpolateNodesToNodesFinerWorker(), ripley::RipleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFinerWorker(), ripley::MultiBrick::interpolateReducedToElementsFinerWorker(), ripley::MultiRectangle::interpolateReducedToReducedFinerWorker(), ripley::MultiBrick::interpolateReducedToReducedFinerWorker(), ripley::RipleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), print(), speckley::Brick::randomFill(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), speckley::SpeckleyDomain::setNewX(), ripley::Brick::setToNormal(), ripley::Rectangle::setToNormal(), ripley::MultiBrick::setToNormal(), ripley::Brick::setToSize(), speckley::Brick::setToSize(), ripley::Rectangle::setToSize(), speckley::Rectangle::setToSize(), ripley::MultiBrick::setToSize(), speckley::RipleyCoupler::shareBrickXFaces(), speckley::RipleyCoupler::shareBrickYFaces(), speckley::RipleyCoupler::shareBrickZFaces(), speckley::RipleyCoupler::shareRectangleXEdges(), and speckley::RipleyCoupler::shareRectangleYEdges().
long Data::getShapeProduct | ( | ) | const |
Returns the product of the data point shapes.
const bp::tuple Data::getShapeTuple | ( | ) | const |
Return the data point shape as a tuple of integers.
Referenced by BOOST_PYTHON_MODULE().
Data Data::getSlice | ( | const DataTypes::RegionType & | region | ) | const |
int Data::getTagNumber | ( | int | dpno | ) |
Return the tag number associated with the given data-point.
Referenced by BOOST_PYTHON_MODULE().
const bp::object Data::getValueOfDataPointAsTuple | ( | int | dataPointNo | ) |
Return the value of a data point as a python tuple.
Referenced by BOOST_PYTHON_MODULE().
const bp::object Data::getValueOfGlobalDataPointAsTuple | ( | int | procNo, |
int | dataPointNo | ||
) |
Return a data point across all processors as a python tuple.
References forceResolve(), get_MPIComm(), get_MPIRank(), getDataAtOffsetRO(), getDataOffset(), getDataPointShape(), getNumDataPointsPerSample(), getNumSamples(), isComplex(), MPI_DOUBLE, and escript::DataTypes::noValues().
Referenced by BOOST_PYTHON_MODULE().
|
inline |
Returns the spatial locations of the data points.
References m_data.
Referenced by BOOST_PYTHON_MODULE().
Data Data::grad | ( | ) | const |
Referenced by BOOST_PYTHON_MODULE().
Data Data::gradOn | ( | const FunctionSpace & | functionspace | ) | const |
Calculates the gradient of the data at the data points of functionspace. If functionspace is not present the function space of Function(getDomain()) is used.
Referenced by BOOST_PYTHON_MODULE().
bool Data::hasInf | ( | ) |
Referenced by BOOST_PYTHON_MODULE().
bool Data::hasNaN | ( | ) |
returns return true if data contains NaN.
Referenced by BOOST_PYTHON_MODULE().
|
inline |
Data Data::hermitian | ( | ) | const |
Return the hermitian part of a matrix which is half the matrix plus its adjoint.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::imag | ( | ) | const |
Referenced by BOOST_PYTHON_MODULE().
real_t Data::inf | ( | ) |
Return the minimum value of this Data object.
The method is not const because lazy data needs to be expanded before inf can be computed. The _const form can be used when the Data object is const, however this will only work for Data which is not Lazy.
For Data which contain no samples (or tagged Data for which no tags in use have a value) a large positive value is returned.
Referenced by BOOST_PYTHON_MODULE().
real_t Data::inf_const | ( | ) | const |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
bp::object Data::integrateToTuple | ( | ) |
Calculate the integral over the function space domain as a python tuple.
Referenced by BOOST_PYTHON_MODULE().
bp::object Data::integrateToTuple_const | ( | ) | const |
Calculate the integral over the function space domain as a python tuple.
|
private |
bp::object escript::Data::integrateWorker | ( | ) | const |
Data Data::interpolate | ( | const FunctionSpace & | functionspace | ) | const |
Interpolates this onto the given functionspace and returns the result as a Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::saveDataCSV().
Data Data::interpolateFromTable1D | ( | const WrappedArray & | table, |
DataTypes::real_t | Amin, | ||
DataTypes::real_t | Astep, | ||
DataTypes::real_t | undef, | ||
bool | check_boundaries | ||
) |
Data Data::interpolateFromTable1DP | ( | boost::python::object | table, |
DataTypes::real_t | Amin, | ||
DataTypes::real_t | Astep, | ||
DataTypes::real_t | undef, | ||
bool | check_boundaries | ||
) |
Referenced by BOOST_PYTHON_MODULE().
Data Data::interpolateFromTable2D | ( | const WrappedArray & | table, |
DataTypes::real_t | Amin, | ||
DataTypes::real_t | Astep, | ||
DataTypes::real_t | undef, | ||
Data & | B, | ||
DataTypes::real_t | Bmin, | ||
DataTypes::real_t | Bstep, | ||
bool | check_boundaries | ||
) |
Data Data::interpolateFromTable2DP | ( | boost::python::object | table, |
DataTypes::real_t | Amin, | ||
DataTypes::real_t | Astep, | ||
Data & | B, | ||
DataTypes::real_t | Bmin, | ||
DataTypes::real_t | Bstep, | ||
DataTypes::real_t | undef, | ||
bool | check_boundaries | ||
) |
Referenced by BOOST_PYTHON_MODULE().
Data Data::interpolateFromTable3D | ( | const WrappedArray & | table, |
DataTypes::real_t | Amin, | ||
DataTypes::real_t | Astep, | ||
DataTypes::real_t | undef, | ||
Data & | B, | ||
DataTypes::real_t | Bmin, | ||
DataTypes::real_t | Bstep, | ||
Data & | C, | ||
DataTypes::real_t | Cmin, | ||
DataTypes::real_t | Cstep, | ||
bool | check_boundaries | ||
) |
Data Data::interpolateFromTable3DP | ( | boost::python::object | table, |
DataTypes::real_t | Amin, | ||
DataTypes::real_t | Astep, | ||
Data & | B, | ||
DataTypes::real_t | Bmin, | ||
DataTypes::real_t | Bstep, | ||
Data & | C, | ||
DataTypes::real_t | Cmin, | ||
DataTypes::real_t | Cstep, | ||
DataTypes::real_t | undef, | ||
bool | check_boundaries | ||
) |
Referenced by BOOST_PYTHON_MODULE().
bool Data::isComplex | ( | ) | const |
True if components of this data are stored as complex.
Referenced by speckley::DefaultAssembler2D::assembleComplexPDESingle(), speckley::Brick::assembleGradient(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), speckley::Rectangle::assembleGradient(), speckley::DefaultAssembler2D::assemblePDEBoundarySingle(), speckley::DefaultAssembler2D::assemblePDEBoundarySingleReduced(), speckley::DefaultAssembler2D::assemblePDEBoundarySystem(), speckley::DefaultAssembler2D::assemblePDEBoundarySystemReduced(), speckley::DefaultAssembler2D::assemblePDESingle(), speckley::DefaultAssembler2D::assemblePDESingleReduced(), speckley::DefaultAssembler2D::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystemReduced(), BOOST_PYTHON_MODULE(), escript::condEval(), paso::TransportProblem::copyConstraint(), escript::MPIDataReducer::getCompatibilityInfo(), dudley::NodeFile::getGlobalIdRange(), getValueOfGlobalDataPointAsTuple(), escript::MPIDataReducer::groupSend(), speckley::Rectangle::interpolateElementsOnNodes(), ripley::MultiRectangle::interpolateElementsToElementsCoarser(), ripley::MultiBrick::interpolateElementsToElementsCoarser(), ripley::MultiRectangle::interpolateElementsToElementsFiner(), ripley::MultiBrick::interpolateElementsToElementsFiner(), speckley::Brick::interpolateNodesOnElements(), speckley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::MultiRectangle::interpolateNodesToElementsFiner(), ripley::MultiBrick::interpolateNodesToElementsFiner(), ripley::MultiRectangle::interpolateNodesToNodesFiner(), ripley::MultiBrick::interpolateNodesToNodesFiner(), ripley::RipleyDomain::interpolateOnDomain(), dudley::DudleyDomain::interpolateOnDomain(), finley::FinleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFiner(), ripley::MultiBrick::interpolateReducedToElementsFiner(), ripley::MultiRectangle::interpolateReducedToReducedFiner(), ripley::MultiBrick::interpolateReducedToReducedFiner(), print(), speckley::Brick::reduceElements(), speckley::Rectangle::reduceElements(), escript::MPIDataReducer::sendTo(), dudley::DudleyDomain::setToGradient(), finley::FinleyDomain::setToGradient(), paso::TransportProblem::setToSolution(), setToZero(), and toListOfTuples().
bool Data::isConstant | ( | ) | const |
Return true if this Data is constant.
Referenced by BOOST_PYTHON_MODULE(), dp_algorithm(), expand(), escript::MPIDataReducer::getCompatibilityInfo(), weipa::DataVar::initFromEscript(), and reduction().
|
inline |
Returns true if the shape matches the vector (dimensions[0],..., dimensions[rank-1]). DataEmpty always returns true.
References getDataPointShape(), and isEmpty().
Referenced by speckley::Brick::assembleCoordinates(), ripley::Brick::assembleCoordinates(), ripley::Rectangle::assembleCoordinates(), and speckley::Rectangle::assembleCoordinates().
bool Data::isEmpty | ( | ) | const |
\brief Return true if this Data holds an instance of DataEmpty. This is _not_ the same as asking if the object
contains datapoints.
Referenced by dudley::DudleyDomain::addPDEToRHS(), dudley::DudleyDomain::addPDEToSystem(), dudley::DudleyDomain::addPDEToTransportProblem(), ripley::RipleyDomain::addToRHS(), dudley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_2D(), dudley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_3D(), speckley::DefaultAssembler2D::assembleComplexPDESingle(), speckley::DefaultAssembler3D::assembleComplexPDESingle(), speckley::DefaultAssembler2D::assembleComplexPDESystem(), speckley::DefaultAssembler3D::assembleComplexPDESystem(), finley::AssembleParameters::AssembleParameters(), dudley::AssembleParameters::AssembleParameters(), ripley::RipleyDomain::assemblePDE(), ripley::RipleyDomain::assemblePDEBoundary(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingle(), speckley::DefaultAssembler3D::assemblePDEBoundarySingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingleReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingleReduced(), speckley::DefaultAssembler3D::assemblePDEBoundarySingleReduced(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystem(), speckley::DefaultAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystemReduced(), speckley::DefaultAssembler3D::assemblePDEBoundarySystemReduced(), ripley::RipleyDomain::assemblePDEDirac(), speckley::SpeckleyDomain::assemblePDEDiracWrap(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingleReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingleReduced(), speckley::DefaultAssembler3D::assemblePDESingleReduced(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystemReduced(), speckley::DefaultAssembler3D::assemblePDESystemReduced(), BOOST_PYTHON_MODULE(), escript::MPIDataReducer::copyValueFrom(), dp_algorithm(), expand(), isDataPointShapeEqual(), numSamplesEqual(), escript::MPIDataReducer::reduceLocalValue(), reduction(), and setToZero().
bool Data::isExpanded | ( | ) | const |
Return true if this Data is expanded.
Referenced by BOOST_PYTHON_MODULE(), dp_algorithm(), expand(), escript::MPIDataReducer::getCompatibilityInfo(), reduction(), and ripley::RipleyDomain::setToX().
bool Data::isLazy | ( | ) | const |
Return true if this Data is lazy.
Referenced by BOOST_PYTHON_MODULE(), checkExclusiveWrite(), dp_algorithm(), expand(), forceResolve(), getDataRO(), getSampleDataRW(), escript::MPIDataReducer::groupSend(), matrixInverse(), reduction(), escript::resolveGroup(), escript::MPIDataReducer::sendTo(), and setToZero().
bool Data::isProtected | ( | ) | const |
Returns true, if the data object is protected against update.
Referenced by BOOST_PYTHON_MODULE().
bool Data::isReady | ( | ) | const |
Return true if this data is ready.
Referenced by BOOST_PYTHON_MODULE().
|
inlineprivate |
References m_data.
Referenced by checkExclusiveWrite(), exclusiveWrite(), and setToZero().
bool Data::isTagged | ( | ) | const |
Return true if this Data is tagged.
Referenced by BOOST_PYTHON_MODULE(), dp_algorithm(), expand(), escript::MPIDataReducer::getCompatibilityInfo(), and reduction().
|
private |
Data Data::log | ( | ) | const |
Return the natural log of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::log10 | ( | ) | const |
Return the log to base 10 of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
real_t Data::Lsup | ( | ) |
Return the maximum absolute value of this Data object.
The method is not const because lazy data needs to be expanded before Lsup can be computed. The _const form can be used when the Data object is const, however this will only work for Data which is not Lazy.
For Data which contain no samples (or tagged Data for which no tags in use have a value) zero is returned.
Referenced by BOOST_PYTHON_MODULE().
real_t Data::Lsup_const | ( | ) | const |
|
private |
Data Data::matrixInverse | ( | ) | const |
return inverse of matricies.
References get_MPIComm(), getDataPointShape(), getFunctionSpace(), isLazy(), m_data, matrixInverse(), escript::matrixInverseError(), MPI_INT, MPI_MAX, resolve(), and THROWONCOMPLEX.
Referenced by BOOST_PYTHON_MODULE(), and matrixInverse().
const bp::tuple Data::maxGlobalDataPoint | ( | ) | const |
\brief Return the (sample number, data-point number) of the data point with the minimum component value in this Data object. \note If you are working in python, please consider using Locator
instead of manually manipulating process and point IDs.
Referenced by BOOST_PYTHON_MODULE().
Data Data::maxval | ( | ) | const |
Return the maximum value of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE().
|
inlineprivate |
const bp::tuple Data::minGlobalDataPoint | ( | ) | const |
\brief Return the (sample number, data-point number) of the data point with the minimum component value in this Data object. \note If you are working in python, please consider using Locator
instead of manually manipulating process and point IDs.
Referenced by BOOST_PYTHON_MODULE().
Data Data::minval | ( | ) | const |
Return the minimum value of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
|
inlineprivate |
References dp_algorithm(), and THROWONCOMPLEX.
Data Data::neg | ( | ) | const |
Return the negation of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::nonuniforminterp | ( | boost::python::object | in, |
boost::python::object | out, | ||
bool | check_boundaries | ||
) |
Referenced by BOOST_PYTHON_MODULE().
Data Data::nonuniformslope | ( | boost::python::object | in, |
boost::python::object | out, | ||
bool | check_boundaries | ||
) |
Referenced by BOOST_PYTHON_MODULE().
|
inline |
Returns true if the number of data points per sample and the number of samples match the respective argument. DataEmpty always returns true.
References getNumDataPointsPerSample(), getNumSamples(), and isEmpty().
Referenced by speckley::Brick::assembleCoordinates(), ripley::Brick::assembleCoordinates(), ripley::Rectangle::assembleCoordinates(), speckley::Rectangle::assembleCoordinates(), finley::AssembleParameters::AssembleParameters(), and dudley::AssembleParameters::AssembleParameters().
Data Data::oneOver | ( | ) | const |
Returns 1./ Data object.
Referenced by escript::DataLazy::collapseToReady().
|
inlineprivate |
Check *this and the right operand are compatible. Throws an exception if they aren't.
right | - Input - The right hand side. |
References m_data.
Data & Data::operator*= | ( | const boost::python::object & | right | ) |
Overloaded operator *=.
right | - Input - The right hand side. |
Data & Data::operator+= | ( | const boost::python::object & | right | ) |
Overloaded operator +=.
right | - Input - The right hand side. |
Data & Data::operator-= | ( | const boost::python::object & | right | ) |
Overloaded operator -=.
right | - Input - The right hand side. |
Data & Data::operator/= | ( | const boost::python::object & | right | ) |
Overloaded operator /=.
right | - Input - The right hand side. |
Data Data::phase | ( | ) | const |
Return the phase/arg/angular-part of complex values.
Referenced by BOOST_PYTHON_MODULE().
Data Data::pos | ( | ) | const |
Return the identity of each data point of this Data object. Simply returns this object unmodified.
Referenced by BOOST_PYTHON_MODULE().
Return the given power of each data point of this Data object.
right | Input - the power to raise the object to. |
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::powO | ( | const boost::python::object & | right | ) | const |
Return the given power of each data point of this boost python object.
right | Input - the power to raise the object to. |
Referenced by BOOST_PYTHON_MODULE().
void Data::print | ( | void | ) |
print the data values to stdout. Used for debugging
References getNumDataPointsPerSample(), getNumSamples(), getSampleDataRW(), and isComplex().
bool Data::probeInterpolation | ( | const FunctionSpace & | functionspace | ) | const |
Returns true if this can be interpolated to functionspace.
Data Data::real | ( | ) | const |
Referenced by BOOST_PYTHON_MODULE().
|
inlineprivate |
Perform the specified reduction algorithm on every element of every data point in this Data object according to the given function and return the single value result.
Perform the given Data object reduction algorithm on this and return the result. Given operation combines each element of each data point, thus argument object (*this) is a rank n Data object, and returned object is a scalar. Calls escript::algorithm.
References ESYS_ASSERT, escript::DataTagged::getDefaultOffset(), escript::DataAbstract::getFunctionSpace(), escript::FunctionSpace::getListOfTagsSTL(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataExpanded::getPointOffset(), escript::DataAbstract::getShape(), escript::DataTagged::getTagLookup(), escript::DataExpanded::getTypedVectorRO(), escript::DataConstant::getTypedVectorRO(), escript::DataTagged::getTypedVectorRO(), isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), m_data, escript::reductionOpVector(), and tag().
void Data::replaceInf | ( | DataTypes::cplx_t | value | ) |
void Data::replaceInf | ( | DataTypes::real_t | value | ) |
void Data::replaceInfPython | ( | boost::python::object | obj | ) |
Referenced by BOOST_PYTHON_MODULE().
void Data::replaceNaN | ( | DataTypes::cplx_t | value | ) |
replaces all NaN values with value
void Data::replaceNaN | ( | DataTypes::real_t | value | ) |
replaces all NaN values with value
void Data::replaceNaNPython | ( | boost::python::object | obj | ) |
replaces all NaN values with value
Referenced by BOOST_PYTHON_MODULE().
void Data::requireWrite | ( | ) |
Ensures data is ready for write access. This means that the data will be resolved if lazy and will be copied if shared with another Data object.
Referenced by speckley::SpeckleyDomain::addPDEToTransportProblem(), speckley::DefaultAssembler2D::assembleComplexPDESingle(), speckley::DefaultAssembler3D::assembleComplexPDESingle(), speckley::DefaultAssembler2D::assembleComplexPDESystem(), speckley::DefaultAssembler3D::assembleComplexPDESystem(), speckley::Brick::assembleCoordinates(), ripley::Brick::assembleCoordinates(), speckley::Rectangle::assembleCoordinates(), ripley::Rectangle::assembleCoordinates(), ripley::Brick::assembleGradientImpl(), ripley::Rectangle::assembleGradientImpl(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingleReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingleReduced(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystemReduced(), ripley::RipleyDomain::assemblePDEDirac(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingleReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingleReduced(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystemReduced(), ripley::RipleyDomain::averageData(), paso::TransportProblem::copyConstraint(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), ripley::RipleyDomain::dofToNodes(), speckley::RipleyCoupler::interpolate(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodesWorker(), ripley::MultiRectangle::interpolateElementsToElementsCoarserWorker(), ripley::MultiBrick::interpolateElementsToElementsCoarserWorker(), ripley::MultiRectangle::interpolateElementsToElementsFinerWorker(), ripley::MultiBrick::interpolateElementsToElementsFinerWorker(), speckley::Brick::interpolateNodesOnElementsWorker(), speckley::Rectangle::interpolateNodesOnElementsWorker(), ripley::Brick::interpolateNodesOnElementsWorker(), ripley::Rectangle::interpolateNodesOnElementsWorker(), ripley::Brick::interpolateNodesOnFacesWorker(), ripley::Rectangle::interpolateNodesOnFacesWorker(), ripley::MultiRectangle::interpolateNodesToElementsFinerWorker(), ripley::MultiBrick::interpolateNodesToElementsFinerWorker(), ripley::MultiRectangle::interpolateNodesToNodesFinerWorker(), ripley::MultiBrick::interpolateNodesToNodesFinerWorker(), ripley::RipleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFinerWorker(), ripley::MultiBrick::interpolateReducedToElementsFinerWorker(), ripley::MultiRectangle::interpolateReducedToReducedFinerWorker(), ripley::MultiBrick::interpolateReducedToReducedFinerWorker(), ripley::RipleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), ripley::Brick::setToNormal(), ripley::Rectangle::setToNormal(), ripley::MultiBrick::setToNormal(), ripley::Brick::setToSize(), ripley::Rectangle::setToSize(), speckley::Brick::setToSize(), speckley::Rectangle::setToSize(), ripley::MultiBrick::setToSize(), and paso::TransportProblem::setToSolution().
void Data::resolve | ( | ) |
If this data is lazy, then convert it to ready data. What type of ready data depends on the expression. For example, Constant+Tagged==Tagged.
Referenced by BOOST_PYTHON_MODULE(), expand(), forceResolve(), escript::MPIDataReducer::groupSend(), matrixInverse(), and escript::MPIDataReducer::sendTo().
Data Data::rpowO | ( | const boost::python::object & | left | ) | const |
Return the given power of each data point of this boost python object.
left | Input - the bases |
Referenced by BOOST_PYTHON_MODULE().
|
inline |
Newer style division operator for python.
Operator/ Takes LHS python::object.
References getFunctionSpace(), and truedivD().
Referenced by BOOST_PYTHON_MODULE().
|
private |
Modify the data abstract hosted by this Data object For internal use only. Passing a pointer to null is permitted (do this in the destructor)
References m_data.
Referenced by exclusiveWrite(), expand(), and setToZero().
void Data::setItemD | ( | const boost::python::object & | key, |
const Data & | value | ||
) |
Copies slice from value into this Data object.
Implements the [] set operator in python. Calls setSlice.
key | - Input - python slice tuple specifying slice to copy from value. |
value | - Input - Data object to copy from. |
Referenced by BOOST_PYTHON_MODULE().
void Data::setItemO | ( | const boost::python::object & | key, |
const boost::python::object & | value | ||
) |
References getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
void Data::setProtection | ( | ) |
switches on update protection
Member access methods.
Referenced by BOOST_PYTHON_MODULE(), escript::FunctionSpace::getNormal(), escript::FunctionSpace::getSize(), and escript::FunctionSpace::getX().
void Data::setSlice | ( | const Data & | value, |
const DataTypes::RegionType & | region | ||
) |
void Data::setTaggedValue | ( | int | tagKey, |
const boost::python::object & | value | ||
) |
Assign the given value to the tag. Implicitly converts this object to type DataTagged if it is constant.
tagKey | - Input - Integer key. |
value | - Input - Value to associate with given key. ==>* |
Referenced by BOOST_PYTHON_MODULE(), and setTaggedValueByName().
void Data::setTaggedValueByName | ( | std::string | name, |
const boost::python::object & | value | ||
) |
Assign the given value to the tag assocciated with name. Implicitly converts this object to type DataTagged. Throws an exception if this object cannot be converted to a DataTagged object or name cannot be mapped onto a tag key.
name | - Input - name of tag. |
value | - Input - Value to associate with given key. |
References exclusiveWrite(), forceResolve(), escript::FunctionSpace::getDomain(), getDomain(), getFunctionSpace(), and setTaggedValue().
Referenced by BOOST_PYTHON_MODULE().
void Data::setTaggedValueFromCPP | ( | int | tagKey, |
const DataTypes::ShapeType & | pointshape, | ||
const DataTypes::CplxVectorType & | value, | ||
int | dataOffset = 0 |
||
) |
void Data::setTaggedValueFromCPP | ( | int | tagKey, |
const DataTypes::ShapeType & | pointshape, | ||
const DataTypes::RealVectorType & | value, | ||
int | dataOffset = 0 |
||
) |
Assign the given value to the tag. Implicitly converts this object to type DataTagged if it is constant.
tagKey | - Input - Integer key. |
pointshape | - Input - The shape of the value parameter |
value | - Input - Value to associate with given key. |
dataOffset | - Input - Offset of the begining of the point within the value parameter |
Referenced by escript::MPIDataReducer::groupSend(), and escript::MPIDataReducer::recvFrom().
void Data::setToZero | ( | ) |
set all values to zero
Data object operation methods and operators.
References getDataPointShape(), getFunctionSpace(), getNoValues(), escript::DataAbstract::getPtr(), isComplex(), isEmpty(), isLazy(), isShared(), m_data, and set_m_data().
Referenced by BOOST_PYTHON_MODULE().
void Data::setTupleForGlobalDataPoint | ( | int | id, |
int | proc, | ||
boost::python::object | |||
) |
Set the value of a global data point.
Referenced by BOOST_PYTHON_MODULE().
void Data::setValueOfDataPoint | ( | int | dataPointNo, |
const DataTypes::real_t | value | ||
) |
sets the values of a data-point on this process
Referenced by BOOST_PYTHON_MODULE().
void Data::setValueOfDataPointC | ( | int | dataPointNo, |
const DataTypes::cplx_t | value | ||
) |
void Data::setValueOfDataPointToArray | ( | int | dataPointNo, |
const boost::python::object & | |||
) |
sets the values of a data-point from a array-like object on this process
Referenced by BOOST_PYTHON_MODULE().
void Data::setValueOfDataPointToPyObject | ( | int | dataPointNo, |
const boost::python::object & | py_object | ||
) |
sets the values of a data-point from a python object on this process
Referenced by BOOST_PYTHON_MODULE().
Data Data::sign | ( | ) | const |
Return the sign of each data point of this Data object. -1 for negative values, zero for zero values, 1 for positive values.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::sin | ( | ) | const |
Return the sin of each data point of this Data object.
References MAKELAZYOP, and escript::SIN.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::sinh | ( | ) | const |
Return the sinh of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::sqrt | ( | ) | const |
Return the square root of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
real_t Data::sup | ( | ) |
Return the maximum value of this Data object.
The method is not const because lazy data needs to be expanded before sup can be computed. The _const form can be used when the Data object is const, however this will only work for Data which is not Lazy.
For Data which contain no samples (or tagged Data for which no tags in use have a value) a large negative value is returned.
Referenced by BOOST_PYTHON_MODULE().
real_t Data::sup_const | ( | ) | const |
|
private |
Data Data::swapaxes | ( | const int | axis0, |
const int | axis1 | ||
) | const |
swaps the components axis0 and axis1
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::symmetric | ( | ) | const |
Return the symmetric part of a matrix which is half the matrix plus its transpose.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
void Data::tag | ( | ) |
If possible convert this Data to DataTagged. This will only allow Constant data to be converted to tagged. An attempt to convert Expanded data to tagged will throw an exception.
Referenced by BOOST_PYTHON_MODULE(), getSampleDataByTag(), escript::MPIDataReducer::groupSend(), escript::MPIDataReducer::recvFrom(), and reduction().
Data Data::tan | ( | ) | const |
Return the tan of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::tanh | ( | ) | const |
Return the tanh of each data point of this Data object.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
|
private |
const bp::object Data::toListOfTuples | ( | bool | scalarastuple = true | ) |
returns the values of the object as a list of tuples (one for each datapoint).
scalarastuple | If true, scalar data will produce single valued tuples [(1,) (2,) ...] If false, the result is a list of scalars [1, 2, ...] |
References expand(), get_MPISize(), getDataPointRank(), getDataPointShape(), getDataPointSize(), getNumDataPoints(), getReady(), escript::DataReady::getTypedVectorRO(), escript::DataReady::getVectorRO(), and isComplex().
Referenced by BOOST_PYTHON_MODULE().
std::string Data::toString | ( | ) | const |
Write the data as a string. For large amounts of data, a summary is printed.
Referenced by BOOST_PYTHON_MODULE().
Data Data::trace | ( | int | axis_offset | ) | const |
Return the trace of a matrix.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::transpose | ( | int | axis_offset | ) | const |
Transpose each data point of this Data object around the given axis.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Newer style division operator for python.
Operator/ Takes RHS Data object.
Referenced by BOOST_PYTHON_MODULE(), rtruedivO(), and truedivO().
|
inline |
Newer style division operator for python.
Operator/ Takes RHS python::object.
References getFunctionSpace(), and truedivD().
Referenced by BOOST_PYTHON_MODULE().
|
private |
Convert the data type of the RHS to match this.
right | - Input - data type to match. |
|
private |
Convert the data type of this to match the RHS.
right | - Input - data type to match. |
|
inline |
Perform the given unary operation on every element of every data point in this Data object.
Data Data::whereNegative | ( | ) | const |
Return a Data with a 1 for -ive values and a 0 for +ive or 0 values.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::whereNonNegative | ( | ) | const |
Return a Data with a 1 for +ive or 0 values and a 0 for -ive values.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::whereNonPositive | ( | ) | const |
Return a Data with a 1 for -ive or 0 values and a 0 for +ive values.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::whereNonZero | ( | DataTypes::real_t | tol = 0.0 | ) | const |
Return a Data with a 0 for 0 values and a 1 for +ive or -ive values.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::wherePositive | ( | ) | const |
Return a Data with a 1 for +ive values and a 0 for 0 or -ive values.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
Data Data::whereZero | ( | DataTypes::real_t | tol = 0.0 | ) | const |
Return a Data with a 1 for 0 values and a 0 for +ive or -ive values.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
|
friend |
|
friend |
|
friend |
Create a new Expanded Data object filled with pseudo-random data.
|
friend |
|
private |
Referenced by copySelf(), dp_algorithm(), exclusiveWrite(), expand(), getDataOffset(), getDataPointRank(), getDataPointShape(), getFunctionSpace(), getNoValues(), getNumDataPointsPerSample(), getNumSamples(), getReady(), getReadyPtr(), getSampleDataByTag(), getSampleDataRO(), getXFromFunctionSpace(), hasNoSamples(), isShared(), matrixInverse(), operandCheck(), reduction(), set_m_data(), and setToZero().
|
private |
|
private |