escript
Revision_
|
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. | |
Data (const Data &inData) | |
Copy constructor. WARNING: Only performs a shallow copy. | |
Data (const Data &inData, const FunctionSpace &what) | |
Constructor from another Data object. If "what" is different from the function space of inData the inData are tried to be interpolated to what, otherwise a shallow copy of inData is returned. | |
Data (const DataTypes::ValueType &value, const DataTypes::ShapeType &shape, const FunctionSpace &what=FunctionSpace(), bool expanded=false) | |
Copy Data from an existing vector. | |
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. | |
Data (const Data &inData, const DataTypes::RegionType ®ion) | |
Constructor which performs a deep copy of a region from another Data object. | |
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. | |
Data (const WrappedArray &w, const FunctionSpace &what, bool expanded=false) | |
Constructor which copies data from a wrapped array. | |
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. | |
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 (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. | |
Data (DataAbstract_ptr underlyingdata) | |
Create a Data based on the supplied DataAbstract. | |
~Data () | |
Destructor. | |
void | copy (const Data &other) |
Make this object a deep copy of "other". | |
Data | copySelf () |
Return a pointer to a deep copy of this object. | |
Data | delay () |
produce a delayed evaluation version of this Data. | |
void | delaySelf () |
convert the current data into lazy data. | |
void | setProtection () |
switches on update protection | |
bool | isProtected () const |
Returns true, if the data object is protected against update. | |
const boost::python::object | getValueOfDataPointAsTuple (int dataPointNo) |
Return the value of a data point as a python tuple. | |
void | setValueOfDataPointToPyObject (int dataPointNo, const boost::python::object &py_object) |
sets the values of a data-point from a python object on this process | |
void | setValueOfDataPointToArray (int dataPointNo, const boost::python::object &) |
sets the values of a data-point from a array-like object on this process | |
void | setValueOfDataPoint (int dataPointNo, const double) |
sets the values of a data-point on this process | |
const boost::python::object | getValueOfGlobalDataPointAsTuple (int procNo, int dataPointNo) |
Return a data point across all processors as a python tuple. | |
void | setTupleForGlobalDataPoint (int id, int proc, boost::python::object) |
Set the value of a global data point. | |
int | getTagNumber (int dpno) |
Return the tag number associated with the given data-point. | |
escriptDataC | getDataC () |
Return the C wrapper for the Data object. | |
escriptDataC | getDataC () const |
Return the C wrapper for the Data object - const version. | |
std::string | toString () const |
Write the data as a string. For large amounts of data, a summary is printed. | |
void | expand () |
Whatever the current Data type make this into a DataExpanded. | |
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. | |
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. | |
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. | |
bool | isExpanded () const |
Return true if this Data is expanded. | |
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. | |
bool | isTagged () const |
Return true if this Data is tagged. | |
bool | isConstant () const |
Return true if this Data is constant. | |
bool | isLazy () const |
Return true if this Data is lazy. | |
bool | isReady () const |
Return true if this data is ready. | |
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. | |
const FunctionSpace & | getFunctionSpace () const |
Return the function space. | |
const_Domain_ptr | getDomain () const |
Return the domain. | |
Domain_ptr | getDomainPython () const |
Return the domain. TODO: For internal use only. This should be removed. | |
unsigned int | getDataPointRank () const |
Return the rank of the point data. | |
int | getNumDataPoints () const |
Return the number of data points. | |
int | getNumSamples () const |
Return the number of samples. | |
int | getNumDataPointsPerSample () const |
Return the number of data points per sample. | |
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. | |
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. | |
int | getNoValues () const |
Return the number of values in the shape for this object. | |
void | dump (const std::string fileName) const |
dumps the object into a netCDF file | |
const boost::python::object | toListOfTuples (bool scalarastuple=true) |
returns the values of the object as a list of tuples (one for each datapoint). | |
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. | |
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. | |
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. | |
DataTypes::ValueType::const_reference | getDataPointRO (int sampleNo, int dataPointNo) |
Return a reference into the DataVector which points to the specified data point. | |
DataTypes::ValueType::reference | getDataPointRW (int sampleNo, int dataPointNo) |
Return a reference into the DataVector which points to the specified data point. | |
DataTypes::ValueType::size_type | getDataOffset (int sampleNo, int dataPointNo) |
Return the offset for the given sample and point within the sample. | |
const DataTypes::ShapeType & | getDataPointShape () const |
Return a reference to the data point shape. | |
const boost::python::tuple | getShapeTuple () const |
Return the data point shape as a tuple of integers. | |
int | getDataPointSize () const |
Return the size of the data point. It is the product of the data point shape dimensions. | |
DataTypes::ValueType::size_type | getLength () const |
Return the number of doubles stored for this Data. | |
bool | hasNoSamples () const |
Return true if this object contains no samples. This is not the same as isEmpty() | |
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. | |
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. | |
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. | |
void | copyWithMask (const Data &other, const Data &mask) |
Copy other Data object into this Data object where mask is positive. | |
void | setToZero () |
set all values to zero | |
Data | interpolate (const FunctionSpace &functionspace) const |
Interpolates this onto the given functionspace and returns the result as a Data object. | |
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. | |
Data | grad () const |
boost::python::object | integrateToTuple_const () const |
Calculate the integral over the function space domain as a python tuple. | |
boost::python::object | integrateToTuple () |
Calculate the integral over the function space domain as a python tuple. | |
Data | oneOver () const |
Returns 1./ Data object. | |
Data | wherePositive () const |
Return a Data with a 1 for +ive values and a 0 for 0 or -ive values. | |
Data | whereNegative () const |
Return a Data with a 1 for -ive values and a 0 for +ive or 0 values. | |
Data | whereNonNegative () const |
Return a Data with a 1 for +ive or 0 values and a 0 for -ive values. | |
Data | whereNonPositive () const |
Return a Data with a 1 for -ive or 0 values and a 0 for +ive values. | |
Data | whereZero (double tol=0.0) const |
Return a Data with a 1 for 0 values and a 0 for +ive or -ive values. | |
Data | whereNonZero (double tol=0.0) const |
Return a Data with a 0 for 0 values and a 1 for +ive or -ive values. | |
double | Lsup () |
Return the maximum absolute value of this Data object. | |
double | Lsup_const () const |
double | sup () |
Return the maximum value of this Data object. | |
double | sup_const () const |
double | inf () |
Return the minimum value of this Data object. | |
double | inf_const () const |
Data | abs () const |
Return the absolute value of each data point of this Data object. | |
Data | maxval () const |
Return the maximum value of each data point of this Data object. | |
Data | minval () const |
Return the minimum value of each data point of this Data object. | |
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. | |
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. | |
Data | sign () const |
Return the sign of each data point of this Data object. | |
Data | symmetric () const |
Return the symmetric part of a matrix which is half the matrix plus its transpose. | |
Data | nonsymmetric () const |
Return the nonsymmetric part of a matrix which is half the matrix minus its transpose. | |
Data | trace (int axis_offset) const |
Return the trace of a matrix. | |
Data | transpose (int axis_offset) const |
Transpose each data point of this Data object around the given axis. | |
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. | |
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. | |
Data | swapaxes (const int axis0, const int axis1) const |
swaps the components axis0 and axis1 | |
Data | erf () const |
Return the error function erf of each data point of this Data object. | |
Data | sin () const |
Return the sin of each data point of this Data object. | |
Data | cos () const |
Return the cos of each data point of this Data object. | |
Data | tan () const |
Return the tan of each data point of this Data object. | |
Data | asin () const |
Return the asin of each data point of this Data object. | |
Data | acos () const |
Return the acos of each data point of this Data object. | |
Data | atan () const |
Return the atan of each data point of this Data object. | |
Data | sinh () const |
Return the sinh of each data point of this Data object. | |
Data | cosh () const |
Return the cosh of each data point of this Data object. | |
Data | tanh () const |
Return the tanh of each data point of this Data object. | |
Data | asinh () const |
Return the asinh of each data point of this Data object. | |
Data | acosh () const |
Return the acosh of each data point of this Data object. | |
Data | atanh () const |
Return the atanh of each data point of this Data object. | |
Data | log10 () const |
Return the log to base 10 of each data point of this Data object. | |
Data | log () const |
Return the natural log of each data point of this Data object. | |
Data | exp () const |
Return the exponential function of each data point of this Data object. | |
Data | sqrt () const |
Return the square root of each data point of this Data object. | |
Data | neg () const |
Return the negation of each data point of this Data object. | |
Data | pos () const |
Return the identity of each data point of this Data object. Simply returns this object unmodified. | |
Data | powD (const Data &right) const |
Return the given power of each data point of this Data object. | |
Data | powO (const boost::python::object &right) const |
Return the given power of each data point of this boost python object. | |
Data | rpowO (const boost::python::object &left) const |
Return the given power of each data point of this boost python object. | |
Data & | operator+= (const Data &right) |
Overloaded operator +=. | |
Data & | operator+= (const boost::python::object &right) |
Data & | operator= (const Data &other) |
Data & | operator-= (const Data &right) |
Overloaded operator -=. | |
Data & | operator-= (const boost::python::object &right) |
Data & | operator*= (const Data &right) |
Overloaded operator *=. | |
Data & | operator*= (const boost::python::object &right) |
Data & | operator/= (const Data &right) |
Overloaded operator /=. | |
Data & | operator/= (const boost::python::object &right) |
Data | truedivD (const Data &right) |
Newer style division operator for python. | |
Data | truedivO (const boost::python::object &right) |
Newer style division operator for python. | |
Data | rtruedivO (const boost::python::object &left) |
Newer style division operator for python. | |
boost::python::object | __add__ (const boost::python::object &right) |
wrapper for python add operation | |
boost::python::object | __sub__ (const boost::python::object &right) |
wrapper for python subtract operation | |
boost::python::object | __rsub__ (const boost::python::object &right) |
wrapper for python reverse subtract operation | |
boost::python::object | __mul__ (const boost::python::object &right) |
wrapper for python multiply operation | |
boost::python::object | __div__ (const boost::python::object &right) |
wrapper for python divide operation | |
boost::python::object | __rdiv__ (const boost::python::object &right) |
wrapper for python reverse divide operation | |
Data | matrixInverse () const |
return inverse of matricies. | |
bool | probeInterpolation (const FunctionSpace &functionspace) const |
Returns true if this can be interpolated to functionspace. | |
Data | getItem (const boost::python::object &key) const |
Returns a slice from this Data object. | |
void | setItemD (const boost::python::object &key, const Data &value) |
Copies slice from value into this Data object. | |
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. | |
Data | getSlice (const DataTypes::RegionType ®ion) const |
Return a Data object containing the specified slice of this Data object. | |
void | setSlice (const Data &value, const DataTypes::RegionType ®ion) |
Copy the specified slice from the given value into this Data object. | |
void | print (void) |
print the data values to stdout. Used for debugging | |
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 | |
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 | |
MPI_Comm | get_MPIComm (void) const |
return the MPI rank number of the local data MPI_COMM_WORLD is assumed and returned. | |
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. | |
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. | |
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. | |
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 |
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. |
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 escript::DataAbstract::getSlice(), isLazy(), m_data, m_protected, and set_m_data().
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.
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.
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::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().
bp::object Data::__add__ | ( | const boost::python::object & | right | ) |
wrapper for python add operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
bp::object Data::__div__ | ( | const boost::python::object & | right | ) |
wrapper for python divide operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
bp::object Data::__mul__ | ( | const boost::python::object & | right | ) |
wrapper for python multiply operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
bp::object Data::__rdiv__ | ( | const boost::python::object & | right | ) |
wrapper for python reverse divide operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
bp::object Data::__rsub__ | ( | const boost::python::object & | right | ) |
wrapper for python reverse subtract operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
bp::object Data::__sub__ | ( | const boost::python::object & | right | ) |
wrapper for python subtract operation
References Data(), and getFunctionSpace().
Referenced by BOOST_PYTHON_MODULE().
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 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(), ripley::Rectangle::assembleIntegrate(), finley::AssembleParameters::AssembleParameters(), ripley::DefaultAssembler2D::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D::assemblePDEBoundarySingle(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D::assemblePDESingle(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D::assemblePDESystem(), escript::condEval(), inf(), weipa::DataVar::initFromEscript(), ripley::RipleyDomain::interpolateOnDomain(), isExpanded(), Lsup(), escript::saveDataCSV(), finley::ElementFile::setTags(), 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(), 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 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(), escript::C_TensorUnaryOperation(), escript::load(), and escript::resolveGroup().
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(), escript::condEval(), 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().
void Data::copyWithMask | ( | const Data & | other, |
const Data & | mask | ||
) |
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(), and paso::TransportProblemAdapter::copyConstraint().
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 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(), and eigenvalues_and_eigenvectors().
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().
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 dudley::MeshAdapter::addPDEToTransportProblem(), finley::MeshAdapter::addPDEToTransportProblem(), BOOST_PYTHON_MODULE(), escript::condEval(), paso::TransportProblemAdapter::copyConstraint(), copyWithMask(), getExpandedVectorReference(), escript::AbstractTransportProblem::insertConstraint(), integrateToTuple(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), dudley::MeshAdapter::interpolateOnDomain(), finley::MeshAdapter::interpolateOnDomain(), nonuniforminterp(), nonuniformslope(), paso::SystemMatrixAdapter::nullifyRowsAndCols(), paso::TransportProblemAdapter::setToSolution(), paso::SystemMatrixAdapter::setToSolution(), setValueOfDataPoint(), setValueOfDataPointToArray(), toListOfTuples(), typeMatchLeft(), typeMatchRight(), and paso::SystemMatrixAdapter::ypAx().
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.
References MPI_COMM_WORLD.
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().
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().
Return the C wrapper for the Data object.
References escriptDataC::m_dataPtr.
Referenced by dudley::MeshAdapter::addPDEToLumpedSystem(), dudley::MeshAdapter::addPDEToRHS(), dudley::MeshAdapter::addPDEToSystem(), dudley::MeshAdapter::addPDEToTransportProblem(), ripley::Brick::assembleCoordinates(), ripley::Rectangle::assembleCoordinates(), dudley::MeshAdapter::interpolateOnDomain(), dudley::MeshAdapter::setNewX(), dudley::MeshAdapter::setTags(), dudley::MeshAdapter::setToGradient(), dudley::MeshAdapter::setToIntegrals(), dudley::MeshAdapter::setToNormal(), dudley::MeshAdapter::setToSize(), and dudley::MeshAdapter::setToX().
escriptDataC Data::getDataC | ( | ) | const |
Return the C wrapper for the Data object - const version.
References escriptDataC::m_dataPtr.
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(), getValueOfGlobalDataPointAsTuple(), and escript::load().
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(), 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().
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().
const DataTypes::ShapeType& escript::Data::getDataPointShape | ( | ) | const [inline] |
Return a reference to the data point shape.
References m_data.
Referenced by finley::Assemble_LumpedSystem(), finley::Assemble_NodeCoordinates(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), paso::TransportProblemAdapter::copyConstraint(), 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 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(), ripley::RipleyDomain::assemblePDE(), ripley::RipleyDomain::assemblePDEBoundary(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D::assemblePDEBoundarySystemReduced(), ripley::RipleyDomain::assemblePDEDirac(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystemReduced(), ripley::DefaultAssembler3D::assemblePDESystemReduced(), ripley::RipleyDomain::averageData(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), paso::TransportProblemAdapter::copyConstraint(), ripley::RipleyDomain::copyData(), copyWithMask(), ripley::Brick::dofToNodes(), ripley::Rectangle::dofToNodes(), getDataPointSize(), escript::AbstractTransportProblem::insertConstraint(), integrateWorker(), ripley::Brick::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::RipleyDomain::interpolateOnDomain(), ripley::RipleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), paso::SystemMatrixAdapter::nullifyRowsAndCols(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), ripley::Rectangle::readNcGrid(), ripley::Brick::readNcGrid(), finley::NodeFile::setCoordinates(), finley::NodeFile::setTags(), finley::ElementFile::setTags(), paso::TransportProblemAdapter::setToSolution(), paso::SystemMatrixAdapter::setToSolution(), escript::AbstractTransportProblem::solve(), escript::AbstractSystemMatrix::solve(), toListOfTuples(), escript::AbstractSystemMatrix::vectorMultiply(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), and paso::SystemMatrixAdapter::ypAx().
const_Domain_ptr escript::Data::getDomain | ( | ) | const [inline] |
Return the domain.
References escript::FunctionSpace::getDomain(), and getFunctionSpace().
Referenced by Data(), grad(), gradOn(), integrateWorker(), and setTaggedValueByName().
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().
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::TestDomain::randomFill(), dudley::MeshAdapter::randomFill(), finley::MeshAdapter::randomFill(), ripley::Brick::randomFillWorker(), and ripley::Rectangle::randomFillWorker().
const FunctionSpace& escript::Data::getFunctionSpace | ( | ) | const [inline] |
Return the function space.
References 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(), ripley::Rectangle::assembleGradient(), ripley::Brick::assembleIntegrate(), ripley::Rectangle::assembleIntegrate(), binaryOp(), BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), paso::TransportProblemAdapter::copyConstraint(), copyWithMask(), Data(), dp_algorithm(), eigenvalues(), eigenvalues_and_eigenvectors(), getDomain(), getDomainPython(), getFunctionSpaceType(), getTagNumber(), finley::util::hasReducedIntegrationOrder(), weipa::DataVar::initFromEscript(), dudley::MeshAdapter::interpolateACross(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), escript::NullDomain::interpolateOnDomain(), escript::TestDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), dudley::MeshAdapter::interpolateOnDomain(), finley::MeshAdapter::interpolateOnDomain(), matrixInverse(), nonsymmetric(), nonuniforminterp(), nonuniformslope(), paso::SystemMatrixAdapter::nullifyRowsAndCols(), powO(), probeInterpolation(), ripley::Rectangle::randomFill(), ripley::Brick::randomFill(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), ripley::Rectangle::readNcGrid(), ripley::Brick::readNcGrid(), rtruedivO(), setItemD(), setItemO(), dudley::MeshAdapter::setNewX(), finley::MeshAdapter::setNewX(), setTaggedValueByName(), escript::FunctionSpace::setTags(), escript::FunctionSpace::setTagsByString(), ripley::RipleyDomain::setToGradient(), dudley::MeshAdapter::setToGradient(), finley::MeshAdapter::setToGradient(), dudley::MeshAdapter::setToIntegrals(), ripley::RipleyDomain::setToIntegrals(), finley::MeshAdapter::setToIntegrals(), ripley::Rectangle::setToNormal(), ripley::Brick::setToNormal(), dudley::MeshAdapter::setToNormal(), finley::MeshAdapter::setToNormal(), ripley::Rectangle::setToSize(), ripley::Brick::setToSize(), dudley::MeshAdapter::setToSize(), finley::MeshAdapter::setToSize(), paso::TransportProblemAdapter::setToSolution(), paso::SystemMatrixAdapter::setToSolution(), ripley::RipleyDomain::setToX(), dudley::MeshAdapter::setToX(), finley::MeshAdapter::setToX(), setToZero(), escript::AbstractTransportProblem::solve(), escript::AbstractSystemMatrix::solve(), swapaxes(), symmetric(), trace(), transpose(), truedivO(), ripley::Brick::writeBinaryGridImpl(), ripley::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().
Return the number of doubles stored for this Data.
References m_data.
Referenced by getLength(), hasNoSamples(), and toString().
int escript::Data::getNoValues | ( | ) | const [inline] |
Return the number of values in the shape for this object.
References m_data.
Referenced by setToZero().
int escript::Data::getNumDataPoints | ( | ) | const [inline] |
Return the number of data points.
References getNumDataPointsPerSample(), and getNumSamples().
Referenced by BOOST_PYTHON_MODULE(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), nonuniforminterp(), nonuniformslope(), toListOfTuples(), and toString().
int escript::Data::getNumDataPointsPerSample | ( | ) | const [inline] |
Return the number of data points per sample.
References m_data.
Referenced by ripley::RipleyDomain::averageData(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), getNumDataPoints(), getNumDataPointsPerSample(), getValueOfDataPointAsTuple(), getValueOfGlobalDataPointAsTuple(), weipa::DataVar::initFromEscript(), ripley::RipleyDomain::multiplyData(), numSamplesEqual(), print(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), ripley::Rectangle::readNcGrid(), ripley::Brick::readNcGrid(), finley::NodeFile::setCoordinates(), finley::NodeFile::setTags(), finley::ElementFile::setTags(), ripley::Rectangle::setToSize(), ripley::Brick::setToSize(), setValueOfDataPoint(), setValueOfDataPointToArray(), ripley::Brick::writeBinaryGridImpl(), and ripley::Rectangle::writeBinaryGridImpl().
int escript::Data::getNumSamples | ( | ) | const [inline] |
Return the number of samples.
References m_data.
Referenced by ripley::RipleyDomain::averageData(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), ripley::RipleyDomain::copyData(), getDataRW(), getNumDataPoints(), getValueOfDataPointAsTuple(), getValueOfGlobalDataPointAsTuple(), weipa::DataVar::initFromEscript(), ripley::RipleyDomain::multiplyData(), numSamplesEqual(), print(), finley::NodeFile::setCoordinates(), finley::NodeFile::setTags(), and finley::ElementFile::setTags().
const DataReady * escript::Data::getReady | ( | ) | const [inline, private] |
References EsysAssert, and m_data.
Referenced by binaryOp(), escript::condEval(), copyWithMask(), getDataAtOffsetRO(), getDataAtOffsetRW(), getDataPointRO(), getDataPointRW(), getExpandedVectorReference(), getSampleDataRO(), getSampleDataRW(), escript::TestDomain::getX(), infWorker(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), LsupWorker(), nonuniforminterp(), nonuniformslope(), 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.
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 | ) | const [inline] |
Return the sample data for the given sample no. Please do not use this unless you NEED to access samples individually.
sampleNo | - Input - the given sample no. |
References getReady(), escript::DataReady::getSampleDataRO(), m_data, and escript::DataLazy::resolveSample().
Referenced by finley::Assemble_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(), ripley::RipleyDomain::assemblePDEDirac(), ripley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D::assemblePDESingleReduced(), ripley::DefaultAssembler3D::assemblePDESingleReduced(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystemReduced(), ripley::DefaultAssembler3D::assemblePDESystemReduced(), ripley::RipleyDomain::averageData(), escript::condEval(), ripley::RipleyDomain::copyData(), ripley::Brick::dofToNodes(), ripley::Rectangle::dofToNodes(), getSampleDataRO(), getSampleDataROFast(), weipa::DataVar::initFromEscript(), ripley::Brick::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::RipleyDomain::interpolateOnDomain(), ripley::RipleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), escript::saveDataCSV(), finley::NodeFile::setCoordinates(), finley::NodeFile::setTags(), finley::ElementFile::setTags(), ripley::RipleyDomain::setTags(), ripley::Brick::writeBinaryGridImpl(), and ripley::Rectangle::writeBinaryGridImpl().
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 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(), ripley::Rectangle::assembleCoordinates(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), ripley::RipleyDomain::assemblePDEDirac(), ripley::RipleyDomain::averageData(), paso::TransportProblemAdapter::copyConstraint(), ripley::RipleyDomain::copyData(), ripley::Brick::dofToNodes(), ripley::Rectangle::dofToNodes(), getSampleDataRW(), getSampleDataRWFast(), ripley::Brick::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::RipleyDomain::interpolateOnDomain(), ripley::RipleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), paso::SystemMatrixAdapter::nullifyRowsAndCols(), print(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), ripley::Rectangle::readNcGrid(), ripley::Brick::readNcGrid(), ripley::Rectangle::setToNormal(), ripley::Brick::setToNormal(), ripley::Rectangle::setToSize(), ripley::Brick::setToSize(), paso::TransportProblemAdapter::setToSolution(), paso::SystemMatrixAdapter::setToSolution(), 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().
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 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().
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(), and grad().
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 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 WrappedArray & | value, |
const FunctionSpace & | what, | ||
bool | expanded | ||
) | [private] |
References escript::DataAbstract::getPtr(), and set_m_data().
void Data::initialise | ( | const double | value, |
const DataTypes::ShapeType & | shape, | ||
const FunctionSpace & | what, | ||
bool | expanded | ||
) | [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().
bp::object Data::integrateToTuple_const | ( | ) | const |
Calculate the integral over the function space domain as a python tuple.
References integrateWorker(), and isLazy().
bp::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, paso::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 escript::Data::isDataPointShapeEqual | ( | int | rank, |
const int * | dimensions | ||
) | const [inline] |
Returns true if the shape matches the vector (dimensions[0],..., dimensions[rank-1]). DataEmpty always returns true.
References getDataPointShape(), and isEmpty().
Referenced by finley::Assemble_getNormal(), finley::Assemble_getSize(), finley::Assemble_PDE(), 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 ripley::RipleyDomain::addPDEToRHS(), dudley::MeshAdapter::addPDEToRHS(), ripley::RipleyDomain::addPDEToSystem(), dudley::MeshAdapter::addPDEToSystem(), ripley::RipleyDomain::addPDEToTransportProblem(), dudley::MeshAdapter::addPDEToTransportProblem(), ripley::RipleyDomain::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(), ripley::RipleyDomain::assemblePDE(), 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(), ripley::RipleyDomain::assemblePDEDirac(), ripley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D::assemblePDESingleReduced(), ripley::DefaultAssembler3D::assemblePDESingleReduced(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystemReduced(), ripley::DefaultAssembler3D::assemblePDESystemReduced(), BOOST_PYTHON_MODULE(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::convertToData(), copyWithMask(), Data(), dp_algorithm(), expand(), getNumDataPointsPerSample(), getSampleDataRO(), getSampleDataRW(), getTagNumber(), grad(), gradOn(), escript::AbstractTransportProblem::insertConstraint(), isDataPointShapeEqual(), isEmpty(), isExpanded(), numSamplesEqual(), 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(), getExpandedVectorReference(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), ripley::RipleyDomain::setToX(), 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(), escript::resolveGroup(), 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] |
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 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().
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 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().
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().
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::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().
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().
bool escript::Data::numSamplesEqual | ( | int | numDataPointsPerSample, |
int | numSamples | ||
) | const [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(), 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().
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().
Overloaded operator *=.
right | - Input - The right hand side. |
References binaryOp(), exclusiveWrite(), isProtected(), MAKELAZYBINSELF, and escript::MUL.
Data& escript::Data::operator*= | ( | const boost::python::object & | right | ) |
Overloaded operator +=.
right | - Input - The right hand side. |
References escript::ADD, binaryOp(), exclusiveWrite(), isProtected(), and MAKELAZYBINSELF.
Data& escript::Data::operator+= | ( | const boost::python::object & | right | ) |
Overloaded operator -=.
right | - Input - The right hand side. |
References binaryOp(), exclusiveWrite(), isProtected(), MAKELAZYBINSELF, and escript::SUB.
Data& escript::Data::operator-= | ( | const boost::python::object & | right | ) |
Overloaded operator /=.
right | - Input - The right hand side. |
References binaryOp(), escript::DIV, exclusiveWrite(), isProtected(), and MAKELAZYBINSELF.
Data& escript::Data::operator/= | ( | const boost::python::object & | right | ) |
References m_data, m_protected, and set_m_data().
Return the identity of each data point of this Data object. Simply returns this object unmodified.
References copy().
Referenced by BOOST_PYTHON_MODULE().
Data Data::powD | ( | const Data & | right | ) | const |
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 escript::C_GeneralTensorProduct(), 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 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(), 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(), ripley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D::assemblePDESingleReduced(), ripley::DefaultAssembler3D::assemblePDESingleReduced(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D::assemblePDESystemReduced(), ripley::DefaultAssembler3D::assemblePDESystemReduced(), ripley::RipleyDomain::averageData(), escript::C_TensorBinaryOperation(), paso::TransportProblemAdapter::copyConstraint(), ripley::RipleyDomain::copyData(), ripley::Brick::dofToNodes(), ripley::Rectangle::dofToNodes(), ripley::Brick::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::RipleyDomain::interpolateOnDomain(), ripley::RipleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), paso::SystemMatrixAdapter::nullifyRowsAndCols(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), ripley::Rectangle::readNcGrid(), ripley::Brick::readNcGrid(), ripley::Rectangle::setToNormal(), ripley::Brick::setToNormal(), ripley::Rectangle::setToSize(), ripley::Brick::setToSize(), paso::TransportProblemAdapter::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 BOOST_PYTHON_MODULE(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), escript::condEval(), copyWithMask(), dump(), eigenvalues(), eigenvalues_and_eigenvectors(), expand(), forceResolve(), inf(), Lsup(), matrixInverse(), requireWrite(), 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::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 | |||
) |
Set the value of a global data point.
References get_MPIRank(), MPI_COMM_WORLD, MPI_INT, 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(), and escript::DataLazy::collapseToReady().
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().
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 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().
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().
Data escript::Data::truedivD | ( | const Data & | right | ) | [inline] |
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().
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().
Data condEval | ( | escript::Data & | mask, |
escript::Data & | trueval, | ||
escript::Data & | falseval | ||
) | [friend] |
friend class DataAbstract [friend] |
Data randomData | ( | const boost::python::tuple & | shape, |
const FunctionSpace & | what, | ||
long | seed, | ||
const boost::python::tuple & | filter | ||
) | [friend] |
Create a new Expanded Data object filled with pseudo-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=(), 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().