Data represents a collection of datapoints. More...
#include <Data.h>
Public Types | |
| typedef double(* | UnaryDFunPtr )(double) |
| typedef double(* | BinaryDFunPtr )(double, double) |
Public Member Functions | |
| ESCRIPT_DLL_API | Data () |
| Default constructor. Creates a DataEmpty object. | |
| ESCRIPT_DLL_API | Data (const Data &inData) |
| Copy constructor. WARNING: Only performs a shallow copy. | |
| ESCRIPT_DLL_API | 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. | |
| ESCRIPT_DLL_API | Data (const DataTypes::ValueType &value, const DataTypes::ShapeType &shape, const FunctionSpace &what=FunctionSpace(), bool expanded=false) |
| Copy Data from an existing vector. | |
| ESCRIPT_DLL_API | 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. | |
| ESCRIPT_DLL_API | Data (const Data &inData, const DataTypes::RegionType ®ion) |
| Constructor which performs a deep copy of a region from another Data object. | |
| ESCRIPT_DLL_API | 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. | |
| ESCRIPT_DLL_API | Data (const WrappedArray &w, const FunctionSpace &what, bool expanded=false) |
| Constructor which copies data from a wrapped array. | |
| ESCRIPT_DLL_API | 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. | |
| ESCRIPT_DLL_API | 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. | |
| ESCRIPT_DLL_API | 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. | |
| ESCRIPT_DLL_API | Data (DataAbstract_ptr underlyingdata) |
| Create a Data based on the supplied DataAbstract. | |
| ESCRIPT_DLL_API | ~Data () |
| Destructor. | |
| ESCRIPT_DLL_API void | copy (const Data &other) |
| Make this object a deep copy of "other". | |
| ESCRIPT_DLL_API Data | copySelf () |
| Return a pointer to a deep copy of this object. | |
| ESCRIPT_DLL_API Data | delay () |
| produce a delayed evaluation version of this Data. | |
| ESCRIPT_DLL_API void | delaySelf () |
| convert the current data into lazy data. | |
| ESCRIPT_DLL_API void | setProtection () |
| switches on update protection | |
| ESCRIPT_DLL_API bool | isProtected () const |
| Returns true, if the data object is protected against update. | |
| ESCRIPT_DLL_API const boost::python::object | getValueOfDataPointAsTuple (int dataPointNo) |
| Return the value of a data point as a python tuple. | |
| ESCRIPT_DLL_API void | setValueOfDataPointToPyObject (int dataPointNo, const boost::python::object &py_object) |
| sets the values of a data-point from a python object on this process | |
| ESCRIPT_DLL_API void | setValueOfDataPointToArray (int dataPointNo, const boost::python::object &) |
| sets the values of a data-point from a array-like object on this process | |
| ESCRIPT_DLL_API void | setValueOfDataPoint (int dataPointNo, const double) |
| sets the values of a data-point on this process | |
| ESCRIPT_DLL_API const boost::python::object | getValueOfGlobalDataPointAsTuple (int procNo, int dataPointNo) |
| Return a data point across all processors as a python tuple. | |
| ESCRIPT_DLL_API void | setTupleForGlobalDataPoint (int id, int proc, boost::python::object) |
| Set the value of a global data point. | |
| ESCRIPT_DLL_API int | getTagNumber (int dpno) |
| Return the tag number associated with the given data-point. | |
| ESCRIPT_DLL_API escriptDataC | getDataC () |
| Return the C wrapper for the Data object. | |
| ESCRIPT_DLL_API escriptDataC | getDataC () const |
| Return the C wrapper for the Data object - const version. | |
| ESCRIPT_DLL_API std::string | toString () const |
| Write the data as a string. For large amounts of data, a summary is printed. | |
| ESCRIPT_DLL_API void | expand () |
| Whatever the current Data type make this into a DataExpanded. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API bool | isExpanded () const |
| Return true if this Data is expanded. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API bool | isTagged () const |
| Return true if this Data is tagged. | |
| ESCRIPT_DLL_API bool | isConstant () const |
| Return true if this Data is constant. | |
| ESCRIPT_DLL_API bool | isLazy () const |
| Return true if this Data is lazy. | |
| ESCRIPT_DLL_API bool | isReady () const |
| Return true if this data is ready. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API const FunctionSpace & | getFunctionSpace () const |
| Return the function space. | |
| ESCRIPT_DLL_API const FunctionSpace | getCopyOfFunctionSpace () const |
| Return a copy of the function space. | |
| ESCRIPT_DLL_API const_Domain_ptr | getDomain () const |
| Return the domain. | |
| ESCRIPT_DLL_API Domain_ptr | getDomainPython () const |
| Return the domain. TODO: For internal use only. This should be removed. | |
| ESCRIPT_DLL_API const AbstractDomain | getCopyOfDomain () const |
| Return a copy of the domain. | |
| ESCRIPT_DLL_API unsigned int | getDataPointRank () const |
| Return the rank of the point data. | |
| ESCRIPT_DLL_API int | getNumDataPoints () const |
| Return the number of data points. | |
| ESCRIPT_DLL_API int | getNumSamples () const |
| Return the number of samples. | |
| ESCRIPT_DLL_API int | getNumDataPointsPerSample () const |
| Return the number of data points per sample. | |
| ESCRIPT_DLL_API int | getNoValues () const |
| Return the number of values in the shape for this object. | |
| ESCRIPT_DLL_API void | dump (const std::string fileName) const |
| dumps the object into a netCDF file | |
| ESCRIPT_DLL_API const boost::python::object | toListOfTuples (bool scalarastuple=true) |
| returns the values of the object as a list of tuples (one for each datapoint). | |
| ESCRIPT_DLL_API const DataAbstract::ValueType::value_type * | getSampleDataRO (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. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API DataTypes::ValueType::const_reference | getDataPointRO (int sampleNo, int dataPointNo) |
| Return a reference into the DataVector which points to the specified data point. | |
| ESCRIPT_DLL_API DataTypes::ValueType::reference | getDataPointRW (int sampleNo, int dataPointNo) |
| Return a reference into the DataVector which points to the specified data point. | |
| ESCRIPT_DLL_API DataTypes::ValueType::size_type | getDataOffset (int sampleNo, int dataPointNo) |
| Return the offset for the given sample and point within the sample. | |
| ESCRIPT_DLL_API const DataTypes::ShapeType & | getDataPointShape () const |
| Return a reference to the data point shape. | |
| ESCRIPT_DLL_API const boost::python::tuple | getShapeTuple () const |
| Return the data point shape as a tuple of integers. | |
| ESCRIPT_DLL_API int | getDataPointSize () const |
| Return the size of the data point. It is the product of the data point shape dimensions. | |
| ESCRIPT_DLL_API DataTypes::ValueType::size_type | getLength () const |
| Return the number of doubles stored for this Data. | |
| ESCRIPT_DLL_API bool | hasNoSamples () const |
| Return true if this object contains no samples. This is not the same as isEmpty(). | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API void | copyWithMask (const Data &other, const Data &mask) |
| Copy other Data object into this Data object where mask is positive. | |
| ESCRIPT_DLL_API void | setToZero () |
| set all values to zero | |
| ESCRIPT_DLL_API Data | interpolate (const FunctionSpace &functionspace) const |
| Interpolates this onto the given functionspace and returns the result as a Data object. | |
| ESCRIPT_DLL_API 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) |
| ESCRIPT_DLL_API Data | interpolateFromTable2D (const WrappedArray &table, double Amin, double Astep, double undef, Data &B, double Bmin, double Bstep, bool check_boundaries) |
| ESCRIPT_DLL_API Data | interpolateFromTable1D (const WrappedArray &table, double Amin, double Astep, double undef, bool check_boundaries) |
| ESCRIPT_DLL_API 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) |
| ESCRIPT_DLL_API Data | interpolateFromTable2DP (boost::python::object table, double Amin, double Astep, Data &B, double Bmin, double Bstep, double undef, bool check_boundaries) |
| ESCRIPT_DLL_API Data | interpolateFromTable1DP (boost::python::object table, double Amin, double Astep, double undef, bool check_boundaries) |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API Data | grad () const |
| ESCRIPT_DLL_API boost::python::object | integrateToTuple_const () const |
| Calculate the integral over the function space domain as a python tuple. | |
| ESCRIPT_DLL_API boost::python::object | integrateToTuple () |
| Calculate the integral over the function space domain as a python tuple. | |
| ESCRIPT_DLL_API Data | oneOver () const |
| Returns 1./ Data object. | |
| ESCRIPT_DLL_API Data | wherePositive () const |
| Return a Data with a 1 for +ive values and a 0 for 0 or -ive values. | |
| ESCRIPT_DLL_API Data | whereNegative () const |
| Return a Data with a 1 for -ive values and a 0 for +ive or 0 values. | |
| ESCRIPT_DLL_API Data | whereNonNegative () const |
| Return a Data with a 1 for +ive or 0 values and a 0 for -ive values. | |
| ESCRIPT_DLL_API Data | whereNonPositive () const |
| Return a Data with a 1 for -ive or 0 values and a 0 for +ive values. | |
| ESCRIPT_DLL_API Data | whereZero (double tol=0.0) const |
| Return a Data with a 1 for 0 values and a 0 for +ive or -ive values. | |
| ESCRIPT_DLL_API Data | whereNonZero (double tol=0.0) const |
| Return a Data with a 0 for 0 values and a 1 for +ive or -ive values. | |
| ESCRIPT_DLL_API double | Lsup () |
| Return the maximum absolute value of this Data object. | |
| ESCRIPT_DLL_API double | Lsup_const () const |
| ESCRIPT_DLL_API double | sup () |
| Return the maximum value of this Data object. | |
| ESCRIPT_DLL_API double | sup_const () const |
| ESCRIPT_DLL_API double | inf () |
| Return the minimum value of this Data object. | |
| ESCRIPT_DLL_API double | inf_const () const |
| ESCRIPT_DLL_API Data | abs () const |
| Return the absolute value of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | maxval () const |
| Return the maximum value of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | minval () const |
| Return the minimum value of each data point of this Data object. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API Data | symmetric () const |
| Return the symmetric part of a matrix which is half the matrix plus its transpose. | |
| ESCRIPT_DLL_API Data | nonsymmetric () const |
| Return the nonsymmetric part of a matrix which is half the matrix minus its transpose. | |
| ESCRIPT_DLL_API Data | trace (int axis_offset) const |
| Return the trace of a matrix. | |
| ESCRIPT_DLL_API Data | transpose (int axis_offset) const |
| Transpose each data point of this Data object around the given axis. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API Data | swapaxes (const int axis0, const int axis1) const |
| swaps the components axis0 and axis1 | |
| ESCRIPT_DLL_API Data | erf () const |
| Return the error function erf of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | sin () const |
| Return the sin of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | cos () const |
| Return the cos of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | tan () const |
| Return the tan of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | asin () const |
| Return the asin of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | acos () const |
| Return the acos of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | atan () const |
| Return the atan of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | sinh () const |
| Return the sinh of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | cosh () const |
| Return the cosh of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | tanh () const |
| Return the tanh of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | asinh () const |
| Return the asinh of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | acosh () const |
| Return the acosh of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | atanh () const |
| Return the atanh of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | log10 () const |
| Return the log to base 10 of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | log () const |
| Return the natural log of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | exp () const |
| Return the exponential function of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | sqrt () const |
| Return the square root of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | neg () const |
| Return the negation of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | pos () const |
| Return the identity of each data point of this Data object. Simply returns this object unmodified. | |
| ESCRIPT_DLL_API Data | powD (const Data &right) const |
| Return the given power of each data point of this Data object. | |
| ESCRIPT_DLL_API Data | powO (const boost::python::object &right) const |
| Return the given power of each data point of this boost python object. | |
| ESCRIPT_DLL_API Data | rpowO (const boost::python::object &left) const |
| Return the given power of each data point of this boost python object. | |
| ESCRIPT_DLL_API void | saveDX (std::string fileName) const |
| writes the object to a file in the DX file format | |
| ESCRIPT_DLL_API void | saveVTK (std::string fileName) const |
| writes the object to a file in the VTK file format | |
| ESCRIPT_DLL_API Data & | operator+= (const Data &right) |
| Overloaded operator +=. | |
| ESCRIPT_DLL_API Data & | operator+= (const boost::python::object &right) |
| ESCRIPT_DLL_API Data & | operator= (const Data &other) |
| ESCRIPT_DLL_API Data & | operator-= (const Data &right) |
| Overloaded operator -=. | |
| ESCRIPT_DLL_API Data & | operator-= (const boost::python::object &right) |
| ESCRIPT_DLL_API Data & | operator*= (const Data &right) |
| Overloaded operator *=. | |
| ESCRIPT_DLL_API Data & | operator*= (const boost::python::object &right) |
| ESCRIPT_DLL_API Data & | operator/= (const Data &right) |
| Overloaded operator /=. | |
| ESCRIPT_DLL_API Data & | operator/= (const boost::python::object &right) |
| ESCRIPT_DLL_API Data | truedivD (const Data &right) |
| Newer style division operator for python. | |
| ESCRIPT_DLL_API Data | truedivO (const boost::python::object &right) |
| Newer style division operator for python. | |
| ESCRIPT_DLL_API Data | rtruedivO (const boost::python::object &left) |
| Newer style division operator for python. | |
| ESCRIPT_DLL_API boost::python::object | __add__ (const boost::python::object &right) |
| wrapper for python add operation | |
| ESCRIPT_DLL_API boost::python::object | __sub__ (const boost::python::object &right) |
| wrapper for python subtract operation | |
| ESCRIPT_DLL_API boost::python::object | __rsub__ (const boost::python::object &right) |
| wrapper for python reverse subtract operation | |
| ESCRIPT_DLL_API boost::python::object | __mul__ (const boost::python::object &right) |
| wrapper for python multiply operation | |
| ESCRIPT_DLL_API boost::python::object | __div__ (const boost::python::object &right) |
| wrapper for python divide operation | |
| ESCRIPT_DLL_API boost::python::object | __rdiv__ (const boost::python::object &right) |
| wrapper for python reverse divide operation | |
| ESCRIPT_DLL_API Data | matrixInverse () const |
| return inverse of matricies. | |
| ESCRIPT_DLL_API bool | probeInterpolation (const FunctionSpace &functionspace) const |
| Returns true if this can be interpolated to functionspace. | |
| ESCRIPT_DLL_API Data | getItem (const boost::python::object &key) const |
| Returns a slice from this Data object. | |
| ESCRIPT_DLL_API void | setItemD (const boost::python::object &key, const Data &value) |
| Copies slice from value into this Data object. | |
| ESCRIPT_DLL_API void | setItemO (const boost::python::object &key, const boost::python::object &value) |
| template<class UnaryFunction > | |
| ESCRIPT_DLL_API void | unaryOp2 (UnaryFunction operation) |
| Perform the given unary operation on every element of every data point in this Data object. | |
| ESCRIPT_DLL_API Data | getSlice (const DataTypes::RegionType ®ion) const |
| Return a Data object containing the specified slice of this Data object. | |
| ESCRIPT_DLL_API void | setSlice (const Data &value, const DataTypes::RegionType ®ion) |
| Copy the specified slice from the given value into this Data object. | |
| ESCRIPT_DLL_API void | print (void) |
| print the data values to stdout. Used for debugging | |
| ESCRIPT_DLL_API 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 | |
| ESCRIPT_DLL_API 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 | |
| ESCRIPT_DLL_API MPI_Comm | get_MPIComm (void) const |
| return the MPI rank number of the local data MPI_COMM_WORLD is assumed and returned. | |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API DataAbstract_ptr | borrowDataPtr (void) const |
| ESCRIPT_DLL_API DataReady_ptr | borrowReadyPtr (void) const |
| ESCRIPT_DLL_API 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. | |
| ESCRIPT_DLL_API DataTypes::ValueType::reference | getDataAtOffsetRW (DataTypes::ValueType::size_type i) |
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. | |
| 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. | |
| 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. | |
| 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. | |
| void | typeMatchLeft (Data &right) const |
| Convert the data type of the RHS to match this. | |
| void | typeMatchRight (const Data &right) |
| Convert the data type of this to match the RHS. | |
| void | initialise (const DataTypes::ValueType &value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded) |
| Construct a Data object of the appropriate type. | |
| 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. | |
| 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. | |
| void | checkExclusiveWrite () |
| checks if caller can have exclusive write to the object | |
| 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). | |
Private Attributes | |
| bool | m_protected |
| bool | m_shared |
| bool | m_lazy |
| DataAbstract_ptr | m_data |
Friends | |
| class | DataAbstract |
| class | TestDomain |
| ESCRIPT_DLL_API Data | condEval (escript::Data &mask, escript::Data &trueval, escript::Data &falseval) |
| ESCRIPT_DLL_API Data | randomData (const boost::python::tuple &shape, const FunctionSpace &what, long seed) |
| Create a new Expanded Data object filled with (not very) random data. | |
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__(), binaryOp(), 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 isLazy(), m_data, m_protected, and set_m_data().
| ESCRIPT_DLL_API escript::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. |
| Data::Data | ( | const WrappedArray & | w, | |
| const FunctionSpace & | what, | |||
| bool | expanded = false | |||
| ) |
Constructor which copies data from a wrapped array.
| 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.
| ESCRIPT_DLL_API escript::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. |
| ESCRIPT_DLL_API escript::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.
| Data::Data | ( | DataAbstract * | underlyingdata | ) | [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().
| Data::Data | ( | DataAbstract_ptr | underlyingdata | ) | [explicit] |
Create a Data based on the supplied DataAbstract.
References m_protected, and set_m_data().
| Data::~Data | ( | ) |
Destructor.
References set_m_data().
| boost::python::object Data::__add__ | ( | const boost::python::object & | right | ) |
wrapper for python add operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
| boost::python::object Data::__div__ | ( | const boost::python::object & | right | ) |
wrapper for python divide operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
| boost::python::object Data::__mul__ | ( | const boost::python::object & | right | ) |
wrapper for python multiply operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
| boost::python::object Data::__rdiv__ | ( | const boost::python::object & | right | ) |
wrapper for python reverse divide operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
| boost::python::object Data::__rsub__ | ( | const boost::python::object & | right | ) |
wrapper for python reverse subtract operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
| boost::python::object Data::__sub__ | ( | const boost::python::object & | right | ) |
wrapper for python subtract operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
| 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(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
| bool Data::actsExpanded | ( | ) | const |
Return true if this Data is expanded or resolves to expanded. That is, if it has a separate value for each datapoint in the sample.
References m_data.
Referenced by escript::condEval(), inf(), weipa::DataVar::initFromEscript(), isExpanded(), Lsup(), and sup().
| double escript::Data::algorithm | ( | BinaryFunction | operation, | |
| double | initial_value | |||
| ) | const [inline, private] |
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 EsysAssert, isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), and m_data.
Referenced by infWorker(), LsupWorker(), 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(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
| void escript::Data::binaryOp | ( | const Data & | right, | |
| BinaryFunction | operation | |||
| ) | [inline, private] |
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 Data(), EsysAssert, getDataPointRank(), getFunctionSpace(), getReady(), isConstant(), isExpanded(), isLazy(), isTagged(), m_data, operandCheck(), probeInterpolation(), set_m_data(), and typeMatchRight().
Referenced by 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 escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), and escript::C_TensorUnaryOperation().
| DataAbstract_ptr Data::borrowDataPtr | ( | void | ) | const |
References m_data.
Referenced by escript::C_GeneralTensorProduct(), escript::condEval(), and escript::DataLazy::DataLazy().
| DataReady_ptr Data::borrowReadyPtr | ( | void | ) | const |
References EsysAssert, and m_data.
Referenced by escript::DataLazy::collapseToReady().
| void Data::calc_maxGlobalDataPoint | ( | int & | ProcNo, | |
| int & | DataPointNo | |||
| ) | const [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(), and maxGlobalDataPoint().
| void Data::calc_minGlobalDataPoint | ( | int & | ProcNo, | |
| int & | DataPointNo | |||
| ) | const [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(), and minGlobalDataPoint().
| void escript::Data::checkExclusiveWrite | ( | ) | [inline, private] |
checks if caller can have exclusive write to the object
References isLazy(), and isShared().
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(), 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().
| 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(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
| 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().
| Data escript::Data::dp_algorithm | ( | BinaryFunction | operation, | |
| double | initial_value | |||
| ) | const [inline, private] |
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(), EsysAssert, getFunctionSpace(), isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), m_data, and escript::DataTypes::scalarShape.
Referenced by maxval_nonlazy(), and minval_nonlazy().
| void Data::dump | ( | const std::string | fileName | ) | const |
| 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(), and eigenvalues().
| const boost::python::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(), and eigenvalues_and_eigenvectors().
| 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(), and escript::DataLazy::collapseToReady().
| void escript::Data::exclusiveWrite | ( | ) | [inline, private] |
if another object is sharing out member data make a copy to work with instead. This code should only be called from single threaded sections of code.
References forceResolve(), isShared(), m_data, and set_m_data().
Referenced by 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(), and escript::DataLazy::collapseToReady().
| void Data::expand | ( | ) |
Whatever the current Data type make this into a DataExpanded.
References escript::DataAbstract::getPtr(), isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), m_data, resolve(), and set_m_data().
Referenced by finley::MeshAdapter::addPDEToTransportProblem(), dudley::MeshAdapter::addPDEToTransportProblem(), BOOST_PYTHON_MODULE(), escript::condEval(), copyWithMask(), escript::AbstractTransportProblem::insertConstraint(), integrateToTuple(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), finley::MeshAdapter::interpolateOnDomain(), dudley::MeshAdapter::interpolateOnDomain(), setValueOfDataPoint(), setValueOfDataPointToArray(), toListOfTuples(), typeMatchLeft(), and typeMatchRight().
| void escript::Data::forceResolve | ( | ) | [inline, private] |
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.
Referenced by calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), get_MPIRank(), get_MPISize(), getValueOfGlobalDataPointAsTuple(), 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(), 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(), and toListOfTuples().
| ESCRIPT_DLL_API const AbstractDomain escript::Data::getCopyOfDomain | ( | ) | const |
Return a copy of the domain.
| ESCRIPT_DLL_API const FunctionSpace escript::Data::getCopyOfFunctionSpace | ( | ) | const |
Return a copy of the function space.
| 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 escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), getValueOfDataPointAsTuple(), and getValueOfGlobalDataPointAsTuple().
| DataTypes::ValueType::reference Data::getDataAtOffsetRW | ( | DataTypes::ValueType::size_type | i | ) |
References checkExclusiveWrite(), escript::DataReady::getDataAtOffsetRW(), and getReady().
Referenced by escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), and escript::C_TensorUnaryOperation().
| escriptDataC Data::getDataC | ( | ) |
Return the C wrapper for the Data object.
References escriptDataC::m_dataPtr.
Referenced by finley::MeshAdapter::addPDEToLumpedSystem(), dudley::MeshAdapter::addPDEToLumpedSystem(), finley::MeshAdapter::addPDEToRHS(), dudley::MeshAdapter::addPDEToRHS(), finley::MeshAdapter::addPDEToSystem(), dudley::MeshAdapter::addPDEToSystem(), finley::MeshAdapter::addPDEToTransportProblem(), dudley::MeshAdapter::addPDEToTransportProblem(), finley::MeshAdapter::interpolateOnDomain(), dudley::MeshAdapter::interpolateOnDomain(), finley::MeshAdapter::setNewX(), dudley::MeshAdapter::setNewX(), finley::MeshAdapter::setTags(), dudley::MeshAdapter::setTags(), finley::MeshAdapter::setToGradient(), dudley::MeshAdapter::setToGradient(), finley::MeshAdapter::setToIntegrals(), dudley::MeshAdapter::setToIntegrals(), finley::MeshAdapter::setToNormal(), dudley::MeshAdapter::setToNormal(), finley::MeshAdapter::setToSize(), dudley::MeshAdapter::setToSize(), finley::MeshAdapter::setToX(), and dudley::MeshAdapter::setToX().
| escriptDataC Data::getDataC | ( | ) | const |
Return the C wrapper for the Data object - const version.
References escriptDataC::m_dataPtr.
| ESCRIPT_DLL_API DataTypes::ValueType::size_type escript::Data::getDataOffset | ( | int | sampleNo, | |
| int | dataPointNo | |||
| ) | [inline] |
Return the offset for the given sample and point within the sample.
References m_data.
Referenced by calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), getValueOfDataPointAsTuple(), and getValueOfGlobalDataPointAsTuple().
| ESCRIPT_DLL_API unsigned int escript::Data::getDataPointRank | ( | ) | const [inline] |
Return the rank of the point data.
References 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(), 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().
| 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().
| ESCRIPT_DLL_API const DataTypes::ShapeType& escript::Data::getDataPointShape | ( | ) | const [inline] |
Return a reference to the data point shape.
References m_data.
Referenced by escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), copyWithMask(), Data(), eigenvalues(), eigenvalues_and_eigenvectors(), getDataPointShape(), getItem(), getShapeTuple(), getValueOfDataPointAsTuple(), getValueOfGlobalDataPointAsTuple(), gradOn(), weipa::DataVar::initFromEscript(), escript::AbstractTransportProblem::insertConstraint(), integrateWorker(), isDataPointShapeEqual(), matrixInverse(), nonsymmetric(), 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 escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), copyWithMask(), getDataPointSize(), escript::AbstractTransportProblem::insertConstraint(), integrateWorker(), escript::AbstractTransportProblem::solve(), escript::AbstractSystemMatrix::solve(), toListOfTuples(), and escript::AbstractSystemMatrix::vectorMultiply().
| ESCRIPT_DLL_API const_Domain_ptr escript::Data::getDomain | ( | ) | const [inline] |
Return the domain.
References escript::FunctionSpace::getDomain(), and getFunctionSpace().
Referenced by Data(), grad(), gradOn(), integrateWorker(), saveDX(), saveVTK(), and setTaggedValueByName().
| ESCRIPT_DLL_API Domain_ptr escript::Data::getDomainPython | ( | ) | const [inline] |
Return the domain. TODO: For internal use only. This should be removed.
References escript::FunctionSpace::getDomainPython(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
| ESCRIPT_DLL_API const FunctionSpace& escript::Data::getFunctionSpace | ( | ) | const [inline] |
Return the function space.
References m_data.
Referenced by __add__(), __div__(), __mul__(), __rdiv__(), __rsub__(), __sub__(), binaryOp(), BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), copyWithMask(), Data(), dp_algorithm(), eigenvalues(), eigenvalues_and_eigenvectors(), getDomain(), getDomainPython(), getFunctionSpaceType(), getTagNumber(), weipa::DataVar::initFromEscript(), finley::MeshAdapter::interpolateACross(), dudley::MeshAdapter::interpolateACross(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), escript::TestDomain::interpolateOnDomain(), escript::NullDomain::interpolateOnDomain(), finley::MeshAdapter::interpolateOnDomain(), dudley::MeshAdapter::interpolateOnDomain(), matrixInverse(), nonsymmetric(), escript::operator*(), operator*=(), escript::operator+(), operator+=(), escript::operator-(), operator-=(), escript::operator/(), operator/=(), powO(), probeInterpolation(), rtruedivO(), setItemD(), setItemO(), finley::MeshAdapter::setNewX(), dudley::MeshAdapter::setNewX(), setTaggedValueByName(), escript::FunctionSpace::setTags(), escript::FunctionSpace::setTagsByString(), finley::MeshAdapter::setToGradient(), dudley::MeshAdapter::setToGradient(), finley::MeshAdapter::setToIntegrals(), dudley::MeshAdapter::setToIntegrals(), finley::MeshAdapter::setToNormal(), dudley::MeshAdapter::setToNormal(), finley::MeshAdapter::setToSize(), dudley::MeshAdapter::setToSize(), finley::MeshAdapter::setToX(), dudley::MeshAdapter::setToX(), setToZero(), escript::AbstractTransportProblem::solve(), escript::AbstractSystemMatrix::solve(), swapaxes(), symmetric(), trace(), transpose(), and truedivO().
| Data Data::getItem | ( | const boost::python::object & | key | ) | const |
Returns a slice from this Data object.
Data object slicing methods. /description Implements the [] get operator in python. Calls getSlice.
| key | - Input - python slice tuple specifying slice to return. |
References getDataPointRank(), getDataPointShape(), getSlice(), and escript::DataTypes::getSliceRegion().
Referenced by BOOST_PYTHON_MODULE().
| DataTypes::ValueType::size_type Data::getLength | ( | ) | const |
Return the number of doubles stored for this Data.
References m_data.
Referenced by getLength(), hasNoSamples(), and toString().
| ESCRIPT_DLL_API int escript::Data::getNoValues | ( | ) | const [inline] |
Return the number of values in the shape for this object.
References m_data.
Referenced by setToZero().
| ESCRIPT_DLL_API int escript::Data::getNumDataPoints | ( | ) | const [inline] |
Return the number of data points.
References getNumDataPointsPerSample(), and getNumSamples().
Referenced by BOOST_PYTHON_MODULE(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), toListOfTuples(), and toString().
| ESCRIPT_DLL_API int escript::Data::getNumDataPointsPerSample | ( | ) | const [inline] |
Return the number of data points per sample.
References m_data.
Referenced by escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), getNumDataPoints(), getNumDataPointsPerSample(), getValueOfDataPointAsTuple(), getValueOfGlobalDataPointAsTuple(), weipa::DataVar::initFromEscript(), numSamplesEqual(), print(), setValueOfDataPoint(), and setValueOfDataPointToArray().
| ESCRIPT_DLL_API int escript::Data::getNumSamples | ( | ) | const [inline] |
Return the number of samples.
References m_data.
Referenced by escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), getDataRW(), getNumDataPoints(), getValueOfDataPointAsTuple(), getValueOfGlobalDataPointAsTuple(), weipa::DataVar::initFromEscript(), numSamplesEqual(), and print().
| const DataReady * escript::Data::getReady | ( | ) | const [inline, private] |
References EsysAssert, and m_data.
Referenced by binaryOp(), escript::condEval(), copyWithMask(), getDataAtOffsetRO(), getDataAtOffsetRW(), getDataPointRO(), getDataPointRW(), getSampleDataRO(), getSampleDataRW(), escript::TestDomain::getX(), infWorker(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), LsupWorker(), setSlice(), supWorker(), and toListOfTuples().
| DataReady * escript::Data::getReady | ( | ) | [inline, private] |
References EsysAssert, and m_data.
| DataReady_ptr escript::Data::getReadyPtr | ( | ) | [inline, private] |
References EsysAssert, and m_data.
Referenced by copyWithMask(), and matrixInverse().
| const_DataReady_ptr escript::Data::getReadyPtr | ( | ) | const [inline, private] |
References EsysAssert, and m_data.
| ESCRIPT_DLL_API DataAbstract::ValueType::value_type* escript::Data::getSampleDataByTag | ( | int | tag | ) | [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 m_data.
| const DataAbstract::ValueType::value_type * escript::Data::getSampleDataRO | ( | DataAbstract::ValueType::size_type | sampleNo | ) | [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 escript::condEval(), getSampleDataRO(), getSampleDataROFast(), and weipa::DataVar::initFromEscript().
| DataAbstract::ValueType::value_type * escript::Data::getSampleDataRW | ( | DataAbstract::ValueType::size_type | sampleNo | ) | [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 getSampleDataRW(), getSampleDataRWFast(), and print().
| const boost::python::tuple Data::getShapeTuple | ( | ) | const |
Return the data point shape as a tuple of integers.
References getDataPointRank(), and getDataPointShape().
Referenced by BOOST_PYTHON_MODULE().
| Data Data::getSlice | ( | const DataTypes::RegionType & | region | ) | const |
| int Data::getTagNumber | ( | int | dpno | ) |
Return the tag number associated with the given data-point.
References getFunctionSpace(), escript::FunctionSpace::getTagFromDataPointNo(), and isEmpty().
Referenced by BOOST_PYTHON_MODULE().
| const boost::python::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 boost::python::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().
| 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(), getDomain(), escript::FunctionSpace::getDomain(), and isEmpty().
Referenced by BOOST_PYTHON_MODULE(), and grad().
| ESCRIPT_DLL_API bool escript::Data::hasNoSamples | ( | ) | const [inline] |
Return true if this object contains no samples. This is not the same as isEmpty().
References getLength().
| 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(), and resolve().
Referenced by BOOST_PYTHON_MODULE().
| double Data::inf_const | ( | ) | const |
References infWorker(), and isLazy().
Referenced by toString().
| double Data::infWorker | ( | ) | const [private] |
References algorithm(), getReady(), escript::DataReady::hasNaN(), escript::makeNaN(), MPI_COMM_WORLD, and MPI_DOUBLE.
Referenced by inf(), and inf_const().
| void Data::initialise | ( | const WrappedArray & | value, | |
| const FunctionSpace & | what, | |||
| bool | expanded | |||
| ) | [private] |
References escript::DataAbstract::getPtr(), and set_m_data().
| void Data::initialise | ( | const DataTypes::ValueType & | value, | |
| const DataTypes::ShapeType & | shape, | |||
| const FunctionSpace & | what, | |||
| bool | expanded | |||
| ) | [private] |
Construct a Data object of the appropriate type.
References escript::DataAbstract::getPtr(), and set_m_data().
Referenced by Data().
| void Data::initialise | ( | const double | value, | |
| const DataTypes::ShapeType & | shape, | |||
| const FunctionSpace & | what, | |||
| bool | expanded | |||
| ) | [private] |
References escript::DataAbstract::getPtr(), and set_m_data().
| boost::python::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().
| boost::python::object Data::integrateToTuple_const | ( | ) | const |
Calculate the integral over the function space domain as a python tuple.
References integrateWorker(), and isLazy().
| boost::python::object Data::integrateWorker | ( | ) | const [private] |
References getDataPointShape(), getDataPointSize(), getDomain(), MPI_COMM_WORLD, MPI_DOUBLE, and escript::AbstractContinuousDomain::setToIntegrals().
Referenced by 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(), interpolateFromTable2D(), and interpolateFromTable3D().
| 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, and escript::DataTypes::scalarShape.
Referenced by interpolateFromTable1DP().
| Data Data::interpolateFromTable1DP | ( | boost::python::object | table, | |
| double | Amin, | |||
| double | Astep, | |||
| double | undef, | |||
| bool | check_boundaries | |||
| ) |
References interpolateFromTable1D().
Referenced by BOOST_PYTHON_MODULE().
| 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, and escript::DataTypes::scalarShape.
Referenced by 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().
| 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, nz, and escript::DataTypes::scalarShape.
Referenced by 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().
| bool Data::isConstant | ( | ) | const |
Return true if this Data is constant.
References m_data.
Referenced by algorithm(), binaryOp(), BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), copyWithMask(), Data(), dp_algorithm(), expand(), weipa::DataVar::initFromEscript(), setTaggedValue(), setTaggedValueFromCPP(), tag(), typeMatchLeft(), and typeMatchRight().
| 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(), algorithm(), BOOST_PYTHON_MODULE(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), copyWithMask(), Data(), dp_algorithm(), expand(), getNumDataPointsPerSample(), getSampleDataRO(), getSampleDataRW(), getTagNumber(), grad(), gradOn(), escript::AbstractTransportProblem::insertConstraint(), isDataPointShapeEqual(), isEmpty(), isExpanded(), numSamplesEqual(), saveDX(), saveVTK(), setToZero(), and tag().
| bool Data::isExpanded | ( | ) | const |
Return true if this Data is expanded.
References m_data.
Referenced by algorithm(), binaryOp(), BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), copyWithMask(), dp_algorithm(), expand(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), setValueOfDataPoint(), setValueOfDataPointToArray(), tag(), typeMatchLeft(), and typeMatchRight().
| bool Data::isLazy | ( | ) | const |
Return true if this Data is lazy.
References m_lazy.
Referenced by algorithm(), 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(), getSampleDataRW(), inf(), inf_const(), integrateToTuple(), integrateToTuple_const(), Lsup(), Lsup_const(), matrixInverse(), resolve(), saveDX(), saveVTK(), 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().
| bool escript::Data::isShared | ( | ) | const [inline, private] |
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(), binaryOp(), BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), copyWithMask(), dp_algorithm(), expand(), tag(), typeMatchLeft(), and typeMatchRight().
| double Data::lazyAlgWorker | ( | double | init | ) | [private] |
| 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(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
| 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(), and resolve().
Referenced by BOOST_PYTHON_MODULE().
| double Data::Lsup_const | ( | ) | const |
References isLazy(), and LsupWorker().
| double Data::LsupWorker | ( | ) | const [private] |
References algorithm(), getReady(), escript::DataReady::hasNaN(), escript::makeNaN(), MPI_COMM_WORLD, and MPI_DOUBLE.
Referenced by 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, resolve(), and typeMatchRight().
Referenced by BOOST_PYTHON_MODULE(), and matrixInverse().
| const boost::python::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().
| 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().
| Data Data::maxval_nonlazy | ( | ) | const [inline, private] |
References dp_algorithm().
Referenced by calc_maxGlobalDataPoint(), and maxval().
| const boost::python::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().
| 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(), and escript::DataLazy::collapseToReady().
| Data Data::minval_nonlazy | ( | ) | const [inline, private] |
References dp_algorithm().
Referenced by calc_minGlobalDataPoint(), 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(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
| Data Data::oneOver | ( | ) | const |
Returns 1./ Data object.
References escript::C_TensorUnaryOperation(), MAKELAZYOP, and escript::RECIP.
Referenced by escript::DataLazy::collapseToReady().
| void escript::Data::operandCheck | ( | const Data & | right | ) | const [inline, private] |
Check *this and the right operand are compatible. Throws an exception if they aren't.
| right | - Input - The right hand side. |
References m_data.
Referenced by binaryOp().
| 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::MUL.
Overloaded operator +=.
| right | - Input - The right hand side. |
References escript::ADD, binaryOp(), exclusiveWrite(), isProtected(), and MAKELAZYBINSELF.
| Data & Data::operator+= | ( | const boost::python::object & | right | ) |
References getFunctionSpace(), and isProtected().
| 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.
| 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.
References m_data, m_protected, and set_m_data().
| 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().
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(), 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().
| void Data::print | ( | void | ) |
print the data values to stdout. Used for debugging
References getNumDataPointsPerSample(), getNumSamples(), and getSampleDataRW().
| bool Data::probeInterpolation | ( | const FunctionSpace & | functionspace | ) | const |
Returns true if this can be interpolated to functionspace.
References getFunctionSpace(), and escript::FunctionSpace::probeInterpolation().
Referenced by binaryOp(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), copyWithMask(), and Data().
| 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 escript::C_TensorBinaryOperation().
| 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 BOOST_PYTHON_MODULE(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), escript::condEval(), copyWithMask(), dump(), eigenvalues(), eigenvalues_and_eigenvectors(), expand(), forceResolve(), inf(), Lsup(), matrixInverse(), requireWrite(), saveDX(), saveVTK(), 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().
| Data escript::Data::rtruedivO | ( | const boost::python::object & | left | ) | [inline] |
Newer style division operator for python.
Operator/ Takes LHS python::object.
References getFunctionSpace(), and truedivD().
Referenced by BOOST_PYTHON_MODULE().
| void Data::saveDX | ( | std::string | fileName | ) | const |
writes the object to a file in the DX file format
References getDomain(), isEmpty(), isLazy(), resolve(), and saveDX().
Referenced by BOOST_PYTHON_MODULE(), and saveDX().
| void Data::saveVTK | ( | std::string | fileName | ) | const |
writes the object to a file in the VTK file format
References getDomain(), isEmpty(), isLazy(), resolve(), and saveVTK().
Referenced by BOOST_PYTHON_MODULE(), and saveVTK().
| void Data::set_m_data | ( | DataAbstract_ptr | p | ) | [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(), 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(), and setItemO().
| void Data::setItemO | ( | const boost::python::object & | key, | |
| const boost::python::object & | value | |||
| ) |
References getFunctionSpace(), and setItemD().
Referenced by BOOST_PYTHON_MODULE().
| 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 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(), and setTaggedValueByName().
| void Data::setTaggedValueByName | ( | std::string | name, | |
| const boost::python::object & | value | |||
| ) |
Assign the given value to the tag assocciated with name. Implicitly converts this object to type DataTagged. Throws an exception if this object cannot be converted to a DataTagged object or name cannot be mapped onto a tag key.
| name | - Input - name of tag. | |
| value | - Input - Value to associate with given key. |
References exclusiveWrite(), forceResolve(), escript::FunctionSpace::getDomain(), getDomain(), getFunctionSpace(), and setTaggedValue().
Referenced by BOOST_PYTHON_MODULE().
| void Data::setTaggedValueFromCPP | ( | int | tagKey, | |
| const DataTypes::ShapeType & | pointshape, | |||
| const DataTypes::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().
| 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().
| void Data::setTupleForGlobalDataPoint | ( | int | id, | |
| int | proc, | |||
| boost::python::object | v | |||
| ) |
Set the value of a global data point.
References get_MPIRank(), setValueOfDataPoint(), and setValueOfDataPointToArray().
| 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 & | obj | |||
| ) |
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(), and escript::DataLazy::collapseToReady().
| Data Data::sin | ( | ) | const |
Return the sin of each data point of this Data object.
References MAKELAZYOP, and escript::SIN.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
| Data Data::sinh | ( | ) | const |
Return the sinh of each data point of this Data object.
References MAKELAZYOP, and escript::SINH.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
| Data Data::sqrt | ( | ) | const |
Return the square root of each data point of this Data object.
References MAKELAZYOP, and escript::SQRT.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
| 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(), resolve(), and supWorker().
Referenced by BOOST_PYTHON_MODULE().
| double Data::sup_const | ( | ) | const |
References isLazy(), and supWorker().
Referenced by toString().
| double Data::supWorker | ( | ) | const [private] |
References algorithm(), getReady(), escript::DataReady::hasNaN(), escript::makeNaN(), MPI_COMM_WORLD, and MPI_DOUBLE.
Referenced by 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(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
| void Data::tag | ( | ) |
If possible convert this Data to DataTagged. This will only allow Constant data to be converted to tagged. An attempt to convert Expanded data to tagged will throw an exception.
References escript::DataAbstract::getPtr(), isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), m_data, and set_m_data().
Referenced by BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), copyWithMask(), 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(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
| const boost::python::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().
| 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, 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(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
Newer style division operator for python.
Operator/ Takes RHS Data object.
Referenced by BOOST_PYTHON_MODULE(), rtruedivO(), and truedivO().
| Data escript::Data::truedivO | ( | const boost::python::object & | right | ) | [inline] |
Newer style division operator for python.
Operator/ Takes RHS python::object.
References getFunctionSpace(), and truedivD().
Referenced by BOOST_PYTHON_MODULE().
| void Data::typeMatchLeft | ( | Data & | right | ) | const [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 setSlice().
| void Data::typeMatchRight | ( | const Data & | right | ) | [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(), setSlice(), swapaxes(), symmetric(), trace(), and transpose().
| ESCRIPT_DLL_API void escript::Data::unaryOp2 | ( | UnaryFunction | operation | ) | [inline] |
Perform the given unary operation on every element of every data point in this Data object.
| void escript::Data::updateShareStatus | ( | bool | nowshared | ) | const [inline, private] |
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.
References m_shared.
| 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(), and escript::DataLazy::collapseToReady().
| Data Data::whereNonNegative | ( | ) | const |
Return a Data with a 1 for +ive or 0 values and a 0 for -ive values.
References escript::C_TensorUnaryOperation(), escript::GEZ, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
| Data Data::whereNonPositive | ( | ) | const |
Return a Data with a 1 for -ive or 0 values and a 0 for +ive values.
References escript::C_TensorUnaryOperation(), escript::LEZ, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
| Data Data::wherePositive | ( | ) | const |
Return a Data with a 1 for +ive values and a 0 for 0 or -ive values.
References escript::C_TensorUnaryOperation(), escript::GZ, and MAKELAZYOP.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataLazy::collapseToReady().
| 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(), and escript::DataLazy::collapseToReady().
| ESCRIPT_DLL_API Data condEval | ( | escript::Data & | mask, | |
| escript::Data & | trueval, | |||
| escript::Data & | falseval | |||
| ) | [friend] |
friend class DataAbstract [friend] |
| ESCRIPT_DLL_API Data randomData | ( | const boost::python::tuple & | shape, | |
| const FunctionSpace & | what, | |||
| long | seed | |||
| ) | [friend] |
Create a new Expanded Data object filled with (not very) random data.
friend class TestDomain [friend] |
DataAbstract_ptr escript::Data::m_data [private] |
Referenced by actsExpanded(), algorithm(), binaryOp(), borrowData(), borrowDataPtr(), borrowReadyPtr(), copy(), copySelf(), copyWithMask(), Data(), delay(), delaySelf(), dp_algorithm(), dump(), eigenvalues(), eigenvalues_and_eigenvectors(), exclusiveWrite(), expand(), getDataOffset(), getDataPointRank(), getDataPointShape(), getDataPointSize(), getFunctionSpace(), getLength(), getNoValues(), getNumDataPointsPerSample(), getNumSamples(), getReady(), getReadyPtr(), getSampleDataByTag(), getSampleDataRO(), isConstant(), isEmpty(), isExpanded(), isReady(), isTagged(), matrixInverse(), nonsymmetric(), operandCheck(), operator=(), escript::randomData(), resolve(), set_m_data(), setSlice(), setTaggedValue(), setTaggedValueFromCPP(), setToZero(), setValueOfDataPoint(), setValueOfDataPointToArray(), swapaxes(), symmetric(), tag(), toString(), trace(), and transpose().
bool escript::Data::m_lazy [private] |
Referenced by isLazy(), and set_m_data().
bool escript::Data::m_protected [private] |
Referenced by Data(), isProtected(), operator=(), and setProtection().
bool escript::Data::m_shared [mutable, private] |
Referenced by isShared(), set_m_data(), and updateShareStatus().
1.7.1