escript
Revision_Unversioneddirectory
|
Data represents a collection of datapoints. More...
#include <Data.h>
Public Types | |
typedef double(* | UnaryDFunPtr) (double) |
typedef double(* | BinaryDFunPtr) (double, double) |
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::ValueType &value, const DataTypes::ShapeType &shape, const FunctionSpace &what=FunctionSpace(), bool expanded=false) | |
Copy Data from an existing vector. More... | |
Data (double value, const DataTypes::ShapeType &dataPointShape=DataTypes::ShapeType(), const FunctionSpace &what=FunctionSpace(), bool expanded=false) | |
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 boost::python::object &value, const FunctionSpace &what=FunctionSpace(), bool expanded=false) | |
Constructor which copies data from any object that can be treated like a python array/sequence. More... | |
Data (const WrappedArray &w, const FunctionSpace &what, bool expanded=false) | |
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 (double value, const boost::python::tuple &shape=boost::python::make_tuple(), const FunctionSpace &what=FunctionSpace(), bool expanded=false) | |
Constructor which creates a DataConstant of "shape" with constant value. More... | |
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 () |
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 double) |
sets the values of a data-point on this process More... | |
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 (double value) |
replaces all NaN values with value More... | |
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 |
Return true if this Data holds an instance of DataEmpty. This is _not_ the same as asking if the object contains datapoints. More... | |
const FunctionSpace & | getFunctionSpace () const |
Return the function space. 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 DataAbstract::ValueType::value_type * | getSampleDataRO (DataAbstract::ValueType::size_type sampleNo) const |
Return the sample data for the given sample no. Please do not use this unless you NEED to access samples individually. More... | |
DataAbstract::ValueType::value_type * | getSampleDataRW (DataAbstract::ValueType::size_type sampleNo) |
Return the sample data for the given sample no. Please do not use this unless you NEED to access samples individually. More... | |
const DataAbstract::ValueType::value_type * | getDataRO () const |
Return a pointer to the beginning of the underlying data. More... | |
DataAbstract::ValueType::value_type * | getSampleDataByTag (int tag) |
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::ValueType::const_reference | getDataPointRO (int sampleNo, int dataPointNo) |
Return a reference into the DataVector which points to the specified data point. More... | |
DataTypes::ValueType::reference | getDataPointRW (int sampleNo, int dataPointNo) |
Return a reference into the DataVector which points to the specified data point. More... | |
DataTypes::ValueType::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... | |
int | getDataPointSize () const |
Return the size of the data point. It is the product of the data point shape dimensions. More... | |
DataTypes::ValueType::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::ValueType &value, int dataOffset=0) |
Assign the given value to the tag. Implicitly converts this object to type DataTagged if it is constant. More... | |
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, double Amin, double Astep, double undef, Data &B, double Bmin, double Bstep, Data &C, double Cmin, double Cstep, bool check_boundaries) |
Data | interpolateFromTable2D (const WrappedArray &table, double Amin, double Astep, double undef, Data &B, double Bmin, double Bstep, bool check_boundaries) |
Data | interpolateFromTable1D (const WrappedArray &table, double Amin, double Astep, double undef, bool check_boundaries) |
Data | interpolateFromTable3DP (boost::python::object table, double Amin, double Astep, Data &B, double Bmin, double Bstep, Data &C, double Cmin, double Cstep, double undef, bool check_boundaries) |
Data | interpolateFromTable2DP (boost::python::object table, double Amin, double Astep, Data &B, double Bmin, double Bstep, double undef, bool check_boundaries) |
Data | interpolateFromTable1DP (boost::python::object table, double Amin, double Astep, double 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 (double tol=0.0) const |
Return a Data with a 1 for 0 values and a 0 for +ive or -ive values. More... | |
Data | whereNonZero (double tol=0.0) const |
Return a Data with a 0 for 0 values and a 1 for +ive or -ive values. More... | |
double | Lsup () |
Return the maximum absolute value of this Data object. More... | |
double | Lsup_const () const |
double | sup () |
Return the maximum value of this Data object. More... | |
double | sup_const () const |
double | inf () |
Return the minimum value of this Data object. More... | |
double | inf_const () const |
Data | abs () const |
Return the absolute value of each data point of this Data object. 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 |
Return the (sample number, data-point number) of the data point with the minimum component value in this Data object. More... | |
const boost::python::tuple | maxGlobalDataPoint () const |
Return the (sample number, data-point number) of the data point with the minimum component value in this Data object. More... | |
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 | nonsymmetric () const |
Return the nonsymmetric part of a matrix which is half the matrix minus its transpose. 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 double 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 | 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, double(*besselfunc)(int, double)) |
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::ValueType::const_reference | getDataAtOffsetRO (DataTypes::ValueType::size_type i) |
Return a pointer to the beginning of the datapoint at the specified offset. TODO Eventually these should be inlined. More... | |
DataTypes::ValueType::reference | getDataAtOffsetRW (DataTypes::ValueType::size_type i) |
DataTypes::ValueType & | getExpandedVectorReference () |
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... | |
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... | |
Private Member Functions | |
template<class BinaryOp > | |
double | lazyAlgWorker (double init) |
double | LsupWorker () const |
double | supWorker () const |
double | infWorker () const |
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 > | |
double | algorithm (BinaryFunction operation, double 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, double 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... | |
template<class BinaryFunction > | |
void | binaryOp (const Data &right, BinaryFunction operation) |
Perform the given binary operation on all of the data's elements. The underlying type of the right hand side (right) determines the final type of *this after the operation. For example if the right hand side is expanded *this will be expanded if necessary. RHS is a 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::ValueType &value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded) |
Construct a Data object of the appropriate type. More... | |
void | initialise (const WrappedArray &value, const FunctionSpace &what, bool expanded) |
void | initialise (const double value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded) |
const DataReady * | getReady () const |
DataReady * | getReady () |
DataReady_ptr | getReadyPtr () |
const_DataReady_ptr | getReadyPtr () const |
void | updateShareStatus (bool nowshared) const |
Update the Data's shared flag This indicates that the DataAbstract used by this object is now shared (or no longer shared). For internal use only. More... | |
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... | |
Private Attributes | |
bool | m_protected |
bool | m_shared |
bool | m_lazy |
DataAbstract_ptr | m_data |
Friends | |
class | DataAbstract |
class | TestDomain |
Data | condEval (escript::Data &mask, escript::Data &trueval, escript::Data &falseval) |
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.
typedef double(* escript::Data::BinaryDFunPtr) (double, double) |
typedef double(* escript::Data::UnaryDFunPtr) (double) |
Data::Data | ( | ) |
Default constructor. Creates a DataEmpty object.
Constructors.
References escript::DataAbstract::getPtr(), m_protected, and set_m_data().
Referenced by __add__(), __div__(), __mul__(), __rdiv__(), __rsub__(), __sub__(), bessel(), binaryOp(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), copySelf(), delay(), dp_algorithm(), getSlice(), interpolate(), and setItemD().
Data::Data | ( | const Data & | inData | ) |
Copy constructor. WARNING: Only performs a shallow copy.
References isProtected(), m_data, m_protected, and set_m_data().
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.
References getDataPointShape(), escript::FunctionSpace::getDomain(), getDomain(), getFunctionSpace(), isConstant(), isEmpty(), m_data, m_protected, probeInterpolation(), and set_m_data().
Data::Data | ( | const DataTypes::ValueType & | value, |
const DataTypes::ShapeType & | shape, | ||
const FunctionSpace & | what = FunctionSpace() , |
||
bool | expanded = false |
||
) |
Copy Data from an existing vector.
References initialise(), and m_protected.
Data::Data | ( | double | value, |
const DataTypes::ShapeType & | dataPointShape = DataTypes::ShapeType() , |
||
const FunctionSpace & | what = FunctionSpace() , |
||
bool | expanded = false |
||
) |
Constructor which creates a Data with points having the specified shape.
value | - Input - Single 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. |
References initialise(), and m_protected.
Data::Data | ( | const Data & | inData, |
const DataTypes::RegionType & | region | ||
) |
Constructor which performs a deep copy of a region from another Data object.
inData | - Input - Input Data object. |
region | - Input - Region to copy. |
References escript::DataAbstract::getSlice(), isLazy(), m_data, m_protected, and set_m_data().
Data::Data | ( | const boost::python::object & | value, |
const FunctionSpace & | what = FunctionSpace() , |
||
bool | expanded = false |
||
) |
Constructor which copies data from any object that can be treated like a python array/sequence.
value | - 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(), and m_protected.
Data::Data | ( | const WrappedArray & | w, |
const FunctionSpace & | what, | ||
bool | expanded = false |
||
) |
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(), and m_protected.
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. |
References escript::DataVector::copyFromArray(), getDataPointShape(), getFunctionSpace(), escript::WrappedArray::getRank(), escript::WrappedArray::getShape(), m_protected, escript::DataTypes::noValues(), and set_m_data().
Data::Data | ( | double | value, |
const boost::python::tuple & | shape = boost::python::make_tuple() , |
||
const FunctionSpace & | what = FunctionSpace() , |
||
bool | expanded = false |
||
) |
Constructor which creates a DataConstant of "shape" with constant value.
References initialise(), m_protected, and escript::DataTypes::noValues().
|
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.
References escript::DataAbstract::getPtr(), m_protected, and set_m_data().
|
explicit |
Create a Data based on the supplied DataAbstract.
References m_protected, and set_m_data().
Data::~Data | ( | ) |
Destructor.
References set_m_data().
bp::object Data::__add__ | ( | const boost::python::object & | right | ) |
wrapper for python add operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
bp::object Data::__div__ | ( | const boost::python::object & | right | ) |
wrapper for python divide operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
bp::object Data::__mul__ | ( | const boost::python::object & | right | ) |
wrapper for python multiply operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
bp::object Data::__rdiv__ | ( | const boost::python::object & | right | ) |
wrapper for python reverse divide operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
bp::object Data::__rsub__ | ( | const boost::python::object & | right | ) |
wrapper for python reverse subtract operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
bp::object Data::__sub__ | ( | const boost::python::object & | right | ) |
wrapper for python subtract operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
Data Data::abs | ( | ) | const |
Return the absolute value of each data point of this Data object.
References escript::ABS, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::acos | ( | ) | const |
Return the acos of each data point of this Data object.
References escript::ACOS, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::acosh | ( | ) | const |
Return the acosh of each data point of this Data object.
References escript::ACOSH, escript::C_TensorUnaryOperation(), and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
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.
References m_data.
Referenced by finley::Assemble_AverageElementData(), finley::Assemble_CopyElementData(), finley::Assemble_CopyNodalData(), finley::Assemble_getNormal(), finley::Assemble_getSize(), finley::Assemble_gradient(), finley::Assemble_integrate(), finley::Assemble_interpolate(), finley::Assemble_LumpedSystem(), finley::Assemble_NodeCoordinates(), finley::Assemble_PDE_Single_1D(), finley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_C(), finley::Assemble_PDE_System_1D(), finley::Assemble_PDE_System_2D(), finley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_C(), ripley::Brick::assembleIntegrate(), speckley::Brick::assembleIntegrate(), speckley::Rectangle::assembleIntegrate(), ripley::Rectangle::assembleIntegrate(), finley::AssembleParameters::AssembleParameters(), speckley::SpeckleyDomain::assemblePDE(), ripley::DefaultAssembler2D::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D::assemblePDEBoundarySingle(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDESingle(), speckley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), escript::condEval(), get_MPIComm(), speckley::Brick::gradient_order10(), speckley::Rectangle::gradient_order10(), speckley::Brick::gradient_order2(), speckley::Rectangle::gradient_order2(), speckley::Brick::gradient_order3(), speckley::Rectangle::gradient_order3(), speckley::Brick::gradient_order4(), speckley::Rectangle::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(), inf(), weipa::DataVar::initFromEscript(), ripley::RipleyDomain::interpolateOnDomain(), isExpanded(), Lsup(), escript::saveDataCSV(), finley::ElementFile::setTags(), and sup().
|
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 escript::algorithm(), EsysAssert, isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), and m_data.
Referenced by infWorker(), LsupWorker(), operandCheck(), and supWorker().
Data Data::asin | ( | ) | const |
Return the asin of each data point of this Data object.
References escript::ASIN, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::asinh | ( | ) | const |
Return the asinh of each data point of this Data object.
References escript::ASINH, escript::C_TensorUnaryOperation(), and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::atan | ( | ) | const |
Return the atan of each data point of this Data object.
References escript::ATAN, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::atanh | ( | ) | const |
Return the atanh of each data point of this Data object.
References escript::ATANH, escript::C_TensorUnaryOperation(), and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::bessel | ( | int | order, |
double(*)(int, double) | besselfunc | ||
) |
Bessel worker function.
References escript::DataTagged::addTag(), borrowData(), Data(), getDataAtOffsetRO(), getDataAtOffsetRW(), escript::DataTagged::getDataByTagRO(), escript::DataTagged::getDataByTagRW(), getDataPointShape(), getDataPointSize(), escript::DataTagged::getDefaultValueRO(), escript::DataTagged::getDefaultValueRW(), getFunctionSpace(), getNumDataPointsPerSample(), getNumSamples(), escript::DataExpanded::getPointOffset(), escript::DataTagged::getTagLookup(), isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), resolve(), and tag().
Referenced by besselFirstKind(), besselSecondKind(), and hasNoSamples().
Data Data::besselFirstKind | ( | int | order | ) |
Return the Bessel function of the first kind for each data point of this Data object.
References bessel().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
Data Data::besselSecondKind | ( | int | order | ) |
Return the Bessel function of the second kind for each data point of this Data object.
References bessel().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
|
inlineprivate |
Perform the given binary operation on all of the data's elements. The underlying type of the right hand side (right) determines the final type of *this after the operation. For example if the right hand side is expanded *this will be expanded if necessary. RHS is a Data object.
Perform the given binary operation with this and right as operands. Right is a Data object.
References escript::binaryOp(), Data(), EsysAssert, getDataPointRank(), escript::FunctionSpace::getDomain(), getFunctionSpace(), getReady(), escript::FunctionSpace::getTypeCode(), isConstant(), isExpanded(), isLazy(), isTagged(), m_data, operandCheck(), set_m_data(), escript::FunctionSpace::toString(), and typeMatchRight().
Referenced by operandCheck(), operator*=(), operator+=(), operator-=(), and operator/=().
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.
References m_data.
Referenced by bessel(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), hasNoSamples(), escript::load(), and escript::resolveGroup().
DataAbstract_ptr Data::borrowDataPtr | ( | void | ) | const |
References m_data.
Referenced by escript::C_GeneralTensorProduct(), escript::condEval(), escript::DataLazy::DataLazy(), and hasNoSamples().
DataReady_ptr Data::borrowReadyPtr | ( | void | ) | const |
References EsysAssert, and m_data.
Referenced by hasNoSamples().
|
private |
References calc_maxGlobalDataPoint(), get_MPIComm(), get_MPIRank(), get_MPISize(), getDataAtOffsetRO(), getDataOffset(), getNumDataPointsPerSample(), getNumSamples(), isLazy(), maxval_nonlazy(), MPI_DOUBLE, MPI_INT, and resolve().
Referenced by calc_maxGlobalDataPoint(), hasNoSamples(), and maxGlobalDataPoint().
|
private |
References calc_minGlobalDataPoint(), get_MPIComm(), get_MPIRank(), get_MPISize(), getDataAtOffsetRO(), getDataOffset(), getNumDataPointsPerSample(), getNumSamples(), isLazy(), minval_nonlazy(), MPI_DOUBLE, MPI_INT, and resolve().
Referenced by calc_minGlobalDataPoint(), hasNoSamples(), and minGlobalDataPoint().
|
inlineprivate |
checks if caller can have exclusive write to the object
References isLazy(), isShared(), and set_m_data().
Referenced by getDataAtOffsetRW(), and getDataPointRW().
void Data::copy | ( | const Data & | other | ) |
Make this object a deep copy of "other".
References escript::DataAbstract::getPtr(), m_data, and set_m_data().
Referenced by BOOST_PYTHON_MODULE(), escript::condEval(), escript::MPIDataReducer::copyValueFrom(), copyWithMask(), and pos().
Data Data::copySelf | ( | ) |
Return a pointer to a deep copy of this object.
References Data(), and m_data.
Referenced by BOOST_PYTHON_MODULE().
Copy other Data object into this Data object where mask is positive.
References escript::DataTagged::addTag(), copy(), exclusiveWrite(), expand(), getDataPointRank(), getDataPointShape(), getDataPointSize(), escript::DataTagged::getDefaultOffset(), getFunctionSpace(), escript::DataTagged::getOffsetForTag(), getReady(), getReadyPtr(), escript::DataTagged::getTagLookup(), escript::DataReady::getVectorRW(), interpolate(), isConstant(), isEmpty(), isExpanded(), isTagged(), m_data, probeInterpolation(), resolve(), escript::DataTypes::shapeToString(), escript::DataVector::size(), and tag().
Referenced by BOOST_PYTHON_MODULE(), paso::TransportProblemAdapter::copyConstraint(), and hasNoSamples().
Data Data::cos | ( | ) | const |
Return the cos of each data point of this Data object.
References escript::COS, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::cosh | ( | ) | const |
Return the cosh of each data point of this Data object.
References escript::COSH, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::delay | ( | ) |
produce a delayed evaluation version of this Data.
References Data(), isLazy(), and m_data.
Referenced by BOOST_PYTHON_MODULE().
void Data::delaySelf | ( | ) |
convert the current data into lazy data.
References isLazy(), m_data, and set_m_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(), escript::dp_algorithm(), EsysAssert, getFunctionSpace(), isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), m_data, and escript::DataTypes::scalarShape.
Referenced by maxval_nonlazy(), minval_nonlazy(), and operandCheck().
void Data::dump | ( | const std::string | fileName | ) | const |
dumps the object into a netCDF file
References dump(), isLazy(), m_data, and resolve().
Referenced by BOOST_PYTHON_MODULE(), dump(), and getNoValues().
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.
References eigenvalues(), getDataPointRank(), getDataPointShape(), getFunctionSpace(), isLazy(), m_data, resolve(), and typeMatchRight().
Referenced by BOOST_PYTHON_MODULE(), eigenvalues(), and hasNoSamples().
const bp::tuple Data::eigenvalues_and_eigenvectors | ( | const double | 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.
References eigenvalues_and_eigenvectors(), getDataPointRank(), getDataPointShape(), getFunctionSpace(), isLazy(), m_data, resolve(), typeMatchRight(), and V.
Referenced by BOOST_PYTHON_MODULE(), eigenvalues_and_eigenvectors(), and hasNoSamples().
Data Data::erf | ( | ) | const |
Return the error function erf of each data point of this Data object.
References escript::C_TensorUnaryOperation(), escript::ERF, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
|
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 escript::DataAbstract::deepCopy(), forceResolve(), isShared(), and set_m_data().
Referenced by copyWithMask(), operator*=(), operator+=(), operator-=(), operator/=(), requireWrite(), setItemD(), setSlice(), setTaggedValue(), setTaggedValueByName(), setTaggedValueFromCPP(), setToZero(), setValueOfDataPoint(), and setValueOfDataPointToArray().
Data Data::exp | ( | ) | const |
Return the exponential function of each data point of this Data object.
References escript::EXP, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
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 finley::MeshAdapter::addPDEToTransportProblem(), dudley::MeshAdapter::addPDEToTransportProblem(), speckley::SpeckleyDomain::addToRHSFromPython(), BOOST_PYTHON_MODULE(), escript::condEval(), paso::TransportProblemAdapter::copyConstraint(), copyWithMask(), get_MPIComm(), getExpandedVectorReference(), escript::AbstractTransportProblem::insertConstraint(), integrateToTuple(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), finley::MeshAdapter::interpolateOnDomain(), dudley::MeshAdapter::interpolateOnDomain(), nonuniforminterp(), nonuniformslope(), paso::SystemMatrixAdapter::nullifyRowsAndCols(), escript::MPIDataReducer::reduceLocalValue(), paso::TransportProblemAdapter::setToSolution(), paso::SystemMatrixAdapter::setToSolution(), setValueOfDataPoint(), setValueOfDataPointToArray(), toListOfTuples(), typeMatchLeft(), typeMatchRight(), and paso::SystemMatrixAdapter::ypAx().
|
inlineprivate |
References isLazy(), and resolve().
Referenced by exclusiveWrite(), getDataAtOffsetRO(), getDataPointRO(), getValueOfDataPointAsTuple(), getValueOfGlobalDataPointAsTuple(), setSlice(), setTaggedValue(), setTaggedValueByName(), and setTaggedValueFromCPP().
MPI_Comm Data::get_MPIComm | ( | void | ) | const |
return the MPI rank number of the local data MPI_COMM_WORLD is assumed and returned.
References actsExpanded(), escript::DataTagged::addTag(), escript::binOpFnPtrFromVoidPtr(), ESCRIPT_DLL_API, expand(), escript::DataTagged::getDataByTagRO(), escript::DataTagged::getDataByTagRW(), escript::DataTagged::getDefaultValueRO(), escript::DataTagged::getDefaultValueRW(), getDomain(), getFunctionSpace(), getNoValues(), getSampleDataRO(), escript::DataTagged::getTagLookup(), escript::FunctionSpace::getTypeCode(), interpolate(), isConstant(), isLazy(), isTagged(), m_data, MPI_INT, MPI_MAX, resolve(), and tag().
Referenced by calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), get_MPIRank(), get_MPISize(), getValueOfGlobalDataPointAsTuple(), hasNoSamples(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), matrixInverse(), and toString().
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
References get_MPIComm().
Referenced by calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), getValueOfGlobalDataPointAsTuple(), hasNoSamples(), and setTupleForGlobalDataPoint().
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
References get_MPIComm().
Referenced by calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), hasNoSamples(), and toListOfTuples().
DataTypes::ValueType::const_reference Data::getDataAtOffsetRO | ( | DataTypes::ValueType::size_type | i | ) |
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 |
References forceResolve(), escript::DataReady::getDataAtOffsetRO(), and getReady().
Referenced by bessel(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), getValueOfDataPointAsTuple(), getValueOfGlobalDataPointAsTuple(), and hasNoSamples().
DataTypes::ValueType::reference Data::getDataAtOffsetRW | ( | DataTypes::ValueType::size_type | i | ) |
References checkExclusiveWrite(), escript::DataReady::getDataAtOffsetRW(), and getReady().
Referenced by bessel(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), hasNoSamples(), and escript::load().
|
inline |
Return the offset for the given sample and point within the sample.
References ESCRIPT_DLL_API, and m_data.
Referenced by calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), getValueOfDataPointAsTuple(), getValueOfGlobalDataPointAsTuple(), and escript::load().
|
inline |
Return the rank of the point data.
References ESCRIPT_DLL_API, and m_data.
Referenced by binaryOp(), BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::condEval(), copyWithMask(), eigenvalues(), eigenvalues_and_eigenvectors(), getDataPointRank(), getDataPointShape(), getItem(), getShapeTuple(), weipa::DataVar::initFromEscript(), escript::AbstractTransportProblem::insertConstraint(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), nonsymmetric(), nonuniforminterp(), nonuniformslope(), escript::saveDataCSV(), setItemD(), setValueOfDataPointToArray(), swapaxes(), symmetric(), toListOfTuples(), trace(), and transpose().
DataTypes::ValueType::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 - |
References forceResolve(), escript::DataReady::getDataAtOffsetRO(), escript::DataAbstract::getPointOffset(), getReady(), and isReady().
Referenced by getSampleDataByTag().
DataTypes::ValueType::reference Data::getDataPointRW | ( | int | sampleNo, |
int | dataPointNo | ||
) |
Return a reference into the DataVector which points to the specified data point.
sampleNo | - Input - |
dataPointNo | - Input - |
References checkExclusiveWrite(), escript::DataReady::getDataAtOffsetRW(), escript::DataAbstract::getPointOffset(), and getReady().
Referenced by getSampleDataByTag().
|
inline |
Return a reference to the data point shape.
References ESCRIPT_DLL_API, getDataPointSize(), getLength(), getShapeTuple(), and m_data.
Referenced by finley::Assemble_LumpedSystem(), finley::Assemble_NodeCoordinates(), speckley::SpeckleyDomain::assemblePDE(), bessel(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), paso::TransportProblemAdapter::copyConstraint(), copyWithMask(), Data(), eigenvalues(), eigenvalues_and_eigenvectors(), escript::MPIDataReducer::getCompatibilityInfo(), getDataPointShape(), getItem(), getShapeTuple(), getValueOfDataPointAsTuple(), getValueOfGlobalDataPointAsTuple(), gradOn(), weipa::DataVar::initFromEscript(), escript::AbstractTransportProblem::insertConstraint(), integrateWorker(), isDataPointShapeEqual(), matrixInverse(), nonsymmetric(), escript::MPIDataReducer::reduceRemoteValues(), setItemD(), setToZero(), setValueOfDataPointToArray(), swapaxes(), symmetric(), toListOfTuples(), trace(), and transpose().
int Data::getDataPointSize | ( | ) | const |
Return the size of the data point. It is the product of the data point shape dimensions.
References m_data.
Referenced by finley::Assemble_AverageElementData(), finley::Assemble_CopyElementData(), finley::Assemble_CopyNodalData(), finley::Assemble_gradient(), finley::Assemble_integrate(), finley::Assemble_interpolate(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), ripley::Brick::assembleIntegrate(), ripley::Rectangle::assembleIntegrate(), finley::AssembleParameters::AssembleParameters(), speckley::SpeckleyDomain::assemblePDE(), ripley::RipleyDomain::assemblePDE(), speckley::SpeckleyDomain::assemblePDEBoundary(), ripley::RipleyDomain::assemblePDEBoundary(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D::assemblePDEBoundarySystemReduced(), speckley::SpeckleyDomain::assemblePDEDirac(), ripley::RipleyDomain::assemblePDEDirac(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystemReduced(), ripley::DefaultAssembler3D::assemblePDESystemReduced(), ripley::RipleyDomain::averageData(), bessel(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), paso::TransportProblemAdapter::copyConstraint(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), copyWithMask(), ripley::Brick::dofToNodes(), ripley::Rectangle::dofToNodes(), getDataPointShape(), getDataPointSize(), speckley::Brick::gradient_order10(), speckley::Rectangle::gradient_order10(), speckley::Brick::gradient_order2(), speckley::Rectangle::gradient_order2(), speckley::Brick::gradient_order3(), speckley::Rectangle::gradient_order3(), speckley::Brick::gradient_order4(), speckley::Rectangle::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(), escript::AbstractTransportProblem::insertConstraint(), speckley::Brick::integral_order10(), speckley::Rectangle::integral_order10(), speckley::Brick::integral_order2(), speckley::Rectangle::integral_order2(), speckley::Brick::integral_order3(), speckley::Rectangle::integral_order3(), speckley::Brick::integral_order4(), speckley::Rectangle::integral_order4(), speckley::Brick::integral_order5(), speckley::Rectangle::integral_order5(), speckley::Brick::integral_order6(), speckley::Rectangle::integral_order6(), speckley::Brick::integral_order7(), speckley::Rectangle::integral_order7(), speckley::Brick::integral_order8(), speckley::Rectangle::integral_order8(), speckley::Brick::integral_order9(), speckley::Rectangle::integral_order9(), integrateWorker(), speckley::RipleyCoupler::interpolate(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodes(), ripley::MultiRectangle::interpolateElementsToElementsCoarser(), ripley::MultiBrick::interpolateElementsToElementsCoarser(), ripley::MultiRectangle::interpolateElementsToElementsFiner(), ripley::MultiBrick::interpolateElementsToElementsFiner(), speckley::Brick::interpolateFromCorners(), speckley::Rectangle::interpolateFromCorners(), ripley::Brick::interpolateNodesOnElements(), speckley::Brick::interpolateNodesOnElements(), speckley::Rectangle::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::MultiRectangle::interpolateNodesToElementsFiner(), ripley::MultiBrick::interpolateNodesToElementsFiner(), ripley::MultiRectangle::interpolateNodesToNodesFiner(), ripley::MultiBrick::interpolateNodesToNodesFiner(), speckley::SpeckleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFiner(), ripley::MultiBrick::interpolateReducedToElementsFiner(), ripley::MultiRectangle::interpolateReducedToReducedFiner(), ripley::MultiBrick::interpolateReducedToReducedFiner(), ripley::RipleyDomain::multiplyData(), speckley::SpeckleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), paso::SystemMatrixAdapter::nullifyRowsAndCols(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), speckley::Rectangle::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), speckley::Brick::reduction_order10(), speckley::Rectangle::reduction_order10(), speckley::Brick::reduction_order2(), speckley::Rectangle::reduction_order2(), speckley::Brick::reduction_order3(), speckley::Rectangle::reduction_order3(), speckley::Brick::reduction_order4(), speckley::Rectangle::reduction_order4(), speckley::Brick::reduction_order5(), speckley::Rectangle::reduction_order5(), speckley::Brick::reduction_order6(), speckley::Rectangle::reduction_order6(), speckley::Brick::reduction_order7(), speckley::Rectangle::reduction_order7(), speckley::Brick::reduction_order8(), speckley::Rectangle::reduction_order8(), speckley::Brick::reduction_order9(), speckley::Rectangle::reduction_order9(), finley::NodeFile::setCoordinates(), finley::NodeFile::setTags(), finley::ElementFile::setTags(), paso::TransportProblemAdapter::setToSolution(), paso::SystemMatrixAdapter::setToSolution(), escript::AbstractTransportProblem::solve(), escript::AbstractSystemMatrix::solve(), toListOfTuples(), speckley::RipleyCoupler::validInterpolation(), escript::AbstractSystemMatrix::vectorMultiply(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), speckley::Rectangle::writeBinaryGridImpl(), and paso::SystemMatrixAdapter::ypAx().
|
inline |
Return a pointer to the beginning of the underlying data.
References getNumSamples(), getReady(), escript::DataReady::getVectorRO(), and isLazy().
Referenced by finley::Assemble_CopyNodalData(), ripley::Brick::dofToNodes(), ripley::Rectangle::dofToNodes(), Dudley_Assemble_CopyNodalData(), getNoValues(), escript::MPIDataReducer::groupSend(), weipa::DataVar::initFromEscript(), and escript::MPIDataReducer::sendTo().
|
inline |
Return the domain.
References ESCRIPT_DLL_API, escript::FunctionSpace::getDomain(), and getFunctionSpace().
Referenced by Data(), get_MPIComm(), grad(), gradOn(), infWorker(), integrateWorker(), speckley::RipleyCoupler::interpolate(), ripley::MultiBrick::interpolateAcross(), ripley::MultiRectangle::interpolateAcross(), lazyAlgWorker(), LsupWorker(), escript::MPIDataReducer::reduceLocalValue(), escript::saveDataCSV(), setTaggedValueByName(), setTupleForGlobalDataPoint(), supWorker(), speckley::RipleyCoupler::validInterpolation(), and escript::MPIDataReducer::valueCompatible().
|
inline |
Return the domain. TODO: For internal use only. This should be removed.
References ESCRIPT_DLL_API, escript::FunctionSpace::getDomainPython(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
DataTypes::ValueType & Data::getExpandedVectorReference | ( | ) |
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.
References expand(), getReady(), escript::DataReady::getVectorRW(), and isExpanded().
Referenced by escript::MPIDataReducer::groupSend(), hasNoSamples(), escript::TestDomain::randomFill(), finley::MeshAdapter::randomFill(), dudley::MeshAdapter::randomFill(), ripley::Brick::randomFillWorker(), ripley::Rectangle::randomFillWorker(), and escript::MPIDataReducer::reduceRemoteValues().
|
inline |
Return the function space.
References ESCRIPT_DLL_API, and m_data.
Referenced by __add__(), __div__(), __mul__(), __rdiv__(), __rsub__(), __sub__(), finley::Assemble_CopyNodalData(), finley::Assemble_getNormal(), finley::Assemble_getSize(), finley::Assemble_gradient(), finley::Assemble_interpolate(), finley::Assemble_LumpedSystem(), finley::Assemble_NodeCoordinates(), finley::Assemble_PDE(), ripley::Brick::assembleGradient(), speckley::Brick::assembleGradient(), speckley::Rectangle::assembleGradient(), ripley::Rectangle::assembleGradient(), ripley::Brick::assembleIntegrate(), speckley::Brick::assembleIntegrate(), speckley::Rectangle::assembleIntegrate(), ripley::Rectangle::assembleIntegrate(), speckley::SpeckleyDomain::assemblePDE(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), bessel(), binaryOp(), BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), paso::TransportProblemAdapter::copyConstraint(), copyWithMask(), Data(), dp_algorithm(), Dudley_Assemble_LumpedSystem(), eigenvalues(), eigenvalues_and_eigenvectors(), get_MPIComm(), escript::MPIDataReducer::getCompatibilityInfo(), getDomain(), getDomainPython(), getFunctionSpaceType(), getTagNumber(), finley::util::hasReducedIntegrationOrder(), weipa::DataVar::initFromEscript(), ripley::MultiBrick::interpolateAcross(), ripley::MultiRectangle::interpolateAcross(), dudley::MeshAdapter::interpolateAcross(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodes(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), escript::TestDomain::interpolateOnDomain(), escript::NullDomain::interpolateOnDomain(), speckley::SpeckleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), finley::MeshAdapter::interpolateOnDomain(), dudley::MeshAdapter::interpolateOnDomain(), matrixInverse(), nonsymmetric(), nonuniforminterp(), nonuniformslope(), paso::SystemMatrixAdapter::nullifyRowsAndCols(), escript::operator*(), operator*=(), escript::operator+(), operator+=(), escript::operator-(), operator-=(), escript::operator/(), operator/=(), powO(), probeInterpolation(), ripley::Brick::randomFill(), speckley::Rectangle::randomFill(), speckley::Brick::randomFill(), ripley::Rectangle::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(), setItemD(), setItemO(), finley::MeshAdapter::setNewX(), dudley::MeshAdapter::setNewX(), setTaggedValueByName(), escript::FunctionSpace::setTags(), escript::FunctionSpace::setTagsByString(), ripley::RipleyDomain::setToGradient(), speckley::SpeckleyDomain::setToGradient(), finley::MeshAdapter::setToGradient(), dudley::MeshAdapter::setToGradient(), finley::MeshAdapter::setToIntegrals(), ripley::RipleyDomain::setToIntegrals(), dudley::MeshAdapter::setToIntegrals(), speckley::SpeckleyDomain::setToIntegrals(), ripley::Brick::setToNormal(), ripley::Rectangle::setToNormal(), ripley::MultiBrick::setToNormal(), finley::MeshAdapter::setToNormal(), dudley::MeshAdapter::setToNormal(), ripley::Brick::setToSize(), ripley::Rectangle::setToSize(), speckley::Rectangle::setToSize(), speckley::Brick::setToSize(), ripley::MultiBrick::setToSize(), finley::MeshAdapter::setToSize(), dudley::MeshAdapter::setToSize(), paso::TransportProblemAdapter::setToSolution(), paso::SystemMatrixAdapter::setToSolution(), ripley::RipleyDomain::setToX(), speckley::SpeckleyDomain::setToX(), finley::MeshAdapter::setToX(), dudley::MeshAdapter::setToX(), setToZero(), escript::AbstractTransportProblem::solve(), escript::AbstractSystemMatrix::solve(), swapaxes(), symmetric(), trace(), transpose(), truedivO(), speckley::RipleyCoupler::validInterpolation(), ripley::WaveAssembler2D::WaveAssembler2D(), speckley::WaveAssembler2D::WaveAssembler2D(), ripley::WaveAssembler3D::WaveAssembler3D(), speckley::WaveAssembler3D::WaveAssembler3D(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), speckley::Rectangle::writeBinaryGridImpl(), and paso::SystemMatrixAdapter::ypAx().
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(), and hasNoSamples().
DataTypes::ValueType::size_type Data::getLength | ( | ) | const |
Return the number of doubles stored for this Data.
References m_data.
Referenced by getDataPointShape(), getLength(), escript::MPIDataReducer::groupSend(), hasNoSamples(), escript::MPIDataReducer::sendTo(), and toString().
|
inline |
Return the number of values in the shape for this object.
References dump(), ESCRIPT_DLL_API, getDataRO(), getSampleDataRO(), getSampleDataRW(), m_data, and toListOfTuples().
Referenced by get_MPIComm(), lazyAlgWorker(), and 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).
References isTagged(), and m_data.
Referenced by escript::MPIDataReducer::getCompatibilityInfo(), and hasNoSamples().
|
inline |
Return the number of data points.
References ESCRIPT_DLL_API, getNumDataPointsPerSample(), and getNumSamples().
Referenced by BOOST_PYTHON_MODULE(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), nonuniforminterp(), nonuniformslope(), toListOfTuples(), and toString().
|
inline |
Return the number of data points per sample.
References ESCRIPT_DLL_API, and m_data.
Referenced by ripley::RipleyDomain::averageData(), bessel(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), getNumDataPoints(), getNumDataPointsPerSample(), getValueOfDataPointAsTuple(), getValueOfGlobalDataPointAsTuple(), weipa::DataVar::initFromEscript(), lazyAlgWorker(), ripley::RipleyDomain::multiplyData(), speckley::SpeckleyDomain::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(), finley::NodeFile::setCoordinates(), finley::NodeFile::setTags(), finley::ElementFile::setTags(), ripley::Brick::setToSize(), ripley::Rectangle::setToSize(), ripley::MultiBrick::setToSize(), setValueOfDataPoint(), setValueOfDataPointToArray(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), and speckley::Rectangle::writeBinaryGridImpl().
|
inline |
Return the number of samples.
References ESCRIPT_DLL_API, and m_data.
Referenced by ripley::RipleyDomain::averageData(), bessel(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), getDataRO(), getDataRW(), getNumDataPoints(), getValueOfDataPointAsTuple(), getValueOfGlobalDataPointAsTuple(), weipa::DataVar::initFromEscript(), lazyAlgWorker(), ripley::RipleyDomain::multiplyData(), speckley::SpeckleyDomain::multiplyData(), numSamplesEqual(), print(), finley::NodeFile::setCoordinates(), finley::NodeFile::setTags(), and finley::ElementFile::setTags().
|
inlineprivate |
References EsysAssert, and m_data.
Referenced by binaryOp(), escript::condEval(), copyWithMask(), getDataAtOffsetRO(), getDataAtOffsetRW(), getDataPointRO(), getDataPointRW(), getDataRO(), getExpandedVectorReference(), getSampleDataRO(), getSampleDataRW(), escript::TestDomain::getX(), hasNaN(), infWorker(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), LsupWorker(), nonuniforminterp(), nonuniformslope(), replaceNaN(), setSlice(), supWorker(), and toListOfTuples().
|
inlineprivate |
References EsysAssert, and m_data.
|
inlineprivate |
References EsysAssert, and m_data.
Referenced by copyWithMask(), and matrixInverse().
|
inlineprivate |
References EsysAssert, and m_data.
|
inline |
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.
tag | - Input - the tag key. |
References ESCRIPT_DLL_API, getDataPointRO(), getDataPointRW(), and m_data.
|
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_AverageElementData(), finley::Assemble_CopyElementData(), finley::Assemble_CopyNodalData(), finley::Assemble_gradient(), finley::Assemble_integrate(), finley::Assemble_interpolate(), finley::Assemble_LumpedSystem(), finley::Assemble_PDE_Points(), finley::Assemble_PDE_Single_1D(), finley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_C(), finley::Assemble_PDE_System_1D(), finley::Assemble_PDE_System_2D(), finley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_C(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), ripley::Brick::assembleIntegrate(), ripley::Rectangle::assembleIntegrate(), ripley::DefaultAssembler2D::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D::assemblePDEBoundarySingle(), ripley::DefaultAssembler2D::assemblePDEBoundarySingleReduced(), ripley::DefaultAssembler3D::assemblePDEBoundarySingleReduced(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D::assemblePDEBoundarySystemReduced(), speckley::SpeckleyDomain::assemblePDEDirac(), ripley::RipleyDomain::assemblePDEDirac(), speckley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D::assemblePDESingleReduced(), ripley::DefaultAssembler3D::assemblePDESingleReduced(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystemReduced(), ripley::DefaultAssembler3D::assemblePDESystemReduced(), ripley::RipleyDomain::averageData(), speckley::RipleyCoupler::calculate(), escript::condEval(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), ripley::Brick::dofToNodes(), ripley::Rectangle::dofToNodes(), get_MPIComm(), getNoValues(), getSampleDataRO(), getSampleDataROFast(), speckley::Brick::gradient_order10(), speckley::Rectangle::gradient_order10(), speckley::Brick::gradient_order2(), speckley::Rectangle::gradient_order2(), speckley::Brick::gradient_order3(), speckley::Rectangle::gradient_order3(), speckley::Brick::gradient_order4(), speckley::Rectangle::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::integral_order10(), speckley::Rectangle::integral_order10(), speckley::Brick::integral_order2(), speckley::Rectangle::integral_order2(), speckley::Brick::integral_order3(), speckley::Rectangle::integral_order3(), speckley::Brick::integral_order4(), speckley::Rectangle::integral_order4(), speckley::Brick::integral_order5(), speckley::Rectangle::integral_order5(), speckley::Brick::integral_order6(), speckley::Rectangle::integral_order6(), speckley::Brick::integral_order7(), speckley::Rectangle::integral_order7(), speckley::Brick::integral_order8(), speckley::Rectangle::integral_order8(), speckley::Brick::integral_order9(), speckley::Rectangle::integral_order9(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodes(), ripley::MultiRectangle::interpolateElementsToElementsCoarser(), ripley::MultiBrick::interpolateElementsToElementsCoarser(), ripley::MultiRectangle::interpolateElementsToElementsFiner(), ripley::MultiBrick::interpolateElementsToElementsFiner(), speckley::Brick::interpolateFromCorners(), speckley::Rectangle::interpolateFromCorners(), ripley::Brick::interpolateNodesOnElements(), speckley::Brick::interpolateNodesOnElements(), speckley::Rectangle::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::MultiRectangle::interpolateNodesToElementsFiner(), ripley::MultiBrick::interpolateNodesToElementsFiner(), ripley::MultiRectangle::interpolateNodesToNodesFiner(), ripley::MultiBrick::interpolateNodesToNodesFiner(), speckley::SpeckleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFiner(), ripley::MultiBrick::interpolateReducedToElementsFiner(), ripley::MultiRectangle::interpolateReducedToReducedFiner(), ripley::MultiBrick::interpolateReducedToReducedFiner(), ripley::RipleyDomain::multiplyData(), speckley::SpeckleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), speckley::Brick::reduction_order10(), speckley::Rectangle::reduction_order10(), speckley::Brick::reduction_order2(), speckley::Rectangle::reduction_order2(), speckley::Brick::reduction_order3(), speckley::Rectangle::reduction_order3(), speckley::Brick::reduction_order4(), speckley::Rectangle::reduction_order4(), speckley::Brick::reduction_order5(), speckley::Rectangle::reduction_order5(), speckley::Brick::reduction_order6(), speckley::Rectangle::reduction_order6(), speckley::Brick::reduction_order7(), speckley::Rectangle::reduction_order7(), speckley::Brick::reduction_order8(), speckley::Rectangle::reduction_order8(), speckley::Brick::reduction_order9(), speckley::Rectangle::reduction_order9(), escript::saveDataCSV(), finley::NodeFile::setCoordinates(), finley::NodeFile::setTags(), finley::ElementFile::setTags(), ripley::RipleyDomain::setTags(), speckley::SpeckleyDomain::setTags(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), and speckley::Rectangle::writeBinaryGridImpl().
|
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(), finley::Assemble_AverageElementData(), finley::Assemble_CopyElementData(), finley::Assemble_CopyNodalData(), finley::Assemble_getNormal(), finley::Assemble_getSize(), finley::Assemble_gradient(), finley::Assemble_interpolate(), finley::Assemble_LumpedSystem(), finley::Assemble_NodeCoordinates(), finley::Assemble_PDE_Points(), finley::Assemble_PDE_Single_1D(), finley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_C(), finley::Assemble_PDE_System_1D(), finley::Assemble_PDE_System_2D(), finley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_C(), ripley::Brick::assembleCoordinates(), speckley::Brick::assembleCoordinates(), speckley::Rectangle::assembleCoordinates(), ripley::Rectangle::assembleCoordinates(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), speckley::SpeckleyDomain::assemblePDEDirac(), 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::TransportProblemAdapter::copyConstraint(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), ripley::Brick::dofToNodes(), ripley::Rectangle::dofToNodes(), getNoValues(), getSampleDataRW(), getSampleDataRWFast(), speckley::Brick::gradient_order10(), speckley::Rectangle::gradient_order10(), speckley::Brick::gradient_order2(), speckley::Rectangle::gradient_order2(), speckley::Brick::gradient_order3(), speckley::Rectangle::gradient_order3(), speckley::Brick::gradient_order4(), speckley::Rectangle::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::interpolateElementsOnNodes(), ripley::MultiRectangle::interpolateElementsToElementsCoarser(), ripley::MultiBrick::interpolateElementsToElementsCoarser(), ripley::MultiRectangle::interpolateElementsToElementsFiner(), ripley::MultiBrick::interpolateElementsToElementsFiner(), speckley::Brick::interpolateFromCorners(), speckley::Rectangle::interpolateFromCorners(), ripley::Brick::interpolateNodesOnElements(), speckley::Brick::interpolateNodesOnElements(), speckley::Rectangle::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::MultiRectangle::interpolateNodesToElementsFiner(), ripley::MultiBrick::interpolateNodesToElementsFiner(), ripley::MultiRectangle::interpolateNodesToNodesFiner(), ripley::MultiBrick::interpolateNodesToNodesFiner(), speckley::SpeckleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFiner(), ripley::MultiBrick::interpolateReducedToElementsFiner(), ripley::MultiRectangle::interpolateReducedToReducedFiner(), ripley::MultiBrick::interpolateReducedToReducedFiner(), ripley::RipleyDomain::multiplyData(), speckley::SpeckleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), paso::SystemMatrixAdapter::nullifyRowsAndCols(), print(), speckley::Brick::randomFill(), speckley::Rectangle::randomFill(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), speckley::Rectangle::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), speckley::Brick::reduction_order10(), speckley::Rectangle::reduction_order10(), speckley::Brick::reduction_order2(), speckley::Rectangle::reduction_order2(), speckley::Brick::reduction_order3(), speckley::Rectangle::reduction_order3(), speckley::Brick::reduction_order4(), speckley::Rectangle::reduction_order4(), speckley::Brick::reduction_order5(), speckley::Rectangle::reduction_order5(), speckley::Brick::reduction_order6(), speckley::Rectangle::reduction_order6(), speckley::Brick::reduction_order7(), speckley::Rectangle::reduction_order7(), speckley::Brick::reduction_order8(), speckley::Rectangle::reduction_order8(), speckley::Brick::reduction_order9(), speckley::Rectangle::reduction_order9(), ripley::Brick::setToNormal(), ripley::Rectangle::setToNormal(), ripley::MultiBrick::setToNormal(), ripley::Brick::setToSize(), speckley::Brick::setToSize(), ripley::Rectangle::setToSize(), speckley::Rectangle::setToSize(), ripley::MultiBrick::setToSize(), paso::TransportProblemAdapter::setToSolution(), paso::SystemMatrixAdapter::setToSolution(), speckley::RipleyCoupler::shareBrickXFaces(), speckley::RipleyCoupler::shareBrickYFaces(), speckley::RipleyCoupler::shareBrickZFaces(), speckley::RipleyCoupler::shareRectangleXEdges(), speckley::RipleyCoupler::shareRectangleYEdges(), and paso::SystemMatrixAdapter::ypAx().
const bp::tuple Data::getShapeTuple | ( | ) | const |
Return the data point shape as a tuple of integers.
References getDataPointRank(), and getDataPointShape().
Referenced by BOOST_PYTHON_MODULE(), and getDataPointShape().
Data Data::getSlice | ( | const DataTypes::RegionType & | region | ) | const |
Return a Data object containing the specified slice of this Data object.
region | - Input - Region to copy. |
References Data().
Referenced by getItem(), and hasNoSamples().
int Data::getTagNumber | ( | int | dpno | ) |
Return the tag number associated with the given data-point.
References getFunctionSpace(), escript::FunctionSpace::getTagFromDataPointNo(), and isEmpty().
Referenced by BOOST_PYTHON_MODULE().
const bp::object Data::getValueOfDataPointAsTuple | ( | int | dataPointNo | ) |
Return the value of a data point as a python tuple.
References forceResolve(), getDataAtOffsetRO(), getDataOffset(), getDataPointShape(), getNumDataPointsPerSample(), and getNumSamples().
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(), MPI_DOUBLE, and escript::DataTypes::noValues().
Referenced by BOOST_PYTHON_MODULE().
Data Data::grad | ( | ) | const |
References escript::function(), getDomain(), gradOn(), and isEmpty().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
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.
References blocktimer_increment(), blocktimer_time(), getDataPointShape(), escript::FunctionSpace::getDim(), escript::FunctionSpace::getDomain(), getDomain(), and isEmpty().
Referenced by BOOST_PYTHON_MODULE(), grad(), and hasNoSamples().
bool Data::hasNaN | ( | ) |
returns return true if data contains NaN.
References getReady(), escript::DataReady::hasNaN(), isLazy(), and resolve().
Referenced by BOOST_PYTHON_MODULE().
|
inline |
Return true if this object contains no samples. This is not the same as isEmpty()
References __add__(), __div__(), __mul__(), __rdiv__(), __rsub__(), __sub__(), abs(), acos(), acosh(), asin(), asinh(), atan(), atanh(), bessel(), besselFirstKind(), besselSecondKind(), borrowData(), borrowDataPtr(), borrowReadyPtr(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), copyWithMask(), cos(), cosh(), eigenvalues(), eigenvalues_and_eigenvectors(), erf(), ESCRIPT_DLL_API, exp(), get_MPIComm(), get_MPIRank(), get_MPISize(), getDataAtOffsetRO(), getDataAtOffsetRW(), getExpandedVectorReference(), getItem(), getLength(), getNumberOfTaggedValues(), getSlice(), grad(), gradOn(), inf(), inf_const(), infWorker(), integrateToTuple(), integrateToTuple_const(), integrateWorker(), interpolate(), interpolateFromTable1D(), interpolateFromTable1DP(), interpolateFromTable2D(), interpolateFromTable2DP(), interpolateFromTable3D(), interpolateFromTable3DP(), lazyAlgWorker(), log(), log10(), Lsup(), Lsup_const(), LsupWorker(), matrixInverse(), maxGlobalDataPoint(), maxval(), maxval_nonlazy(), minGlobalDataPoint(), minval(), minval_nonlazy(), neg(), nonsymmetric(), nonuniforminterp(), nonuniformslope(), oneOver(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), pos(), powD(), powO(), print(), probeInterpolation(), rpowO(), rtruedivO(), setItemD(), setItemO(), setSlice(), setTaggedValue(), setTaggedValueByName(), setTaggedValueFromCPP(), setToZero(), sign(), sin(), sinh(), sqrt(), sup(), sup_const(), supWorker(), swapaxes(), symmetric(), tan(), tanh(), trace(), transpose(), truedivD(), truedivO(), unaryOp2(), whereNegative(), whereNonNegative(), whereNonPositive(), whereNonZero(), wherePositive(), and whereZero().
double 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.
References actsExpanded(), CHECK_DO_CRES, infWorker(), isLazy(), lazyAlgWorker(), MPI_MIN, and resolve().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
double Data::inf_const | ( | ) | const |
References infWorker(), and isLazy().
Referenced by hasNoSamples(), and toString().
|
private |
References algorithm(), getDomain(), getReady(), escript::DataReady::hasNaN(), escript::makeNaN(), MPI_DOUBLE, MPI_MAX, and MPI_MIN.
Referenced by hasNoSamples(), inf(), and inf_const().
|
private |
Construct a Data object of the appropriate type.
References escript::DataAbstract::getPtr(), and set_m_data().
Referenced by Data(), and operandCheck().
|
private |
References escript::DataAbstract::getPtr(), and set_m_data().
|
private |
References set_m_data().
bp::object Data::integrateToTuple | ( | ) |
Calculate the integral over the function space domain as a python tuple.
References expand(), integrateWorker(), and isLazy().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
bp::object Data::integrateToTuple_const | ( | ) | const |
Calculate the integral over the function space domain as a python tuple.
References integrateWorker(), and isLazy().
Referenced by hasNoSamples().
|
private |
References getDataPointShape(), getDataPointSize(), getDomain(), MPI_DOUBLE, MPI_SUM, and escript::AbstractContinuousDomain::setToIntegrals().
Referenced by hasNoSamples(), integrateToTuple(), and integrateToTuple_const().
Data Data::interpolate | ( | const FunctionSpace & | functionspace | ) | const |
Interpolates this onto the given functionspace and returns the result as a Data object.
References Data().
Referenced by BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), copyWithMask(), get_MPIComm(), hasNoSamples(), interpolateFromTable2D(), interpolateFromTable3D(), and escript::saveDataCSV().
Data Data::interpolateFromTable1D | ( | const WrappedArray & | table, |
double | Amin, | ||
double | Astep, | ||
double | undef, | ||
bool | check_boundaries | ||
) |
References escript::WrappedArray::convertArray(), expand(), get_MPIComm(), getDataPointRank(), escript::WrappedArray::getElt(), getFunctionSpace(), getNumDataPoints(), escript::WrappedArray::getRank(), getReady(), escript::WrappedArray::getShape(), escript::DataReady::getVectorRO(), escript::DataReady::getVectorRW(), isExpanded(), MPI_INT, MPI_MAX, and escript::DataTypes::scalarShape.
Referenced by hasNoSamples(), and interpolateFromTable1DP().
Data Data::interpolateFromTable1DP | ( | boost::python::object | table, |
double | Amin, | ||
double | Astep, | ||
double | undef, | ||
bool | check_boundaries | ||
) |
References interpolateFromTable1D().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
Data Data::interpolateFromTable2D | ( | const WrappedArray & | table, |
double | Amin, | ||
double | Astep, | ||
double | undef, | ||
Data & | B, | ||
double | Bmin, | ||
double | Bstep, | ||
bool | check_boundaries | ||
) |
References escript::WrappedArray::convertArray(), expand(), get_MPIComm(), getDataPointRank(), escript::WrappedArray::getElt(), getFunctionSpace(), getNumDataPoints(), escript::WrappedArray::getRank(), getReady(), escript::WrappedArray::getShape(), escript::DataReady::getVectorRO(), escript::DataReady::getVectorRW(), interpolate(), isExpanded(), MPI_INT, MPI_MAX, and escript::DataTypes::scalarShape.
Referenced by hasNoSamples(), and interpolateFromTable2DP().
Data Data::interpolateFromTable2DP | ( | boost::python::object | table, |
double | Amin, | ||
double | Astep, | ||
Data & | B, | ||
double | Bmin, | ||
double | Bstep, | ||
double | undef, | ||
bool | check_boundaries | ||
) |
References interpolateFromTable2D().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
Data Data::interpolateFromTable3D | ( | const WrappedArray & | table, |
double | Amin, | ||
double | Astep, | ||
double | undef, | ||
Data & | B, | ||
double | Bmin, | ||
double | Bstep, | ||
Data & | C, | ||
double | Cmin, | ||
double | Cstep, | ||
bool | check_boundaries | ||
) |
References escript::WrappedArray::convertArray(), expand(), get_MPIComm(), getDataPointRank(), escript::WrappedArray::getElt(), getFunctionSpace(), getNumDataPoints(), escript::WrappedArray::getRank(), getReady(), escript::WrappedArray::getShape(), escript::DataReady::getVectorRO(), escript::DataReady::getVectorRW(), interpolate(), isExpanded(), MPI_INT, MPI_MAX, paso::nz, and escript::DataTypes::scalarShape.
Referenced by hasNoSamples(), and interpolateFromTable3DP().
Data Data::interpolateFromTable3DP | ( | boost::python::object | table, |
double | Amin, | ||
double | Astep, | ||
Data & | B, | ||
double | Bmin, | ||
double | Bstep, | ||
Data & | C, | ||
double | Cmin, | ||
double | Cstep, | ||
double | undef, | ||
bool | check_boundaries | ||
) |
References interpolateFromTable3D().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
bool Data::isConstant | ( | ) | const |
Return true if this Data is constant.
References m_data.
Referenced by algorithm(), bessel(), binaryOp(), BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), copyWithMask(), Data(), dp_algorithm(), expand(), get_MPIComm(), escript::MPIDataReducer::getCompatibilityInfo(), weipa::DataVar::initFromEscript(), setTaggedValue(), setTaggedValueFromCPP(), tag(), typeMatchLeft(), and typeMatchRight().
|
inline |
Returns true if the shape matches the vector (dimensions[0],..., dimensions[rank-1]). DataEmpty always returns true.
References ESCRIPT_DLL_API, getDataPointShape(), and isEmpty().
Referenced by finley::Assemble_getNormal(), finley::Assemble_getSize(), finley::Assemble_PDE(), ripley::Brick::assembleCoordinates(), speckley::Brick::assembleCoordinates(), speckley::Rectangle::assembleCoordinates(), ripley::Rectangle::assembleCoordinates(), and isDataPointShapeEqual().
bool Data::isEmpty | ( | ) | const |
Return true if this Data holds an instance of DataEmpty. This is _not_ the same as asking if the object
contains datapoints.
References m_data.
Referenced by dudley::MeshAdapter::addPDEToRHS(), dudley::MeshAdapter::addPDEToSystem(), dudley::MeshAdapter::addPDEToTransportProblem(), ripley::RipleyDomain::addToRHS(), speckley::SpeckleyDomain::addToRHS(), algorithm(), finley::Assemble_LumpedSystem(), finley::Assemble_PDE(), finley::Assemble_PDE_Points(), finley::Assemble_PDE_Single_1D(), finley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_C(), finley::Assemble_PDE_System_1D(), finley::Assemble_PDE_System_2D(), finley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_C(), finley::AssembleParameters::AssembleParameters(), speckley::SpeckleyDomain::assemblePDE(), ripley::RipleyDomain::assemblePDE(), speckley::SpeckleyDomain::assemblePDEBoundary(), ripley::RipleyDomain::assemblePDEBoundary(), ripley::DefaultAssembler2D::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D::assemblePDEBoundarySingle(), ripley::DefaultAssembler2D::assemblePDEBoundarySingleReduced(), ripley::DefaultAssembler3D::assemblePDEBoundarySingleReduced(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D::assemblePDEBoundarySystemReduced(), speckley::SpeckleyDomain::assemblePDEDirac(), ripley::RipleyDomain::assemblePDEDirac(), ripley::DefaultAssembler2D::assemblePDESingle(), speckley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D::assemblePDESingleReduced(), ripley::DefaultAssembler3D::assemblePDESingleReduced(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystemReduced(), ripley::DefaultAssembler3D::assemblePDESystemReduced(), bessel(), BOOST_PYTHON_MODULE(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::convertToData(), escript::MPIDataReducer::copyValueFrom(), copyWithMask(), Data(), dp_algorithm(), Dudley_Assemble_LumpedSystem(), expand(), getNumDataPointsPerSample(), getSampleDataRO(), getSampleDataRW(), getTagNumber(), grad(), gradOn(), escript::AbstractTransportProblem::insertConstraint(), isDataPointShapeEqual(), isEmpty(), isExpanded(), numSamplesEqual(), escript::MPIDataReducer::reduceLocalValue(), setToZero(), tag(), speckley::WaveAssembler2D::WaveAssembler2D(), and speckley::WaveAssembler3D::WaveAssembler3D().
bool Data::isExpanded | ( | ) | const |
Return true if this Data is expanded.
References m_data.
Referenced by algorithm(), bessel(), binaryOp(), BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), copyWithMask(), dp_algorithm(), Dudley_Assemble_LumpedSystem(), expand(), escript::MPIDataReducer::getCompatibilityInfo(), getExpandedVectorReference(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), ripley::RipleyDomain::setToX(), speckley::SpeckleyDomain::setToX(), setValueOfDataPoint(), setValueOfDataPointToArray(), tag(), typeMatchLeft(), and typeMatchRight().
bool Data::isLazy | ( | ) | const |
Return true if this Data is lazy.
References m_lazy.
Referenced by algorithm(), bessel(), binaryOp(), BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), checkExclusiveWrite(), escript::condEval(), Data(), delay(), delaySelf(), dp_algorithm(), dump(), eigenvalues(), eigenvalues_and_eigenvectors(), expand(), forceResolve(), get_MPIComm(), getDataRO(), getSampleDataRW(), escript::MPIDataReducer::groupSend(), hasNaN(), inf(), inf_const(), integrateToTuple(), integrateToTuple_const(), lazyAlgWorker(), Lsup(), Lsup_const(), matrixInverse(), replaceNaN(), resolve(), escript::resolveGroup(), escript::MPIDataReducer::sendTo(), setToZero(), sup(), sup_const(), tag(), typeMatchLeft(), and typeMatchRight().
bool Data::isProtected | ( | ) | const |
Returns true, if the data object is protected against update.
References m_protected.
Referenced by BOOST_PYTHON_MODULE(), Data(), operator*=(), operator+=(), operator-=(), operator/=(), setSlice(), setTaggedValue(), setTaggedValueFromCPP(), setValueOfDataPoint(), and setValueOfDataPointToArray().
bool Data::isReady | ( | ) | const |
Return true if this data is ready.
References m_data.
Referenced by BOOST_PYTHON_MODULE(), and getDataPointRO().
|
inlineprivate |
References m_shared.
Referenced by checkExclusiveWrite(), and exclusiveWrite().
bool Data::isTagged | ( | ) | const |
Return true if this Data is tagged.
References m_data.
Referenced by algorithm(), bessel(), binaryOp(), BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), copyWithMask(), dp_algorithm(), expand(), get_MPIComm(), escript::MPIDataReducer::getCompatibilityInfo(), getNumberOfTaggedValues(), tag(), typeMatchLeft(), and typeMatchRight().
|
private |
References EsysAssert, getDomain(), getNoValues(), getNumDataPointsPerSample(), getNumSamples(), isLazy(), m_data, escript::makeNaN(), MPI_DOUBLE, MPI_MAX, escript::DataLazy::resolveSample(), and escript::DataMaths::vectorHasNaN().
Referenced by hasNoSamples(), and inf().
Data Data::log | ( | ) | const |
Return the natural log of each data point of this Data object.
References escript::LOG, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::log10 | ( | ) | const |
Return the log to base 10 of each data point of this Data object.
References escript::LOG10, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
double 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.
References actsExpanded(), CHECK_DO_CRES, isLazy(), LsupWorker(), MPI_MAX, and resolve().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
double Data::Lsup_const | ( | ) | const |
References isLazy(), and LsupWorker().
Referenced by hasNoSamples().
|
private |
References algorithm(), getDomain(), getReady(), escript::DataReady::hasNaN(), escript::makeNaN(), MPI_DOUBLE, and MPI_MAX.
Referenced by hasNoSamples(), Lsup(), and Lsup_const().
Data Data::matrixInverse | ( | ) | const |
return inverse of matricies.
References get_MPIComm(), getDataPointShape(), getFunctionSpace(), getReadyPtr(), isLazy(), m_data, matrixInverse(), escript::DataMaths::matrixInverseError(), MPI_INT, MPI_MAX, resolve(), and typeMatchRight().
Referenced by BOOST_PYTHON_MODULE(), hasNoSamples(), and matrixInverse().
const bp::tuple Data::maxGlobalDataPoint | ( | ) | const |
Return the (sample number, data-point number) of the data point with the minimum component value in this Data object.
References calc_maxGlobalDataPoint().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
Data Data::maxval | ( | ) | const |
Return the maximum value of each data point of this Data object.
References MAKELAZYOP, escript::MAXVAL, and maxval_nonlazy().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
|
inlineprivate |
References dp_algorithm().
Referenced by calc_maxGlobalDataPoint(), hasNoSamples(), and maxval().
const bp::tuple Data::minGlobalDataPoint | ( | ) | const |
Return the (sample number, data-point number) of the data point with the minimum component value in this Data object.
References calc_minGlobalDataPoint().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
Data Data::minval | ( | ) | const |
Return the minimum value of each data point of this Data object.
References MAKELAZYOP, escript::MINVAL, and minval_nonlazy().
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
|
inlineprivate |
References dp_algorithm().
Referenced by calc_minGlobalDataPoint(), hasNoSamples(), and minval().
Data Data::neg | ( | ) | const |
Return the negation of each data point of this Data object.
References escript::C_TensorUnaryOperation(), MAKELAZYOP, and escript::NEG.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::nonsymmetric | ( | ) | const |
Return the nonsymmetric part of a matrix which is half the matrix minus its transpose.
References getDataPointRank(), getDataPointShape(), getFunctionSpace(), m_data, MAKELAZYOP, escript::NSYM, and typeMatchRight().
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::nonuniforminterp | ( | boost::python::object | in, |
boost::python::object | out, | ||
bool | check_boundaries | ||
) |
References escript::WrappedArray::convertArray(), expand(), getDataPointRank(), escript::WrappedArray::getElt(), getFunctionSpace(), getNumDataPoints(), escript::WrappedArray::getRank(), getReady(), escript::WrappedArray::getShape(), escript::DataReady::getVectorRO(), escript::DataReady::getVectorRW(), and escript::DataTypes::scalarShape.
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
Data Data::nonuniformslope | ( | boost::python::object | in, |
boost::python::object | out, | ||
bool | check_boundaries | ||
) |
References escript::WrappedArray::convertArray(), expand(), getDataPointRank(), escript::WrappedArray::getElt(), getFunctionSpace(), getNumDataPoints(), escript::WrappedArray::getRank(), getReady(), escript::WrappedArray::getShape(), escript::DataReady::getVectorRO(), escript::DataReady::getVectorRW(), and escript::DataTypes::scalarShape.
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
|
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 finley::Assemble_AverageElementData(), finley::Assemble_CopyElementData(), finley::Assemble_CopyNodalData(), finley::Assemble_getNormal(), finley::Assemble_getSize(), finley::Assemble_gradient(), finley::Assemble_integrate(), finley::Assemble_interpolate(), finley::Assemble_LumpedSystem(), finley::Assemble_NodeCoordinates(), finley::Assemble_PDE(), ripley::Brick::assembleCoordinates(), speckley::Brick::assembleCoordinates(), speckley::Rectangle::assembleCoordinates(), ripley::Rectangle::assembleCoordinates(), finley::AssembleParameters::AssembleParameters(), and numSamplesEqual().
Data Data::oneOver | ( | ) | const |
Returns 1./ Data object.
References escript::C_TensorUnaryOperation(), MAKELAZYOP, and escript::RECIP.
Referenced by escript::DataLazy::collapseToReady(), and hasNoSamples().
|
inlineprivate |
Check *this and the right operand are compatible. Throws an exception if they aren't.
right | - Input - The right hand side. |
References algorithm(), binaryOp(), dp_algorithm(), initialise(), m_data, typeMatchLeft(), and typeMatchRight().
Referenced by binaryOp().
Overloaded operator *=.
right | - Input - The right hand side. |
References binaryOp(), exclusiveWrite(), isProtected(), MAKELAZYBINSELF, and escript::MUL.
Referenced by hasNoSamples().
Data & Data::operator*= | ( | const boost::python::object & | right | ) |
References getFunctionSpace(), and isProtected().
Overloaded operator +=.
right | - Input - The right hand side. |
References escript::ADD, binaryOp(), exclusiveWrite(), isProtected(), and MAKELAZYBINSELF.
Referenced by hasNoSamples().
Data & Data::operator+= | ( | const boost::python::object & | right | ) |
References getFunctionSpace(), and isProtected().
Overloaded operator -=.
right | - Input - The right hand side. |
References binaryOp(), exclusiveWrite(), isProtected(), MAKELAZYBINSELF, and escript::SUB.
Referenced by hasNoSamples().
Data & Data::operator-= | ( | const boost::python::object & | right | ) |
References getFunctionSpace(), and isProtected().
Overloaded operator /=.
right | - Input - The right hand side. |
References binaryOp(), escript::DIV, exclusiveWrite(), isProtected(), and MAKELAZYBINSELF.
Referenced by hasNoSamples().
Data & Data::operator/= | ( | const boost::python::object & | right | ) |
References getFunctionSpace(), and isProtected().
References m_data, m_protected, and set_m_data().
Referenced by hasNoSamples().
Data Data::pos | ( | ) | const |
Return the identity of each data point of this Data object. Simply returns this object unmodified.
References copy().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
Return the given power of each data point of this Data object.
right | Input - the power to raise the object to. |
References MAKELAZYBIN, and escript::POW.
Referenced by BOOST_PYTHON_MODULE(), hasNoSamples(), powO(), and rpowO().
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. |
References getFunctionSpace(), and powD().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
void Data::print | ( | void | ) |
print the data values to stdout. Used for debugging
References getNumDataPointsPerSample(), getNumSamples(), and getSampleDataRW().
Referenced by hasNoSamples().
bool Data::probeInterpolation | ( | const FunctionSpace & | functionspace | ) | const |
Returns true if this can be interpolated to functionspace.
References getFunctionSpace(), and escript::FunctionSpace::probeInterpolation().
Referenced by escript::C_GeneralTensorProduct(), copyWithMask(), Data(), and hasNoSamples().
void Data::replaceNaN | ( | double | value | ) |
replaces all NaN values with value
References getReady(), isLazy(), escript::DataReady::replaceNaN(), and resolve().
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.
References exclusiveWrite(), and resolve().
Referenced by finley::Assemble_AverageElementData(), finley::Assemble_CopyElementData(), finley::Assemble_CopyNodalData(), finley::Assemble_getNormal(), finley::Assemble_getSize(), finley::Assemble_gradient(), finley::Assemble_interpolate(), finley::Assemble_LumpedSystem(), finley::Assemble_NodeCoordinates(), finley::Assemble_PDE_Points(), finley::Assemble_PDE_Single_1D(), finley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_C(), finley::Assemble_PDE_System_1D(), finley::Assemble_PDE_System_2D(), finley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_C(), ripley::Brick::assembleCoordinates(), speckley::Brick::assembleCoordinates(), speckley::Rectangle::assembleCoordinates(), ripley::Rectangle::assembleCoordinates(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), ripley::DefaultAssembler2D::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D::assemblePDEBoundarySingle(), ripley::DefaultAssembler2D::assemblePDEBoundarySingleReduced(), ripley::DefaultAssembler3D::assemblePDEBoundarySingleReduced(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D::assemblePDEBoundarySystemReduced(), speckley::SpeckleyDomain::assemblePDEDirac(), ripley::RipleyDomain::assemblePDEDirac(), ripley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D::assemblePDESingle(), speckley::DefaultAssembler2D::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D::assemblePDESingleReduced(), ripley::DefaultAssembler3D::assemblePDESingleReduced(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystemReduced(), ripley::DefaultAssembler3D::assemblePDESystemReduced(), ripley::RipleyDomain::averageData(), escript::C_TensorBinaryOperation(), paso::TransportProblemAdapter::copyConstraint(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), ripley::Brick::dofToNodes(), ripley::Rectangle::dofToNodes(), speckley::Brick::gradient_order10(), speckley::Rectangle::gradient_order10(), speckley::Brick::gradient_order2(), speckley::Rectangle::gradient_order2(), speckley::Brick::gradient_order3(), speckley::Rectangle::gradient_order3(), speckley::Brick::gradient_order4(), speckley::Rectangle::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::interpolateElementsOnNodes(), ripley::MultiRectangle::interpolateElementsToElementsCoarser(), ripley::MultiBrick::interpolateElementsToElementsCoarser(), ripley::MultiRectangle::interpolateElementsToElementsFiner(), ripley::MultiBrick::interpolateElementsToElementsFiner(), ripley::Brick::interpolateNodesOnElements(), speckley::Brick::interpolateNodesOnElements(), speckley::Rectangle::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::MultiRectangle::interpolateNodesToElementsFiner(), ripley::MultiBrick::interpolateNodesToElementsFiner(), ripley::MultiRectangle::interpolateNodesToNodesFiner(), ripley::MultiBrick::interpolateNodesToNodesFiner(), speckley::SpeckleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFiner(), ripley::MultiBrick::interpolateReducedToElementsFiner(), ripley::MultiRectangle::interpolateReducedToReducedFiner(), ripley::MultiBrick::interpolateReducedToReducedFiner(), ripley::RipleyDomain::multiplyData(), speckley::SpeckleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), paso::SystemMatrixAdapter::nullifyRowsAndCols(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), speckley::Rectangle::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), requireWrite(), ripley::Brick::setToNormal(), ripley::Rectangle::setToNormal(), ripley::MultiBrick::setToNormal(), ripley::Brick::setToSize(), ripley::Rectangle::setToSize(), speckley::Rectangle::setToSize(), speckley::Brick::setToSize(), ripley::MultiBrick::setToSize(), paso::TransportProblemAdapter::setToSolution(), paso::SystemMatrixAdapter::setToSolution(), and paso::SystemMatrixAdapter::ypAx().
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.
References isLazy(), m_data, and set_m_data().
Referenced by bessel(), BOOST_PYTHON_MODULE(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), escript::condEval(), copyWithMask(), dump(), eigenvalues(), eigenvalues_and_eigenvectors(), expand(), forceResolve(), get_MPIComm(), escript::MPIDataReducer::groupSend(), hasNaN(), inf(), Lsup(), matrixInverse(), replaceNaN(), requireWrite(), escript::MPIDataReducer::sendTo(), sup(), typeMatchLeft(), and typeMatchRight().
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 |
References powD().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
|
inline |
Newer style division operator for python.
Operator/ Takes LHS python::object.
References getFunctionSpace(), and truedivD().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
|
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, m_lazy, and m_shared.
Referenced by binaryOp(), checkExclusiveWrite(), copy(), Data(), delaySelf(), exclusiveWrite(), expand(), initialise(), operator=(), resolve(), setToZero(), tag(), and ~Data().
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. |
References Data(), exclusiveWrite(), getDataPointRank(), getDataPointShape(), getFunctionSpace(), escript::DataTypes::getSliceRegion(), and setSlice().
Referenced by BOOST_PYTHON_MODULE(), hasNoSamples(), and setItemO().
void Data::setItemO | ( | const boost::python::object & | key, |
const boost::python::object & | value | ||
) |
References getFunctionSpace(), and setItemD().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
void Data::setProtection | ( | ) |
switches on update protection
Member access methods.
References m_protected.
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 | ||
) |
Copy the specified slice from the given value into this Data object.
value | - Input - Data to copy from. |
region | - Input - Region to copy. |
References exclusiveWrite(), forceResolve(), getReady(), isProtected(), m_data, escript::DataReady::setSlice(), typeMatchLeft(), and typeMatchRight().
Referenced by hasNoSamples(), and setItemD().
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. ==>* |
References escript::DataVector::copyFromArray(), exclusiveWrite(), forceResolve(), escript::WrappedArray::getShape(), isConstant(), isProtected(), m_data, and tag().
Referenced by BOOST_PYTHON_MODULE(), hasNoSamples(), 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(), and hasNoSamples().
void Data::setTaggedValueFromCPP | ( | int | tagKey, |
const DataTypes::ShapeType & | pointshape, | ||
const DataTypes::ValueType & | 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 |
References exclusiveWrite(), forceResolve(), isConstant(), isProtected(), m_data, and tag().
Referenced by escript::MPIDataReducer::groupSend(), hasNoSamples(), and escript::MPIDataReducer::recvFrom().
void Data::setToZero | ( | ) |
set all values to zero
Data object operation methods and operators.
References exclusiveWrite(), getDataPointShape(), getFunctionSpace(), getNoValues(), escript::DataAbstract::getPtr(), isEmpty(), isLazy(), m_data, and set_m_data().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
void Data::setTupleForGlobalDataPoint | ( | int | id, |
int | proc, | ||
boost::python::object | |||
) |
Set the value of a global data point.
References get_MPIRank(), getDomain(), MPI_INT, MPI_MAX, MPI_SUM, setValueOfDataPoint(), and setValueOfDataPointToArray().
Referenced by BOOST_PYTHON_MODULE().
void Data::setValueOfDataPoint | ( | int | dataPointNo, |
const double | value | ||
) |
sets the values of a data-point on this process
References exclusiveWrite(), expand(), getNumDataPointsPerSample(), isExpanded(), isProtected(), and m_data.
Referenced by BOOST_PYTHON_MODULE(), and setTupleForGlobalDataPoint().
void Data::setValueOfDataPointToArray | ( | int | dataPointNo, |
const boost::python::object & | |||
) |
sets the values of a data-point from a array-like object on this process
References exclusiveWrite(), expand(), getDataPointRank(), getDataPointShape(), getNumDataPointsPerSample(), escript::WrappedArray::getRank(), escript::WrappedArray::getShape(), isExpanded(), isProtected(), and m_data.
Referenced by BOOST_PYTHON_MODULE(), setTupleForGlobalDataPoint(), and setValueOfDataPointToPyObject().
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
References setValueOfDataPointToArray().
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.
References escript::C_TensorUnaryOperation(), escript::fsign(), MAKELAZYOP, and escript::SIGN.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
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(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::sinh | ( | ) | const |
Return the sinh of each data point of this Data object.
References MAKELAZYOP, and escript::SINH.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::sqrt | ( | ) | const |
Return the square root of each data point of this Data object.
References MAKELAZYOP, and escript::SQRT.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
double 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.
References actsExpanded(), CHECK_DO_CRES, isLazy(), MPI_MAX, resolve(), and supWorker().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
double Data::sup_const | ( | ) | const |
References isLazy(), and supWorker().
Referenced by hasNoSamples(), and toString().
|
private |
References algorithm(), getDomain(), getReady(), escript::DataReady::hasNaN(), escript::makeNaN(), MPI_DOUBLE, and MPI_MAX.
Referenced by hasNoSamples(), sup(), and sup_const().
Data Data::swapaxes | ( | const int | axis0, |
const int | axis1 | ||
) | const |
swaps the components axis0 and axis1
References getDataPointRank(), getDataPointShape(), getFunctionSpace(), m_data, MAKELAZYOP2, escript::SWAP, and typeMatchRight().
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::symmetric | ( | ) | const |
Return the symmetric part of a matrix which is half the matrix plus its transpose.
References getDataPointRank(), getDataPointShape(), getFunctionSpace(), m_data, MAKELAZYOP, escript::SYM, and typeMatchRight().
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
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.
References escript::DataAbstract::getPtr(), isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), m_data, and set_m_data().
Referenced by bessel(), BOOST_PYTHON_MODULE(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), copyWithMask(), get_MPIComm(), escript::MPIDataReducer::groupSend(), escript::MPIDataReducer::recvFrom(), setTaggedValue(), setTaggedValueFromCPP(), typeMatchLeft(), and typeMatchRight().
Data Data::tan | ( | ) | const |
Return the tan of each data point of this Data object.
References MAKELAZYOP, and escript::TAN.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::tanh | ( | ) | const |
Return the tanh of each data point of this Data object.
References MAKELAZYOP, and escript::TANH.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
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(), and escript::DataReady::getVectorRO().
Referenced by BOOST_PYTHON_MODULE(), and getNoValues().
std::string Data::toString | ( | ) | const |
Write the data as a string. For large amounts of data, a summary is printed.
References escript::escriptParams, get_MPIComm(), escript::EscriptParams::getInt(), getLength(), getNumDataPoints(), inf_const(), m_data, MPI_INT, MPI_MAX, and sup_const().
Referenced by BOOST_PYTHON_MODULE(), and escript::operator<<().
Data Data::trace | ( | int | axis_offset | ) | const |
Return the trace of a matrix.
References getDataPointRank(), getDataPointShape(), getFunctionSpace(), m_data, MAKELAZYOPOFF, escript::TRACE, and typeMatchRight().
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::transpose | ( | int | axis_offset | ) | const |
Transpose each data point of this Data object around the given axis.
References getDataPointRank(), getDataPointShape(), getFunctionSpace(), m_data, MAKELAZYOPOFF, escript::TRANS, and typeMatchRight().
Referenced by BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::DataLazy::collapseToReady(), hasNoSamples(), and escript::rpow().
Newer style division operator for python.
Operator/ Takes RHS Data object.
Referenced by BOOST_PYTHON_MODULE(), hasNoSamples(), rtruedivO(), and truedivO().
|
inline |
Newer style division operator for python.
Operator/ Takes RHS python::object.
References getFunctionSpace(), and truedivD().
Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().
|
private |
Convert the data type of the RHS to match this.
right | - Input - data type to match. |
References expand(), isConstant(), isExpanded(), isLazy(), isTagged(), resolve(), and tag().
Referenced by operandCheck(), and setSlice().
|
private |
Convert the data type of this to match the RHS.
right | - Input - data type to match. |
References expand(), isConstant(), isExpanded(), isLazy(), isTagged(), resolve(), and tag().
Referenced by binaryOp(), eigenvalues(), eigenvalues_and_eigenvectors(), matrixInverse(), nonsymmetric(), operandCheck(), setSlice(), swapaxes(), symmetric(), trace(), and transpose().
|
inline |
Perform the given unary operation on every element of every data point in this Data object.
Referenced by hasNoSamples().
|
inlineprivate |
Update the Data's shared flag This indicates that the DataAbstract used by this object is now shared (or no longer shared). For internal use only.
Data Data::whereNegative | ( | ) | const |
Return a Data with a 1 for -ive values and a 0 for +ive or 0 values.
References escript::C_TensorUnaryOperation(), escript::LZ, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::whereNonNegative | ( | ) | const |
Return a Data with a 1 for +ive or 0 values and a 0 for -ive values.
References escript::C_TensorUnaryOperation(), escript::GEZ, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::whereNonPositive | ( | ) | const |
Return a Data with a 1 for -ive or 0 values and a 0 for +ive values.
References escript::C_TensorUnaryOperation(), escript::LEZ, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::whereNonZero | ( | double | tol = 0.0 | ) | const |
Return a Data with a 0 for 0 values and a 1 for +ive or -ive values.
References escript::C_TensorUnaryOperation(), MAKELAZYOPOFF, and escript::NEZ.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::wherePositive | ( | ) | const |
Return a Data with a 1 for +ive values and a 0 for 0 or -ive values.
References escript::C_TensorUnaryOperation(), escript::GZ, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
Data Data::whereZero | ( | double | tol = 0.0 | ) | const |
Return a Data with a 1 for 0 values and a 0 for +ive or -ive values.
References escript::C_TensorUnaryOperation(), escript::EZ, and MAKELAZYOPOFF.
Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().
|
friend |
|
friend |
|
friend |
Create a new Expanded Data object filled with pseudo-random data.
|
friend |
|
private |
Referenced by actsExpanded(), algorithm(), binaryOp(), borrowData(), borrowDataPtr(), borrowReadyPtr(), copy(), copySelf(), copyWithMask(), Data(), delay(), delaySelf(), dp_algorithm(), dump(), eigenvalues(), eigenvalues_and_eigenvectors(), expand(), get_MPIComm(), getDataOffset(), getDataPointRank(), getDataPointShape(), getDataPointSize(), getFunctionSpace(), getLength(), getNoValues(), getNumberOfTaggedValues(), getNumDataPointsPerSample(), getNumSamples(), getReady(), getReadyPtr(), getSampleDataByTag(), getSampleDataRO(), isConstant(), isEmpty(), isExpanded(), isReady(), isTagged(), lazyAlgWorker(), matrixInverse(), nonsymmetric(), operandCheck(), operator=(), resolve(), set_m_data(), setSlice(), setTaggedValue(), setTaggedValueFromCPP(), setToZero(), setValueOfDataPoint(), setValueOfDataPointToArray(), swapaxes(), symmetric(), tag(), toString(), trace(), and transpose().
|
private |
Referenced by isLazy(), and set_m_data().
|
private |
Referenced by Data(), isProtected(), operator=(), and setProtection().
|
mutableprivate |
Referenced by isShared(), and set_m_data().