escript  Revision_
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
escript::Data Class Reference

Data represents a collection of datapoints. More...

#include <Data.h>

Public Member Functions

 Data ()
 Default constructor. Creates a DataEmpty object. More...
 
 Data (const Data &inData)
 Copy constructor. WARNING: Only performs a shallow copy. More...
 
 Data (const Data &inData, const FunctionSpace &what)
 Constructor from another Data object. If "what" is different from the function space of inData the inData are tried to be interpolated to what, otherwise a shallow copy of inData is returned. More...
 
 Data (const DataTypes::RealVectorType &value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded)
 Copy Data from an existing vector. More...
 
 Data (DataTypes::real_t value, const DataTypes::ShapeType &dataPointShape, const FunctionSpace &what, bool expanded)
 Constructor which creates a Data with points having the specified shape. More...
 
 Data (DataTypes::cplx_t value, const DataTypes::ShapeType &dataPointShape, const FunctionSpace &what, bool expanded)
 Constructor which creates a Data with points having the specified shape. More...
 
 Data (const Data &inData, const DataTypes::RegionType &region)
 Constructor which performs a deep copy of a region from another Data object. More...
 
 Data (const WrappedArray &w, const FunctionSpace &what, bool expanded)
 Constructor which copies data from a wrapped array. More...
 
 Data (const boost::python::object &value, const Data &other)
 Constructor which creates a DataConstant. Copies data from any object that can be treated like a python array/sequence. All other parameters are copied from other. More...
 
 Data (boost::python::object value, boost::python::object par1=boost::python::object(), boost::python::object par2=boost::python::object(), boost::python::object par3=boost::python::object())
 
 Data (DataAbstract *underlyingdata)
 Create a Data using an existing DataAbstract. Warning: The new object assumes ownership of the pointer! Once you have passed the pointer, do not delete it. More...
 
 Data (DataAbstract_ptr underlyingdata)
 Create a Data based on the supplied DataAbstract. More...
 
 ~Data ()
 Destructor. More...
 
void copy (const Data &other)
 Make this object a deep copy of "other". More...
 
Data copySelf () const
 Return a pointer to a deep copy of this object. More...
 
Data delay ()
 produce a delayed evaluation version of this Data. More...
 
void delaySelf ()
 convert the current data into lazy data. More...
 
void setProtection ()
 switches on update protection More...
 
bool isProtected () const
 Returns true, if the data object is protected against update. More...
 
const boost::python::object getValueOfDataPointAsTuple (int dataPointNo)
 Return the value of a data point as a python tuple. More...
 
void setValueOfDataPointToPyObject (int dataPointNo, const boost::python::object &py_object)
 sets the values of a data-point from a python object on this process More...
 
void setValueOfDataPointToArray (int dataPointNo, const boost::python::object &)
 sets the values of a data-point from a array-like object on this process More...
 
void setValueOfDataPoint (int dataPointNo, const DataTypes::real_t)
 sets the values of a data-point on this process More...
 
void setValueOfDataPointC (int dataPointNo, const DataTypes::cplx_t)
 
const boost::python::object getValueOfGlobalDataPointAsTuple (int procNo, int dataPointNo)
 Return a data point across all processors as a python tuple. More...
 
void setTupleForGlobalDataPoint (int id, int proc, boost::python::object)
 Set the value of a global data point. More...
 
int getTagNumber (int dpno)
 Return the tag number associated with the given data-point. More...
 
std::string toString () const
 Write the data as a string. For large amounts of data, a summary is printed. More...
 
void expand ()
 Whatever the current Data type make this into a DataExpanded. More...
 
void tag ()
 If possible convert this Data to DataTagged. This will only allow Constant data to be converted to tagged. An attempt to convert Expanded data to tagged will throw an exception. More...
 
void resolve ()
 If this data is lazy, then convert it to ready data. What type of ready data depends on the expression. For example, Constant+Tagged==Tagged. More...
 
bool hasNaN ()
 returns return true if data contains NaN. More...
 
void replaceNaN (DataTypes::real_t value)
 replaces all NaN values with value More...
 
void replaceNaN (DataTypes::cplx_t value)
 replaces all NaN values with value More...
 
void replaceNaNPython (boost::python::object obj)
 replaces all NaN values with value More...
 
void requireWrite ()
 Ensures data is ready for write access. This means that the data will be resolved if lazy and will be copied if shared with another Data object. More...
 
bool isExpanded () const
 Return true if this Data is expanded. More...
 
bool actsExpanded () const
 Return true if this Data is expanded or resolves to expanded. That is, if it has a separate value for each datapoint in the sample. More...
 
bool isTagged () const
 Return true if this Data is tagged. More...
 
bool isConstant () const
 Return true if this Data is constant. More...
 
bool isLazy () const
 Return true if this Data is lazy. More...
 
bool isReady () const
 Return true if this data is ready. More...
 
bool isEmpty () const
 
 Return true if this Data holds an instance of DataEmpty. This is _not_ the same as asking if the object 

contains datapoints. More...

 
bool isComplex () const
 True if components of this data are stored as complex. More...
 
const FunctionSpacegetFunctionSpace () const
 Return the function space. More...
 
const_Domain_ptr getDomain () const
 Return the domain. More...
 
Domain_ptr getDomainPython () const
 Return the domain. TODO: For internal use only. This should be removed. More...
 
unsigned int getDataPointRank () const
 Return the rank of the point data. More...
 
int getNumDataPoints () const
 Return the number of data points. More...
 
int getNumSamples () const
 Return the number of samples. More...
 
int getNumDataPointsPerSample () const
 Return the number of data points per sample. More...
 
bool numSamplesEqual (int numDataPointsPerSample, int numSamples) const
 Returns true if the number of data points per sample and the number of samples match the respective argument. DataEmpty always returns true. More...
 
bool isDataPointShapeEqual (int rank, const int *dimensions) const
 Returns true if the shape matches the vector (dimensions[0],..., dimensions[rank-1]). DataEmpty always returns true. More...
 
int getNoValues () const
 Return the number of values in the shape for this object. More...
 
void dump (const std::string fileName) const
 dumps the object into a netCDF file More...
 
const boost::python::object toListOfTuples (bool scalarastuple=true)
 returns the values of the object as a list of tuples (one for each datapoint). More...
 
const DataTypes::real_tgetSampleDataRO (DataTypes::RealVectorType::size_type sampleNo, DataTypes::real_t dummy=0) const
 Return the sample data for the given sample no. Please do not use this unless you NEED to access samples individually. More...
 
const DataTypes::cplx_tgetSampleDataRO (DataTypes::CplxVectorType::size_type sampleNo, DataTypes::cplx_t dummy) const
 
DataTypes::real_tgetSampleDataRW (DataTypes::RealVectorType::size_type sampleNo, DataTypes::real_t dummy=0)
 Return the sample data for the given sample no. Please do not use this unless you NEED to access samples individually. More...
 
DataTypes::cplx_tgetSampleDataRW (DataTypes::RealVectorType::size_type sampleNo, DataTypes::cplx_t dummy)
 
const DataTypes::real_tgetDataRO (DataTypes::real_t dummy=0) const
 Return a pointer to the beginning of the underlying data. More...
 
const DataTypes::cplx_tgetDataRO (DataTypes::cplx_t dummy) const
 
DataTypes::real_tgetSampleDataByTag (int tag, DataTypes::real_t dummy=0)
 Return the sample data for the given tag. If an attempt is made to access data that isn't tagged an exception will be thrown. More...
 
DataTypes::cplx_tgetSampleDataByTag (int tag, DataTypes::cplx_t dummy)
 
DataTypes::RealVectorType::const_reference getDataPointRO (int sampleNo, int dataPointNo)
 Return a reference into the DataVector which points to the specified data point. More...
 
DataTypes::RealVectorType::reference getDataPointRW (int sampleNo, int dataPointNo)
 Return a reference into the DataVector which points to the specified data point. More...
 
DataTypes::RealVectorType::size_type getDataOffset (int sampleNo, int dataPointNo)
 Return the offset for the given sample and point within the sample. More...
 
const DataTypes::ShapeTypegetDataPointShape () const
 Return a reference to the data point shape. More...
 
const boost::python::tuple getShapeTuple () const
 Return the data point shape as a tuple of integers. More...
 
int getDataPointSize () const
 Return the size of the data point. It is the product of the data point shape dimensions. More...
 
DataTypes::RealVectorType::size_type getLength () const
 Return the number of doubles stored for this Data. More...
 
bool hasNoSamples () const
 Return true if this object contains no samples. This is not the same as isEmpty() More...
 
void setTaggedValueByName (std::string name, const boost::python::object &value)
 Assign the given value to the tag assocciated with name. Implicitly converts this object to type DataTagged. Throws an exception if this object cannot be converted to a DataTagged object or name cannot be mapped onto a tag key. More...
 
void setTaggedValue (int tagKey, const boost::python::object &value)
 Assign the given value to the tag. Implicitly converts this object to type DataTagged if it is constant. More...
 
void setTaggedValueFromCPP (int tagKey, const DataTypes::ShapeType &pointshape, const DataTypes::RealVectorType &value, int dataOffset=0)
 Assign the given value to the tag. Implicitly converts this object to type DataTagged if it is constant. More...
 
void setTaggedValueFromCPP (int tagKey, const DataTypes::ShapeType &pointshape, const DataTypes::CplxVectorType &value, int dataOffset=0)
 
void copyWithMask (const Data &other, const Data &mask)
 Copy other Data object into this Data object where mask is positive. More...
 
void setToZero ()
 set all values to zero More...
 
Data interpolate (const FunctionSpace &functionspace) const
 Interpolates this onto the given functionspace and returns the result as a Data object. More...
 
Data interpolateFromTable3D (const WrappedArray &table, DataTypes::real_t Amin, DataTypes::real_t Astep, DataTypes::real_t undef, Data &B, DataTypes::real_t Bmin, DataTypes::real_t Bstep, Data &C, DataTypes::real_t Cmin, DataTypes::real_t Cstep, bool check_boundaries)
 
Data interpolateFromTable2D (const WrappedArray &table, DataTypes::real_t Amin, DataTypes::real_t Astep, DataTypes::real_t undef, Data &B, DataTypes::real_t Bmin, DataTypes::real_t Bstep, bool check_boundaries)
 
Data interpolateFromTable1D (const WrappedArray &table, DataTypes::real_t Amin, DataTypes::real_t Astep, DataTypes::real_t undef, bool check_boundaries)
 
Data interpolateFromTable3DP (boost::python::object table, DataTypes::real_t Amin, DataTypes::real_t Astep, Data &B, DataTypes::real_t Bmin, DataTypes::real_t Bstep, Data &C, DataTypes::real_t Cmin, DataTypes::real_t Cstep, DataTypes::real_t undef, bool check_boundaries)
 
Data interpolateFromTable2DP (boost::python::object table, DataTypes::real_t Amin, DataTypes::real_t Astep, Data &B, DataTypes::real_t Bmin, DataTypes::real_t Bstep, DataTypes::real_t undef, bool check_boundaries)
 
Data interpolateFromTable1DP (boost::python::object table, DataTypes::real_t Amin, DataTypes::real_t Astep, DataTypes::real_t undef, bool check_boundaries)
 
Data nonuniforminterp (boost::python::object in, boost::python::object out, bool check_boundaries)
 
Data nonuniformslope (boost::python::object in, boost::python::object out, bool check_boundaries)
 
Data gradOn (const FunctionSpace &functionspace) const
 Calculates the gradient of the data at the data points of functionspace. If functionspace is not present the function space of Function(getDomain()) is used. More...
 
Data grad () const
 
boost::python::object integrateToTuple_const () const
 Calculate the integral over the function space domain as a python tuple. More...
 
boost::python::object integrateToTuple ()
 Calculate the integral over the function space domain as a python tuple. More...
 
Data oneOver () const
 Returns 1./ Data object. More...
 
Data wherePositive () const
 Return a Data with a 1 for +ive values and a 0 for 0 or -ive values. More...
 
Data whereNegative () const
 Return a Data with a 1 for -ive values and a 0 for +ive or 0 values. More...
 
Data whereNonNegative () const
 Return a Data with a 1 for +ive or 0 values and a 0 for -ive values. More...
 
Data whereNonPositive () const
 Return a Data with a 1 for -ive or 0 values and a 0 for +ive values. More...
 
Data whereZero (DataTypes::real_t tol=0.0) const
 Return a Data with a 1 for 0 values and a 0 for +ive or -ive values. More...
 
Data whereNonZero (DataTypes::real_t tol=0.0) const
 Return a Data with a 0 for 0 values and a 1 for +ive or -ive values. More...
 
DataTypes::real_t Lsup ()
 Return the maximum absolute value of this Data object. More...
 
DataTypes::real_t Lsup_const () const
 
DataTypes::real_t sup ()
 Return the maximum value of this Data object. More...
 
DataTypes::real_t sup_const () const
 
DataTypes::real_t inf ()
 Return the minimum value of this Data object. More...
 
DataTypes::real_t inf_const () const
 
Data abs () const
 Return the absolute value of each data point of this Data object. More...
 
Data maxval () const
 Return the maximum value of each data point of this Data object. More...
 
Data minval () const
 Return the minimum value of each data point of this Data object. More...
 
const boost::python::tuple minGlobalDataPoint () const
 Return the (sample number, data-point number) of the data point with the minimum component value in this Data object. More...
 
const boost::python::tuple maxGlobalDataPoint () const
 Return the (sample number, data-point number) of the data point with the minimum component value in this Data object. More...
 
Data sign () const
 Return the sign of each data point of this Data object. -1 for negative values, zero for zero values, 1 for positive values. More...
 
Data symmetric () const
 Return the symmetric part of a matrix which is half the matrix plus its transpose. More...
 
Data antisymmetric () const
 Return the antisymmetric part of a matrix which is half the matrix minus its transpose. More...
 
Data hermitian () const
 Return the hermitian part of a matrix which is half the matrix plus its adjoint. More...
 
Data antihermitian () const
 Return the anti-hermitian part of a matrix which is half the matrix minus its hermitian. More...
 
Data trace (int axis_offset) const
 Return the trace of a matrix. More...
 
Data transpose (int axis_offset) const
 Transpose each data point of this Data object around the given axis. More...
 
Data eigenvalues () const
 Return the eigenvalues of the symmetric part at each data point of this Data object in increasing values. Currently this function is restricted to rank 2, square shape, and dimension 3. More...
 
const boost::python::tuple eigenvalues_and_eigenvectors (const DataTypes::real_t tol=1.e-12) const
 Return the eigenvalues and corresponding eigenvcetors of the symmetric part at each data point of this Data object. the eigenvalues are ordered in increasing size where eigenvalues with relative difference less than tol are treated as equal. The eigenvectors are orthogonal, normalized and the sclaed such that the first non-zero entry is positive. Currently this function is restricted to rank 2, square shape, and dimension 3. More...
 
Data swapaxes (const int axis0, const int axis1) const
 swaps the components axis0 and axis1 More...
 
Data erf () const
 Return the error function erf of each data point of this Data object. More...
 
Data conjugate () const
 For complex values return the conjugate values. For non-complex data return a copy. More...
 
Data real () const
 
Data imag () const
 
Data sin () const
 Return the sin of each data point of this Data object. More...
 
Data cos () const
 Return the cos of each data point of this Data object. More...
 
Data bessel (int order, DataTypes::real_t(*besselfunc)(int, DataTypes::real_t))
 Bessel worker function. More...
 
Data besselFirstKind (int order)
 Return the Bessel function of the first kind for each data point of this Data object. More...
 
Data besselSecondKind (int order)
 Return the Bessel function of the second kind for each data point of this Data object. More...
 
Data tan () const
 Return the tan of each data point of this Data object. More...
 
Data asin () const
 Return the asin of each data point of this Data object. More...
 
Data acos () const
 Return the acos of each data point of this Data object. More...
 
Data atan () const
 Return the atan of each data point of this Data object. More...
 
Data sinh () const
 Return the sinh of each data point of this Data object. More...
 
Data cosh () const
 Return the cosh of each data point of this Data object. More...
 
Data tanh () const
 Return the tanh of each data point of this Data object. More...
 
Data asinh () const
 Return the asinh of each data point of this Data object. More...
 
Data acosh () const
 Return the acosh of each data point of this Data object. More...
 
Data atanh () const
 Return the atanh of each data point of this Data object. More...
 
Data log10 () const
 Return the log to base 10 of each data point of this Data object. More...
 
Data log () const
 Return the natural log of each data point of this Data object. More...
 
Data exp () const
 Return the exponential function of each data point of this Data object. More...
 
Data sqrt () const
 Return the square root of each data point of this Data object. More...
 
Data neg () const
 Return the negation of each data point of this Data object. More...
 
Data pos () const
 Return the identity of each data point of this Data object. Simply returns this object unmodified. More...
 
Data powD (const Data &right) const
 Return the given power of each data point of this Data object. More...
 
Data powO (const boost::python::object &right) const
 Return the given power of each data point of this boost python object. More...
 
Data rpowO (const boost::python::object &left) const
 Return the given power of each data point of this boost python object. More...
 
Dataoperator+= (const Data &right)
 Overloaded operator +=. More...
 
Dataoperator+= (const boost::python::object &right)
 
Dataoperator= (const Data &other)
 
Dataoperator-= (const Data &right)
 Overloaded operator -=. More...
 
Dataoperator-= (const boost::python::object &right)
 
Dataoperator*= (const Data &right)
 Overloaded operator *=. More...
 
Dataoperator*= (const boost::python::object &right)
 
Dataoperator/= (const Data &right)
 Overloaded operator /=. More...
 
Dataoperator/= (const boost::python::object &right)
 
Data truedivD (const Data &right)
 Newer style division operator for python. More...
 
Data truedivO (const boost::python::object &right)
 Newer style division operator for python. More...
 
Data rtruedivO (const boost::python::object &left)
 Newer style division operator for python. More...
 
boost::python::object __add__ (const boost::python::object &right)
 wrapper for python add operation More...
 
boost::python::object __sub__ (const boost::python::object &right)
 wrapper for python subtract operation More...
 
boost::python::object __rsub__ (const boost::python::object &right)
 wrapper for python reverse subtract operation More...
 
boost::python::object __mul__ (const boost::python::object &right)
 wrapper for python multiply operation More...
 
boost::python::object __div__ (const boost::python::object &right)
 wrapper for python divide operation More...
 
boost::python::object __rdiv__ (const boost::python::object &right)
 wrapper for python reverse divide operation More...
 
Data matrixInverse () const
 return inverse of matricies. More...
 
bool probeInterpolation (const FunctionSpace &functionspace) const
 Returns true if this can be interpolated to functionspace. More...
 
Data getItem (const boost::python::object &key) const
 Returns a slice from this Data object. More...
 
void setItemD (const boost::python::object &key, const Data &value)
 Copies slice from value into this Data object. More...
 
void setItemO (const boost::python::object &key, const boost::python::object &value)
 
template<class UnaryFunction >
void unaryOp2 (UnaryFunction operation)
 Perform the given unary operation on every element of every data point in this Data object. More...
 
Data getSlice (const DataTypes::RegionType &region) const
 Return a Data object containing the specified slice of this Data object. More...
 
void setSlice (const Data &value, const DataTypes::RegionType &region)
 Copy the specified slice from the given value into this Data object. More...
 
void print (void)
 print the data values to stdout. Used for debugging More...
 
int get_MPIRank (void) const
 return the MPI rank number of the local data MPI_COMM_WORLD is assumed and the result of MPI_Comm_size() is returned More...
 
int get_MPISize (void) const
 return the MPI rank number of the local data MPI_COMM_WORLD is assumed and the result of MPI_Comm_rank() is returned More...
 
MPI_Comm get_MPIComm (void) const
 return the MPI rank number of the local data MPI_COMM_WORLD is assumed and returned. More...
 
DataAbstractborrowData (void) const
 return the object produced by the factory, which is a DataConstant or DataExpanded TODO Ownership of this object should be explained in doco. More...
 
DataAbstract_ptr borrowDataPtr (void) const
 
DataReady_ptr borrowReadyPtr (void) const
 
DataTypes::RealVectorType::const_reference getDataAtOffsetRO (DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0)
 Return a pointer to the beginning of the datapoint at the specified offset. TODO Eventually these should be inlined. More...
 
DataTypes::RealVectorType::reference getDataAtOffsetRW (DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0)
 
DataTypes::CplxVectorType::const_reference getDataAtOffsetRO (DataTypes::CplxVectorType::size_type i, DataTypes::cplx_t dummy)
 
DataTypes::CplxVectorType::reference getDataAtOffsetRW (DataTypes::CplxVectorType::size_type i, DataTypes::cplx_t dummy)
 
DataTypes::RealVectorTypegetExpandedVectorReference (DataTypes::real_t dummy=0)
 Ensures that the Data is expanded and returns its underlying vector Does not check for exclusive write so do that before calling if sharing Is a posibility. More...
 
DataTypes::CplxVectorTypegetExpandedVectorReference (DataTypes::cplx_t dummy)
 
size_t getNumberOfTaggedValues () const
 For tagged Data returns the number of tags with values. For non-tagged data will return 0 (even Data which has been expanded from tagged). More...
 
void complicate ()
 
template<class BinaryOp >
real_t lazyAlgWorker (real_t init)
 

Private Member Functions

void init_from_data_and_fs (const Data &inData, const FunctionSpace &functionspace)
 
template<class BinaryOp >
DataTypes::real_t lazyAlgWorker (DataTypes::real_t init)
 
DataTypes::real_t LsupWorker () const
 
DataTypes::real_t supWorker () const
 
DataTypes::real_t infWorker () const
 
boost::python::object integrateWorker () const
 
void calc_minGlobalDataPoint (int &ProcNo, int &DataPointNo) const
 
void calc_maxGlobalDataPoint (int &ProcNo, int &DataPointNo) const
 
Data minval_nonlazy () const
 
Data maxval_nonlazy () const
 
void operandCheck (const Data &right) const
 Check *this and the right operand are compatible. Throws an exception if they aren't. More...
 
template<class BinaryFunction >
DataTypes::real_t reduction (BinaryFunction operation, DataTypes::real_t initial_value) const
 Perform the specified reduction algorithm on every element of every data point in this Data object according to the given function and return the single value result. More...
 
template<class BinaryFunction >
Data dp_algorithm (BinaryFunction operation, DataTypes::real_t initial_value) const
 Reduce each data-point in this Data object using the given operation. Return a Data object with the same number of data-points, but with each data-point containing only one value - the result of the reduction operation on the corresponding data-point in this Data object. More...
 
void typeMatchLeft (Data &right) const
 Convert the data type of the RHS to match this. More...
 
void typeMatchRight (const Data &right)
 Convert the data type of this to match the RHS. More...
 
void initialise (const DataTypes::RealVectorType &value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded)
 Construct a Data object of the appropriate type. More...
 
void initialise (const DataTypes::CplxVectorType &value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded)
 
void initialise (const WrappedArray &value, const FunctionSpace &what, bool expanded)
 
void initialise (const DataTypes::real_t value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded)
 
void initialise (const DataTypes::cplx_t value, const DataTypes::ShapeType &shape, const FunctionSpace &what, bool expanded)
 
const DataReadygetReady () const
 
DataReadygetReady ()
 
DataReady_ptr getReadyPtr ()
 
const_DataReady_ptr getReadyPtr () const
 
bool isShared () const
 
void forceResolve ()
 
void exclusiveWrite ()
 if another object is sharing out member data make a copy to work with instead. This code should only be called from single threaded sections of code. More...
 
void checkExclusiveWrite ()
 checks if caller can have exclusive write to the object More...
 
void set_m_data (DataAbstract_ptr p)
 Modify the data abstract hosted by this Data object For internal use only. Passing a pointer to null is permitted (do this in the destructor) More...
 
void TensorSelfUpdateBinaryOperation (const Data &right, escript::ES_optype operation)
 

Private Attributes

bool m_protected
 
bool m_lazy
 
DataAbstract_ptr m_data
 

Friends

class DataAbstract
 
class TestDomain
 
Data condEval (escript::Data &mask, escript::Data &trueval, escript::Data &falseval)
 
Data randomData (const boost::python::tuple &shape, const FunctionSpace &what, long seed, const boost::python::tuple &filter)
 Create a new Expanded Data object filled with pseudo-random data. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Data() [1/12]

Data::Data ( )

◆ Data() [2/12]

Data::Data ( const Data inData)

Copy constructor. WARNING: Only performs a shallow copy.

References isProtected(), m_data, m_protected, and set_m_data().

◆ Data() [3/12]

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 init_from_data_and_fs().

◆ Data() [4/12]

Data::Data ( const DataTypes::RealVectorType value,
const DataTypes::ShapeType shape,
const FunctionSpace what,
bool  expanded 
)

Copy Data from an existing vector.

References initialise(), and m_protected.

◆ Data() [5/12]

Data::Data ( DataTypes::real_t  value,
const DataTypes::ShapeType dataPointShape,
const FunctionSpace what,
bool  expanded 
)

Constructor which creates a Data with points having the specified shape.

Parameters
value- Input - Single real value applied to all Data.
dataPointShape- Input - The shape of each data point.
what- Input - A description of what this data represents.
expanded- Input - Flag, if true fill the entire container with the given value. Otherwise a more efficient storage mechanism will be used.

References initialise(), and m_protected.

◆ Data() [6/12]

Data::Data ( DataTypes::cplx_t  value,
const DataTypes::ShapeType dataPointShape,
const FunctionSpace what,
bool  expanded 
)
explicit

Constructor which creates a Data with points having the specified shape.

Parameters
value- Input - Single complex value applied to all Data.
dataPointShape- Input - The shape of each data point.
what- Input - A description of what this data represents.
expanded- Input - Flag, if true fill the entire container with the given value. Otherwise a more efficient storage mechanism will be used.

References initialise(), and m_protected.

◆ Data() [7/12]

Data::Data ( const Data inData,
const DataTypes::RegionType region 
)

Constructor which performs a deep copy of a region from another Data object.

Parameters
inData- Input - Input Data object.
region- Input - Region to copy.

References escript::DataAbstract::getSlice(), isLazy(), m_data, m_protected, and set_m_data().

◆ Data() [8/12]

Data::Data ( const WrappedArray w,
const FunctionSpace what,
bool  expanded 
)

Constructor which copies data from a wrapped array.

Parameters
w- Input - Input data.
what- Input - A description of what this data represents.
expanded- Input - Flag, if true fill the entire container with the value. Otherwise a more efficient storage mechanism will be used.

References initialise(), and m_protected.

◆ Data() [9/12]

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.

Parameters
value- Input - Input data.
other- Input - contains all other parameters.

References escript::DataTypes::DataVectorAlt< T >::copyFromArray(), getDataPointShape(), getFunctionSpace(), escript::WrappedArray::getRank(), escript::WrappedArray::getShape(), m_protected, escript::DataTypes::noValues(), and set_m_data().

◆ Data() [10/12]

Data::Data ( boost::python::object  value,
boost::python::object  par1 = boost::python::object(),
boost::python::object  par2 = boost::python::object(),
boost::python::object  par3 = boost::python::object() 
)

This constructor subsumes a number of previous python ones.

Data(const boost::python::object& value, const FunctionSpace& what=FunctionSpace(), bool expanded=false);

Data(DataTypes::real_t value, const boost::python::tuple& shape=boost::python::make_tuple(), const FunctionSpace& what=FunctionSpace(), bool expanded=false);

and a new

Data(cplx_t value, const boost::python::tuple& shape=boost::python::make_tuple(), const FunctionSpace& what=FunctionSpace(), bool expanded=false);

References init_from_data_and_fs(), initialise(), m_protected, and escript::DataTypes::noValues().

◆ Data() [11/12]

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() [12/12]

Data::Data ( DataAbstract_ptr  underlyingdata)
explicit

Create a Data based on the supplied DataAbstract.

References m_protected, and set_m_data().

◆ ~Data()

Data::~Data ( )

Destructor.

References set_m_data().

Member Function Documentation

◆ __add__()

bp::object Data::__add__ ( const boost::python::object &  right)

wrapper for python add operation

References Data(), and getFunctionSpace().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ __div__()

bp::object Data::__div__ ( const boost::python::object &  right)

wrapper for python divide operation

References Data(), and getFunctionSpace().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ __mul__()

bp::object Data::__mul__ ( const boost::python::object &  right)

wrapper for python multiply operation

References Data(), and getFunctionSpace().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ __rdiv__()

bp::object Data::__rdiv__ ( const boost::python::object &  right)

wrapper for python reverse divide operation

References Data(), and getFunctionSpace().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ __rsub__()

bp::object Data::__rsub__ ( const boost::python::object &  right)

wrapper for python reverse subtract operation

References Data(), and getFunctionSpace().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ __sub__()

bp::object Data::__sub__ ( const boost::python::object &  right)

wrapper for python subtract operation

References Data(), and getFunctionSpace().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ abs()

Data Data::abs ( ) const

Return the absolute value of each data point of this Data object.

References escript::ABS, escript::C_TensorUnaryOperation(), and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ acos()

Data Data::acos ( ) const

Return the acos of each data point of this Data object.

References escript::ACOS, escript::C_TensorUnaryOperation(), and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ acosh()

Data Data::acosh ( ) const

Return the acosh of each data point of this Data object.

References escript::ACOSH, escript::C_TensorUnaryOperation(), and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ actsExpanded()

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 dudley::Assemble_AverageElementData(), finley::Assemble_AverageElementData(), dudley::Assemble_CopyElementData(), finley::Assemble_CopyElementData(), dudley::Assemble_CopyNodalData(), finley::Assemble_CopyNodalData(), dudley::Assemble_getNormal(), finley::Assemble_getNormal(), dudley::Assemble_getSize(), finley::Assemble_getSize(), dudley::Assemble_gradient(), finley::Assemble_gradient(), dudley::Assemble_integrate(), finley::Assemble_integrate(), dudley::Assemble_interpolate(), finley::Assemble_interpolate(), dudley::Assemble_LumpedSystem(), finley::Assemble_LumpedSystem(), dudley::Assemble_NodeCoordinates(), finley::Assemble_NodeCoordinates(), finley::Assemble_PDE_Single_1D(), dudley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_2D(), dudley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_C(), finley::Assemble_PDE_System_1D(), dudley::Assemble_PDE_System_2D(), finley::Assemble_PDE_System_2D(), dudley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_C(), speckley::Brick::assembleGradient(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), speckley::Rectangle::assembleGradient(), finley::AssembleParameters::AssembleParameters(), dudley::AssembleParameters::AssembleParameters(), speckley::SpeckleyDomain::assemblePDE(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingle(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), escript::condEval(), get_MPIComm(), speckley::Brick::gradient_order10(), speckley::Rectangle::gradient_order10(), speckley::Brick::gradient_order2(), speckley::Rectangle::gradient_order2(), speckley::Brick::gradient_order3(), speckley::Rectangle::gradient_order3(), speckley::Brick::gradient_order4(), speckley::Rectangle::gradient_order4(), speckley::Brick::gradient_order5(), speckley::Rectangle::gradient_order5(), speckley::Brick::gradient_order6(), speckley::Rectangle::gradient_order6(), speckley::Brick::gradient_order7(), speckley::Rectangle::gradient_order7(), speckley::Brick::gradient_order8(), speckley::Rectangle::gradient_order8(), speckley::Brick::gradient_order9(), speckley::Rectangle::gradient_order9(), inf(), weipa::DataVar::initFromEscript(), ripley::RipleyDomain::interpolateOnDomain(), Lsup(), escript::saveDataCSV(), dudley::ElementFile::setTags(), finley::ElementFile::setTags(), and sup().

◆ antihermitian()

Data Data::antihermitian ( ) const

Return the anti-hermitian part of a matrix which is half the matrix minus its hermitian.

References antisymmetric(), getDataPointRank(), getDataPointShape(), getFunctionSpace(), isComplex(), m_data, MAKELAZYOP, escript::NHER, and typeMatchRight().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ antisymmetric()

Data Data::antisymmetric ( ) const

Return the antisymmetric 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 antihermitian(), BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ asin()

Data Data::asin ( ) const

Return the asin of each data point of this Data object.

References escript::ASIN, escript::C_TensorUnaryOperation(), and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ asinh()

Data Data::asinh ( ) const

Return the asinh of each data point of this Data object.

References escript::ASINH, escript::C_TensorUnaryOperation(), and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ atan()

Data Data::atan ( ) const

Return the atan of each data point of this Data object.

References escript::ATAN, escript::C_TensorUnaryOperation(), and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ atanh()

Data Data::atanh ( ) const

Return the atanh of each data point of this Data object.

References escript::ATANH, escript::C_TensorUnaryOperation(), and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ bessel()

Data Data::bessel ( int  order,
DataTypes::real_t(*)(int, DataTypes::real_t besselfunc 
)

◆ besselFirstKind()

Data Data::besselFirstKind ( int  order)

Return the Bessel function of the first kind for each data point of this Data object.

References bessel(), and THROWONCOMPLEX.

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ besselSecondKind()

Data Data::besselSecondKind ( int  order)

Return the Bessel function of the second kind for each data point of this Data object.

References bessel(), and THROWONCOMPLEX.

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ borrowData()

DataAbstract * Data::borrowData ( void  ) const

return the object produced by the factory, which is a DataConstant or DataExpanded TODO Ownership of this object should be explained in doco.

References m_data.

Referenced by bessel(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), hasNoSamples(), and escript::resolveGroup().

◆ borrowDataPtr()

DataAbstract_ptr Data::borrowDataPtr ( void  ) const

◆ borrowReadyPtr()

DataReady_ptr Data::borrowReadyPtr ( void  ) const

References ESYS_ASSERT, and m_data.

Referenced by hasNoSamples().

◆ calc_maxGlobalDataPoint()

void Data::calc_maxGlobalDataPoint ( int &  ProcNo,
int &  DataPointNo 
) const
private

◆ calc_minGlobalDataPoint()

void Data::calc_minGlobalDataPoint ( int &  ProcNo,
int &  DataPointNo 
) const
private

◆ checkExclusiveWrite()

void escript::Data::checkExclusiveWrite ( )
inlineprivate

checks if caller can have exclusive write to the object

References isLazy(), isShared(), set_m_data(), and TensorSelfUpdateBinaryOperation().

Referenced by getDataAtOffsetRO(), getDataAtOffsetRW(), and getDataPointRW().

◆ complicate()

void Data::complicate ( )

◆ conjugate()

Data Data::conjugate ( ) const

For complex values return the conjugate values. For non-complex data return a copy.

References escript::C_TensorUnaryOperation(), escript::CONJ, conjugate(), copySelf(), isComplex(), isLazy(), and resolve().

Referenced by BOOST_PYTHON_MODULE(), conjugate(), and hasNoSamples().

◆ copy()

void Data::copy ( const Data other)

◆ copySelf()

Data Data::copySelf ( ) const

Return a pointer to a deep copy of this object.

References Data(), and m_data.

Referenced by BOOST_PYTHON_MODULE(), conjugate(), imag(), and real().

◆ copyWithMask()

void Data::copyWithMask ( const Data other,
const Data mask 
)

◆ cos()

Data Data::cos ( ) const

Return the cos of each data point of this Data object.

References escript::C_TensorUnaryOperation(), escript::COS, and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ cosh()

Data Data::cosh ( ) const

Return the cosh of each data point of this Data object.

References escript::C_TensorUnaryOperation(), escript::COSH, and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ delay()

Data Data::delay ( )

produce a delayed evaluation version of this Data.

References Data(), isLazy(), and m_data.

Referenced by BOOST_PYTHON_MODULE().

◆ delaySelf()

void Data::delaySelf ( )

convert the current data into lazy data.

References isLazy(), m_data, and set_m_data().

◆ dp_algorithm()

template<class BinaryFunction >
Data escript::Data::dp_algorithm ( BinaryFunction  operation,
DataTypes::real_t  initial_value 
) const
inlineprivate

Reduce each data-point in this Data object using the given operation. Return a Data object with the same number of data-points, but with each data-point containing only one value - the result of the reduction operation on the corresponding data-point in this Data object.

Perform the given data point reduction algorithm on data and return the result. Given operation combines each element within each data point into a scalar, thus argument object is a rank n Data object, and returned object is a rank 0 Data object. Calls escript::dp_algorithm.

References escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), Data(), ESYS_ASSERT, escript::DataTagged::getDataByTagRW(), escript::DataTagged::getDefaultOffset(), getFunctionSpace(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataTagged::getOffsetForTag(), escript::DataExpanded::getPointOffset(), escript::DataAbstract::getShape(), escript::DataTagged::getTagLookup(), escript::DataExpanded::getTypedVectorRO(), escript::DataConstant::getTypedVectorRO(), escript::DataTagged::getTypedVectorRO(), escript::DataExpanded::getTypedVectorRW(), escript::DataConstant::getTypedVectorRW(), escript::DataTagged::getTypedVectorRW(), isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), m_data, escript::reductionOpVector(), and escript::DataTypes::scalarShape.

Referenced by maxval_nonlazy(), minval_nonlazy(), and operandCheck().

◆ dump()

void Data::dump ( const std::string  fileName) const

dumps the object into a netCDF file

References dump(), isLazy(), m_data, and resolve().

Referenced by BOOST_PYTHON_MODULE(), dump(), and getNoValues().

◆ eigenvalues()

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(), isComplex(), isLazy(), m_data, resolve(), and typeMatchRight().

Referenced by BOOST_PYTHON_MODULE(), eigenvalues(), and hasNoSamples().

◆ eigenvalues_and_eigenvectors()

const bp::tuple Data::eigenvalues_and_eigenvectors ( const DataTypes::real_t  tol = 1.e-12) const

Return the eigenvalues and corresponding eigenvcetors of the symmetric part at each data point of this Data object. the eigenvalues are ordered in increasing size where eigenvalues with relative difference less than tol are treated as equal. The eigenvectors are orthogonal, normalized and the sclaed such that the first non-zero entry is positive. Currently this function is restricted to rank 2, square shape, and dimension 3.

References eigenvalues_and_eigenvectors(), getDataPointRank(), getDataPointShape(), getFunctionSpace(), isLazy(), m_data, resolve(), THROWONCOMPLEX, typeMatchRight(), and V.

Referenced by BOOST_PYTHON_MODULE(), eigenvalues_and_eigenvectors(), and hasNoSamples().

◆ erf()

Data Data::erf ( ) const

Return the error function erf of each data point of this Data object.

References escript::C_TensorUnaryOperation(), escript::ERF, and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ exclusiveWrite()

void escript::Data::exclusiveWrite ( )
inlineprivate

if another object is sharing out member data make a copy to work with instead. This code should only be called from single threaded sections of code.

References escript::DataAbstract::deepCopy(), forceResolve(), isShared(), and set_m_data().

Referenced by copyWithMask(), operator*=(), operator+=(), operator-=(), operator/=(), requireWrite(), setItemD(), setSlice(), setTaggedValue(), setTaggedValueByName(), setTaggedValueFromCPP(), setToZero(), setValueOfDataPoint(), setValueOfDataPointC(), and setValueOfDataPointToArray().

◆ exp()

Data Data::exp ( ) const

Return the exponential function of each data point of this Data object.

References escript::C_TensorUnaryOperation(), escript::EXP, and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ expand()

void Data::expand ( )

◆ forceResolve()

void escript::Data::forceResolve ( )
inlineprivate

◆ get_MPIComm()

MPI_Comm Data::get_MPIComm ( void  ) const

◆ get_MPIRank()

int Data::get_MPIRank ( void  ) const

return the MPI rank number of the local data MPI_COMM_WORLD is assumed and the result of MPI_Comm_size() is returned

References get_MPIComm().

Referenced by calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), getValueOfGlobalDataPointAsTuple(), hasNoSamples(), and setTupleForGlobalDataPoint().

◆ get_MPISize()

int Data::get_MPISize ( void  ) const

return the MPI rank number of the local data MPI_COMM_WORLD is assumed and the result of MPI_Comm_rank() is returned

References get_MPIComm().

Referenced by calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), hasNoSamples(), and toListOfTuples().

◆ getDataAtOffsetRO() [1/2]

◆ getDataAtOffsetRO() [2/2]

◆ getDataAtOffsetRW() [1/2]

◆ getDataAtOffsetRW() [2/2]

◆ getDataOffset()

DataTypes::RealVectorType::size_type escript::Data::getDataOffset ( int  sampleNo,
int  dataPointNo 
)
inline

Return the offset for the given sample and point within the sample.

References m_data.

Referenced by calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), getValueOfDataPointAsTuple(), and getValueOfGlobalDataPointAsTuple().

◆ getDataPointRank()

unsigned int escript::Data::getDataPointRank ( ) const
inline

◆ getDataPointRO()

DataTypes::RealVectorType::const_reference Data::getDataPointRO ( int  sampleNo,
int  dataPointNo 
)

Return a reference into the DataVector which points to the specified data point.

Parameters
sampleNo- Input -
dataPointNo- Input -

References forceResolve(), escript::DataReady::getDataAtOffsetRO(), escript::DataAbstract::getPointOffset(), getReady(), and isReady().

Referenced by getSampleDataByTag().

◆ getDataPointRW()

DataTypes::RealVectorType::reference Data::getDataPointRW ( int  sampleNo,
int  dataPointNo 
)

Return a reference into the DataVector which points to the specified data point.

Parameters
sampleNo- Input -
dataPointNo- Input -

References checkExclusiveWrite(), escript::DataReady::getDataAtOffsetRW(), escript::DataAbstract::getPointOffset(), and getReady().

Referenced by getSampleDataByTag().

◆ getDataPointShape()

const DataTypes::ShapeType& escript::Data::getDataPointShape ( ) const
inline

◆ getDataPointSize()

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 dudley::Assemble_AverageElementData(), finley::Assemble_AverageElementData(), dudley::Assemble_CopyElementData(), finley::Assemble_CopyElementData(), dudley::Assemble_CopyNodalData(), finley::Assemble_CopyNodalData(), dudley::Assemble_gradient(), finley::Assemble_gradient(), dudley::Assemble_integrate(), finley::Assemble_integrate(), dudley::Assemble_interpolate(), finley::Assemble_interpolate(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), dudley::AssembleParameters::AssembleParameters(), finley::AssembleParameters::AssembleParameters(), speckley::SpeckleyDomain::assemblePDE(), ripley::RipleyDomain::assemblePDE(), speckley::SpeckleyDomain::assemblePDEBoundary(), ripley::RipleyDomain::assemblePDEBoundary(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystemReduced(), speckley::SpeckleyDomain::assemblePDEDirac(), ripley::RipleyDomain::assemblePDEDirac(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystemReduced(), ripley::RipleyDomain::averageData(), bessel(), escript::C_TensorUnaryOperation(), escript::condEval(), paso::TransportProblem::copyConstraint(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), copyWithMask(), ripley::RipleyDomain::dofToNodes(), getDataPointShape(), speckley::Brick::gradient_order10(), speckley::Rectangle::gradient_order10(), speckley::Brick::gradient_order2(), speckley::Rectangle::gradient_order2(), speckley::Brick::gradient_order3(), speckley::Rectangle::gradient_order3(), speckley::Brick::gradient_order4(), speckley::Rectangle::gradient_order4(), speckley::Brick::gradient_order5(), speckley::Rectangle::gradient_order5(), speckley::Brick::gradient_order6(), speckley::Rectangle::gradient_order6(), speckley::Brick::gradient_order7(), speckley::Rectangle::gradient_order7(), speckley::Brick::gradient_order8(), speckley::Rectangle::gradient_order8(), speckley::Brick::gradient_order9(), speckley::Rectangle::gradient_order9(), escript::AbstractTransportProblem::insertConstraint(), speckley::Brick::integral_order10(), speckley::Rectangle::integral_order10(), speckley::Brick::integral_order2(), speckley::Rectangle::integral_order2(), speckley::Brick::integral_order3(), speckley::Rectangle::integral_order3(), speckley::Brick::integral_order4(), speckley::Rectangle::integral_order4(), speckley::Brick::integral_order5(), speckley::Rectangle::integral_order5(), speckley::Brick::integral_order6(), speckley::Rectangle::integral_order6(), speckley::Brick::integral_order7(), speckley::Rectangle::integral_order7(), speckley::Brick::integral_order8(), speckley::Rectangle::integral_order8(), speckley::Brick::integral_order9(), speckley::Rectangle::integral_order9(), integrateWorker(), speckley::RipleyCoupler::interpolate(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodes(), ripley::MultiRectangle::interpolateElementsToElementsCoarser(), ripley::MultiBrick::interpolateElementsToElementsCoarser(), ripley::MultiRectangle::interpolateElementsToElementsFiner(), ripley::MultiBrick::interpolateElementsToElementsFiner(), speckley::Brick::interpolateFromCorners(), speckley::Rectangle::interpolateFromCorners(), speckley::Brick::interpolateNodesOnElements(), speckley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::MultiRectangle::interpolateNodesToElementsFiner(), ripley::MultiBrick::interpolateNodesToElementsFiner(), ripley::MultiRectangle::interpolateNodesToNodesFiner(), ripley::MultiBrick::interpolateNodesToNodesFiner(), speckley::SpeckleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFiner(), ripley::MultiBrick::interpolateReducedToElementsFiner(), ripley::MultiRectangle::interpolateReducedToReducedFiner(), ripley::MultiBrick::interpolateReducedToReducedFiner(), speckley::SpeckleyDomain::multiplyData(), ripley::RipleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), paso::SystemMatrix::nullifyRowsAndCols(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), speckley::Brick::reduction_order10(), speckley::Rectangle::reduction_order10(), speckley::Brick::reduction_order2(), speckley::Rectangle::reduction_order2(), speckley::Brick::reduction_order3(), speckley::Rectangle::reduction_order3(), speckley::Brick::reduction_order4(), speckley::Rectangle::reduction_order4(), speckley::Brick::reduction_order5(), speckley::Rectangle::reduction_order5(), speckley::Brick::reduction_order6(), speckley::Rectangle::reduction_order6(), speckley::Brick::reduction_order7(), speckley::Rectangle::reduction_order7(), speckley::Brick::reduction_order8(), speckley::Rectangle::reduction_order8(), speckley::Brick::reduction_order9(), speckley::Rectangle::reduction_order9(), dudley::NodeFile::setCoordinates(), finley::NodeFile::setCoordinates(), dudley::ElementFile::setTags(), finley::ElementFile::setTags(), dudley::NodeFile::setTags(), finley::NodeFile::setTags(), paso::TransportProblem::setToSolution(), paso::SystemMatrix::setToSolution(), escript::AbstractTransportProblem::solve(), escript::AbstractSystemMatrix::solve(), toListOfTuples(), speckley::RipleyCoupler::validInterpolation(), escript::AbstractSystemMatrix::vectorMultiply(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), speckley::Rectangle::writeBinaryGridImpl(), and paso::SystemMatrix::ypAx().

◆ getDataRO() [1/2]

const DataTypes::real_t * escript::Data::getDataRO ( DataTypes::real_t  dummy = 0) const
inline

Return a pointer to the beginning of the underlying data.

Warning
please avoid using this method since it by-passes possible lazy improvements. May be removed without notice.
Returns
pointer to the data.

References getNumSamples(), getReady(), escript::DataReady::getTypedVectorRO(), and isLazy().

Referenced by dudley::Assemble_CopyNodalData(), finley::Assemble_CopyNodalData(), getNoValues(), escript::MPIDataReducer::groupSend(), weipa::DataVar::initFromEscript(), and escript::MPIDataReducer::sendTo().

◆ getDataRO() [2/2]

const DataTypes::cplx_t * escript::Data::getDataRO ( DataTypes::cplx_t  dummy) const
inline

◆ getDomain()

const_Domain_ptr escript::Data::getDomain ( ) const
inline

◆ getDomainPython()

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().

◆ getExpandedVectorReference() [1/2]

DataTypes::RealVectorType & Data::getExpandedVectorReference ( DataTypes::real_t  dummy = 0)

Ensures that the Data is expanded and returns its underlying vector Does not check for exclusive write so do that before calling if sharing Is a posibility.

Warning
For domain implementors only. Using this function will avoid using optimisations like lazy evaluation. It is intended to allow quick initialisation of Data by domain; not as a bypass around escript's other mechanisms.

References expand(), getReady(), escript::DataReady::getTypedVectorRW(), and isExpanded().

Referenced by escript::MPIDataReducer::groupSend(), hasNoSamples(), ripley::Brick::interpolateNodesOnFaces(), escript::TestDomain::randomFill(), dudley::DudleyDomain::randomFill(), finley::FinleyDomain::randomFill(), ripley::Rectangle::randomFillWorker(), and escript::MPIDataReducer::reduceRemoteValues().

◆ getExpandedVectorReference() [2/2]

DataTypes::CplxVectorType & Data::getExpandedVectorReference ( DataTypes::cplx_t  dummy)

◆ getFunctionSpace()

const FunctionSpace& escript::Data::getFunctionSpace ( ) const
inline

Return the function space.

References m_data.

Referenced by __add__(), __div__(), __mul__(), __rdiv__(), __rsub__(), __sub__(), antihermitian(), antisymmetric(), dudley::Assemble_CopyNodalData(), finley::Assemble_CopyNodalData(), finley::Assemble_getNormal(), finley::Assemble_getSize(), dudley::Assemble_gradient(), finley::Assemble_gradient(), dudley::Assemble_interpolate(), finley::Assemble_interpolate(), dudley::Assemble_LumpedSystem(), finley::Assemble_LumpedSystem(), dudley::Assemble_NodeCoordinates(), finley::Assemble_NodeCoordinates(), dudley::Assemble_PDE(), finley::Assemble_PDE(), speckley::Brick::assembleGradient(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), speckley::Rectangle::assembleGradient(), speckley::SpeckleyDomain::assemblePDE(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), bessel(), BOOST_PYTHON_MODULE(), escript::C_GeneralTensorProduct(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::condEval(), paso::TransportProblem::copyConstraint(), copyWithMask(), Data(), dp_algorithm(), eigenvalues(), eigenvalues_and_eigenvectors(), get_MPIComm(), escript::MPIDataReducer::getCompatibilityInfo(), getDomain(), getDomainPython(), getTagNumber(), finley::util::hasReducedIntegrationOrder(), dudley::hasReducedIntegrationOrder(), hermitian(), imag(), init_from_data_and_fs(), weipa::DataVar::initFromEscript(), ripley::MultiBrick::interpolateAcross(), ripley::MultiRectangle::interpolateAcross(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodes(), interpolateFromTable1D(), interpolateFromTable2D(), interpolateFromTable3D(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), escript::TestDomain::interpolateOnDomain(), escript::NullDomain::interpolateOnDomain(), speckley::SpeckleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), dudley::DudleyDomain::interpolateOnDomain(), finley::FinleyDomain::interpolateOnDomain(), matrixInverse(), nonuniforminterp(), nonuniformslope(), paso::SystemMatrix::nullifyRowsAndCols(), escript::operator*(), operator*=(), escript::operator+(), operator+=(), escript::operator-(), operator-=(), escript::operator/(), operator/=(), powO(), probeInterpolation(), speckley::Brick::randomFill(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), escript::MPIDataReducer::reduceLocalValue(), escript::MPIDataReducer::reduceRemoteValues(), rtruedivO(), escript::saveDataCSV(), setItemD(), setItemO(), dudley::DudleyDomain::setNewX(), finley::FinleyDomain::setNewX(), setTaggedValueByName(), escript::FunctionSpace::setTags(), escript::FunctionSpace::setTagsByString(), speckley::SpeckleyDomain::setToGradient(), ripley::RipleyDomain::setToGradient(), dudley::DudleyDomain::setToGradient(), finley::FinleyDomain::setToGradient(), speckley::SpeckleyDomain::setToIntegrals(), ripley::RipleyDomain::setToIntegrals(), dudley::DudleyDomain::setToIntegrals(), finley::FinleyDomain::setToIntegrals(), ripley::Brick::setToNormal(), ripley::Rectangle::setToNormal(), ripley::MultiBrick::setToNormal(), dudley::DudleyDomain::setToNormal(), finley::FinleyDomain::setToNormal(), ripley::Brick::setToSize(), ripley::Rectangle::setToSize(), speckley::Brick::setToSize(), speckley::Rectangle::setToSize(), ripley::MultiBrick::setToSize(), dudley::DudleyDomain::setToSize(), finley::FinleyDomain::setToSize(), paso::TransportProblem::setToSolution(), paso::SystemMatrix::setToSolution(), speckley::SpeckleyDomain::setToX(), ripley::RipleyDomain::setToX(), dudley::DudleyDomain::setToX(), finley::FinleyDomain::setToX(), setToZero(), escript::AbstractTransportProblem::solve(), escript::AbstractSystemMatrix::solve(), swapaxes(), symmetric(), TensorSelfUpdateBinaryOperation(), trace(), transpose(), truedivO(), speckley::RipleyCoupler::validInterpolation(), speckley::WaveAssembler2D::WaveAssembler2D(), ripley::WaveAssembler2D::WaveAssembler2D(), ripley::WaveAssembler3D::WaveAssembler3D(), speckley::WaveAssembler3D::WaveAssembler3D(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), speckley::Rectangle::writeBinaryGridImpl(), and paso::SystemMatrix::ypAx().

◆ getItem()

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.

Parameters
key- Input - python slice tuple specifying slice to return.

References getDataPointRank(), getDataPointShape(), getSlice(), and escript::DataTypes::getSliceRegion().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ getLength()

DataTypes::RealVectorType::size_type Data::getLength ( ) const

Return the number of doubles stored for this Data.

References m_data.

Referenced by getDataPointShape(), escript::MPIDataReducer::groupSend(), escript::MPIDataReducer::sendTo(), and toString().

◆ getNoValues()

int escript::Data::getNoValues ( ) const
inline

Return the number of values in the shape for this object.

References dump(), getDataRO(), getSampleDataRO(), getSampleDataRW(), m_data, and toListOfTuples().

Referenced by get_MPIComm(), lazyAlgWorker(), and setToZero().

◆ getNumberOfTaggedValues()

size_t Data::getNumberOfTaggedValues ( ) const

For tagged Data returns the number of tags with values. For non-tagged data will return 0 (even Data which has been expanded from tagged).

References isTagged(), and m_data.

Referenced by escript::MPIDataReducer::getCompatibilityInfo(), and hasNoSamples().

◆ getNumDataPoints()

int escript::Data::getNumDataPoints ( ) const
inline

◆ getNumDataPointsPerSample()

int escript::Data::getNumDataPointsPerSample ( ) const
inline

◆ getNumSamples()

int escript::Data::getNumSamples ( ) const
inline

◆ getReady() [1/2]

const DataReady* escript::Data::getReady ( ) const
inlineprivate

◆ getReady() [2/2]

DataReady* escript::Data::getReady ( )
inlineprivate

References ESYS_ASSERT.

◆ getReadyPtr() [1/2]

DataReady_ptr escript::Data::getReadyPtr ( )
inlineprivate

References ESYS_ASSERT, and m_data.

Referenced by copyWithMask().

◆ getReadyPtr() [2/2]

const_DataReady_ptr escript::Data::getReadyPtr ( ) const
inlineprivate

References ESYS_ASSERT, and m_data.

◆ getSampleDataByTag() [1/2]

DataTypes::real_t* escript::Data::getSampleDataByTag ( int  tag,
DataTypes::real_t  dummy = 0 
)
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.

Parameters
tag- Input - the tag key.

References m_data.

◆ getSampleDataByTag() [2/2]

DataTypes::cplx_t* escript::Data::getSampleDataByTag ( int  tag,
DataTypes::cplx_t  dummy 
)
inline

◆ getSampleDataRO() [1/2]

const DataTypes::real_t * escript::Data::getSampleDataRO ( DataTypes::RealVectorType::size_type  sampleNo,
DataTypes::real_t  dummy = 0 
) const
inline

Return the sample data for the given sample no. Please do not use this unless you NEED to access samples individually.

Parameters
sampleNo- Input - the given sample no.
Returns
pointer to the sample data.

References getReady(), escript::DataReady::getSampleDataRO(), m_data, and escript::DataLazy::resolveSample().

Referenced by dudley::Assemble_AverageElementData(), finley::Assemble_AverageElementData(), dudley::Assemble_CopyElementData(), finley::Assemble_CopyElementData(), dudley::Assemble_CopyNodalData(), finley::Assemble_CopyNodalData(), dudley::Assemble_gradient(), finley::Assemble_gradient(), dudley::Assemble_integrate(), finley::Assemble_integrate(), dudley::Assemble_interpolate(), finley::Assemble_interpolate(), dudley::Assemble_LumpedSystem(), finley::Assemble_LumpedSystem(), dudley::Assemble_PDE_Points(), finley::Assemble_PDE_Points(), finley::Assemble_PDE_Single_1D(), dudley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_2D(), dudley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_C(), finley::Assemble_PDE_System_1D(), dudley::Assemble_PDE_System_2D(), finley::Assemble_PDE_System_2D(), dudley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_C(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingleReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingleReduced(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystemReduced(), speckley::SpeckleyDomain::assemblePDEDirac(), ripley::RipleyDomain::assemblePDEDirac(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingleReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingleReduced(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystemReduced(), ripley::RipleyDomain::averageData(), speckley::RipleyCoupler::calculate(), escript::condEval(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), ripley::RipleyDomain::dofToNodes(), get_MPIComm(), getNoValues(), speckley::Brick::gradient_order10(), speckley::Rectangle::gradient_order10(), speckley::Brick::gradient_order2(), speckley::Rectangle::gradient_order2(), speckley::Brick::gradient_order3(), speckley::Rectangle::gradient_order3(), speckley::Brick::gradient_order4(), speckley::Rectangle::gradient_order4(), speckley::Brick::gradient_order5(), speckley::Rectangle::gradient_order5(), speckley::Brick::gradient_order6(), speckley::Rectangle::gradient_order6(), speckley::Brick::gradient_order7(), speckley::Rectangle::gradient_order7(), speckley::Brick::gradient_order8(), speckley::Rectangle::gradient_order8(), speckley::Brick::gradient_order9(), speckley::Rectangle::gradient_order9(), weipa::DataVar::initFromEscript(), speckley::Brick::integral_order10(), speckley::Rectangle::integral_order10(), speckley::Brick::integral_order2(), speckley::Rectangle::integral_order2(), speckley::Brick::integral_order3(), speckley::Rectangle::integral_order3(), speckley::Brick::integral_order4(), speckley::Rectangle::integral_order4(), speckley::Brick::integral_order5(), speckley::Rectangle::integral_order5(), speckley::Brick::integral_order6(), speckley::Rectangle::integral_order6(), speckley::Brick::integral_order7(), speckley::Rectangle::integral_order7(), speckley::Brick::integral_order8(), speckley::Rectangle::integral_order8(), speckley::Brick::integral_order9(), speckley::Rectangle::integral_order9(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodes(), ripley::MultiRectangle::interpolateElementsToElementsCoarser(), ripley::MultiBrick::interpolateElementsToElementsCoarser(), ripley::MultiRectangle::interpolateElementsToElementsFiner(), ripley::MultiBrick::interpolateElementsToElementsFiner(), speckley::Brick::interpolateFromCorners(), speckley::Rectangle::interpolateFromCorners(), speckley::Brick::interpolateNodesOnElements(), speckley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::MultiRectangle::interpolateNodesToElementsFiner(), ripley::MultiBrick::interpolateNodesToElementsFiner(), ripley::MultiRectangle::interpolateNodesToNodesFiner(), ripley::MultiBrick::interpolateNodesToNodesFiner(), speckley::SpeckleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFiner(), ripley::MultiBrick::interpolateReducedToElementsFiner(), ripley::MultiRectangle::interpolateReducedToReducedFiner(), ripley::MultiBrick::interpolateReducedToReducedFiner(), speckley::SpeckleyDomain::multiplyData(), ripley::RipleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), speckley::Brick::reduction_order10(), speckley::Rectangle::reduction_order10(), speckley::Brick::reduction_order2(), speckley::Rectangle::reduction_order2(), speckley::Brick::reduction_order3(), speckley::Rectangle::reduction_order3(), speckley::Brick::reduction_order4(), speckley::Rectangle::reduction_order4(), speckley::Brick::reduction_order5(), speckley::Rectangle::reduction_order5(), speckley::Brick::reduction_order6(), speckley::Rectangle::reduction_order6(), speckley::Brick::reduction_order7(), speckley::Rectangle::reduction_order7(), speckley::Brick::reduction_order8(), speckley::Rectangle::reduction_order8(), speckley::Brick::reduction_order9(), speckley::Rectangle::reduction_order9(), escript::saveDataCSV(), dudley::NodeFile::setCoordinates(), finley::NodeFile::setCoordinates(), dudley::ElementFile::setTags(), finley::ElementFile::setTags(), dudley::NodeFile::setTags(), finley::NodeFile::setTags(), speckley::SpeckleyDomain::setTags(), ripley::RipleyDomain::setTags(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), and speckley::Rectangle::writeBinaryGridImpl().

◆ getSampleDataRO() [2/2]

const DataTypes::cplx_t* escript::Data::getSampleDataRO ( DataTypes::CplxVectorType::size_type  sampleNo,
DataTypes::cplx_t  dummy 
) const

◆ getSampleDataRW() [1/2]

DataTypes::real_t * escript::Data::getSampleDataRW ( DataTypes::RealVectorType::size_type  sampleNo,
DataTypes::real_t  dummy = 0 
)
inline

Return the sample data for the given sample no. Please do not use this unless you NEED to access samples individually.

Parameters
sampleNo- Input - the given sample no.
Returns
pointer to the sample data.

References getReady(), escript::DataReady::getSampleDataRW(), and isLazy().

Referenced by ripley::Brick::addToMatrixAndRHS(), ripley::Rectangle::addToMatrixAndRHS(), dudley::Assemble_AverageElementData(), finley::Assemble_AverageElementData(), dudley::Assemble_CopyElementData(), finley::Assemble_CopyElementData(), dudley::Assemble_CopyNodalData(), finley::Assemble_CopyNodalData(), dudley::Assemble_getNormal(), finley::Assemble_getNormal(), dudley::Assemble_getSize(), finley::Assemble_getSize(), dudley::Assemble_gradient(), finley::Assemble_gradient(), dudley::Assemble_interpolate(), finley::Assemble_interpolate(), dudley::Assemble_LumpedSystem(), finley::Assemble_LumpedSystem(), dudley::Assemble_NodeCoordinates(), finley::Assemble_NodeCoordinates(), dudley::Assemble_PDE_Points(), finley::Assemble_PDE_Points(), finley::Assemble_PDE_Single_1D(), dudley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_2D(), dudley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_C(), finley::Assemble_PDE_System_1D(), dudley::Assemble_PDE_System_2D(), finley::Assemble_PDE_System_2D(), dudley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_C(), speckley::Brick::assembleCoordinates(), ripley::Brick::assembleCoordinates(), ripley::Rectangle::assembleCoordinates(), speckley::Rectangle::assembleCoordinates(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), speckley::Rectangle::assembleGradient(), speckley::SpeckleyDomain::assemblePDEDirac(), ripley::RipleyDomain::assemblePDEDirac(), speckley::DefaultAssembler2D::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), speckley::DefaultAssembler2D::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::RipleyDomain::averageData(), paso::TransportProblem::copyConstraint(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), ripley::RipleyDomain::dofToNodes(), getNoValues(), speckley::Brick::gradient_order10(), speckley::Rectangle::gradient_order10(), speckley::Brick::gradient_order2(), speckley::Rectangle::gradient_order2(), speckley::Brick::gradient_order3(), speckley::Rectangle::gradient_order3(), speckley::Brick::gradient_order4(), speckley::Rectangle::gradient_order4(), speckley::Brick::gradient_order5(), speckley::Rectangle::gradient_order5(), speckley::Brick::gradient_order6(), speckley::Rectangle::gradient_order6(), speckley::Brick::gradient_order7(), speckley::Rectangle::gradient_order7(), speckley::Brick::gradient_order8(), speckley::Rectangle::gradient_order8(), speckley::Brick::gradient_order9(), speckley::Rectangle::gradient_order9(), speckley::RipleyCoupler::interpolate(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodes(), ripley::MultiRectangle::interpolateElementsToElementsCoarser(), ripley::MultiBrick::interpolateElementsToElementsCoarser(), ripley::MultiRectangle::interpolateElementsToElementsFiner(), ripley::MultiBrick::interpolateElementsToElementsFiner(), speckley::Brick::interpolateFromCorners(), speckley::Rectangle::interpolateFromCorners(), speckley::Brick::interpolateNodesOnElements(), speckley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::MultiRectangle::interpolateNodesToElementsFiner(), ripley::MultiBrick::interpolateNodesToElementsFiner(), ripley::MultiRectangle::interpolateNodesToNodesFiner(), ripley::MultiBrick::interpolateNodesToNodesFiner(), speckley::SpeckleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFiner(), ripley::MultiBrick::interpolateReducedToElementsFiner(), ripley::MultiRectangle::interpolateReducedToReducedFiner(), ripley::MultiBrick::interpolateReducedToReducedFiner(), speckley::SpeckleyDomain::multiplyData(), ripley::RipleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), paso::SystemMatrix::nullifyRowsAndCols(), print(), speckley::Brick::randomFill(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), speckley::Brick::reduction_order10(), speckley::Rectangle::reduction_order10(), speckley::Brick::reduction_order2(), speckley::Rectangle::reduction_order2(), speckley::Brick::reduction_order3(), speckley::Rectangle::reduction_order3(), speckley::Brick::reduction_order4(), speckley::Rectangle::reduction_order4(), speckley::Brick::reduction_order5(), speckley::Rectangle::reduction_order5(), speckley::Brick::reduction_order6(), speckley::Rectangle::reduction_order6(), speckley::Brick::reduction_order7(), speckley::Rectangle::reduction_order7(), speckley::Brick::reduction_order8(), speckley::Rectangle::reduction_order8(), speckley::Brick::reduction_order9(), speckley::Rectangle::reduction_order9(), ripley::Brick::setToNormal(), ripley::Rectangle::setToNormal(), ripley::MultiBrick::setToNormal(), ripley::Brick::setToSize(), speckley::Brick::setToSize(), ripley::Rectangle::setToSize(), speckley::Rectangle::setToSize(), ripley::MultiBrick::setToSize(), paso::TransportProblem::setToSolution(), paso::SystemMatrix::setToSolution(), speckley::RipleyCoupler::shareBrickXFaces(), speckley::RipleyCoupler::shareBrickYFaces(), speckley::RipleyCoupler::shareBrickZFaces(), speckley::RipleyCoupler::shareRectangleXEdges(), speckley::RipleyCoupler::shareRectangleYEdges(), and paso::SystemMatrix::ypAx().

◆ getSampleDataRW() [2/2]

DataTypes::cplx_t* escript::Data::getSampleDataRW ( DataTypes::RealVectorType::size_type  sampleNo,
DataTypes::cplx_t  dummy 
)

◆ getShapeTuple()

const bp::tuple Data::getShapeTuple ( ) const

Return the data point shape as a tuple of integers.

References getDataPointRank(), and getDataPointShape().

Referenced by BOOST_PYTHON_MODULE(), and getDataPointShape().

◆ getSlice()

Data Data::getSlice ( const DataTypes::RegionType region) const

Return a Data object containing the specified slice of this Data object.

Parameters
region- Input - Region to copy.

References Data().

Referenced by getItem(), and hasNoSamples().

◆ getTagNumber()

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().

◆ getValueOfDataPointAsTuple()

const bp::object Data::getValueOfDataPointAsTuple ( int  dataPointNo)

Return the value of a data point as a python tuple.

References forceResolve(), getDataAtOffsetRO(), getDataOffset(), getDataPointShape(), getNumDataPointsPerSample(), getNumSamples(), and isComplex().

Referenced by BOOST_PYTHON_MODULE().

◆ getValueOfGlobalDataPointAsTuple()

const bp::object Data::getValueOfGlobalDataPointAsTuple ( int  procNo,
int  dataPointNo 
)

◆ grad()

Data Data::grad ( ) const

◆ gradOn()

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 getDataPointShape(), escript::FunctionSpace::getDim(), escript::FunctionSpace::getDomain(), getDomain(), isEmpty(), and THROWONCOMPLEX.

Referenced by BOOST_PYTHON_MODULE(), grad(), and hasNoSamples().

◆ hasNaN()

bool Data::hasNaN ( )

returns return true if data contains NaN.

Warning
This is dependent on the ability to reliably detect NaNs on your compiler. See the nancheck function in LocalOps for details.

References getReady(), escript::DataReady::hasNaN(), isLazy(), and resolve().

Referenced by BOOST_PYTHON_MODULE().

◆ hasNoSamples()

bool escript::Data::hasNoSamples ( ) const
inline

Return true if this object contains no samples. This is not the same as isEmpty()

References __add__(), __div__(), __mul__(), __rdiv__(), __rsub__(), __sub__(), abs(), acos(), acosh(), antihermitian(), antisymmetric(), asin(), asinh(), atan(), atanh(), bessel(), besselFirstKind(), besselSecondKind(), borrowData(), borrowDataPtr(), borrowReadyPtr(), calc_maxGlobalDataPoint(), calc_minGlobalDataPoint(), complicate(), conjugate(), copyWithMask(), cos(), cosh(), eigenvalues(), eigenvalues_and_eigenvectors(), erf(), exp(), get_MPIComm(), get_MPIRank(), get_MPISize(), getDataAtOffsetRO(), getDataAtOffsetRW(), getExpandedVectorReference(), getItem(), getNumberOfTaggedValues(), getSlice(), grad(), gradOn(), hermitian(), imag(), inf(), inf_const(), infWorker(), init_from_data_and_fs(), integrateToTuple(), integrateToTuple_const(), integrateWorker(), interpolate(), interpolateFromTable1D(), interpolateFromTable1DP(), interpolateFromTable2D(), interpolateFromTable2DP(), interpolateFromTable3D(), interpolateFromTable3DP(), lazyAlgWorker(), log(), log10(), Lsup(), Lsup_const(), LsupWorker(), m_data, matrixInverse(), maxGlobalDataPoint(), maxval(), maxval_nonlazy(), minGlobalDataPoint(), minval(), minval_nonlazy(), neg(), nonuniforminterp(), nonuniformslope(), oneOver(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), pos(), powD(), powO(), print(), probeInterpolation(), real(), rpowO(), rtruedivO(), setItemD(), setItemO(), setSlice(), setTaggedValue(), setTaggedValueByName(), setTaggedValueFromCPP(), setToZero(), sign(), sin(), sinh(), sqrt(), sup(), sup_const(), supWorker(), swapaxes(), symmetric(), tan(), tanh(), trace(), transpose(), truedivD(), truedivO(), unaryOp2(), whereNegative(), whereNonNegative(), whereNonPositive(), whereNonZero(), wherePositive(), and whereZero().

Referenced by infWorker(), and supWorker().

◆ hermitian()

Data Data::hermitian ( ) const

Return the hermitian part of a matrix which is half the matrix plus its adjoint.

References getDataPointRank(), getDataPointShape(), getFunctionSpace(), escript::HER, isComplex(), m_data, MAKELAZYOP, symmetric(), and typeMatchRight().

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ imag()

Data Data::imag ( ) const

◆ inf()

real_t Data::inf ( )

Return the minimum value of this Data object.

The method is not const because lazy data needs to be expanded before inf can be computed. The _const form can be used when the Data object is const, however this will only work for Data which is not Lazy.

For Data which contain no samples (or tagged Data for which no tags in use have a value) a large positive value is returned.

References actsExpanded(), CHECK_DO_CRES, infWorker(), isComplex(), isLazy(), lazyAlgWorker(), MPI_MIN, and resolve().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ inf_const()

real_t Data::inf_const ( ) const

References infWorker(), isComplex(), and isLazy().

Referenced by hasNoSamples(), and toString().

◆ infWorker()

real_t Data::infWorker ( ) const
private

◆ init_from_data_and_fs()

void Data::init_from_data_and_fs ( const Data inData,
const FunctionSpace functionspace 
)
private

◆ initialise() [1/5]

void Data::initialise ( const DataTypes::RealVectorType 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(), and operandCheck().

◆ initialise() [2/5]

void Data::initialise ( const DataTypes::CplxVectorType value,
const DataTypes::ShapeType shape,
const FunctionSpace what,
bool  expanded 
)
private

◆ initialise() [3/5]

void Data::initialise ( const WrappedArray value,
const FunctionSpace what,
bool  expanded 
)
private

◆ initialise() [4/5]

void Data::initialise ( const DataTypes::real_t  value,
const DataTypes::ShapeType shape,
const FunctionSpace what,
bool  expanded 
)
private

References set_m_data().

◆ initialise() [5/5]

void Data::initialise ( const DataTypes::cplx_t  value,
const DataTypes::ShapeType shape,
const FunctionSpace what,
bool  expanded 
)
private

References set_m_data().

◆ integrateToTuple()

bp::object Data::integrateToTuple ( )

Calculate the integral over the function space domain as a python tuple.

References expand(), integrateWorker(), and isLazy().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ integrateToTuple_const()

bp::object Data::integrateToTuple_const ( ) const

Calculate the integral over the function space domain as a python tuple.

References integrateWorker(), isLazy(), and THROWONCOMPLEX.

Referenced by hasNoSamples().

◆ integrateWorker()

bp::object Data::integrateWorker ( ) const
private

◆ interpolate()

Data Data::interpolate ( const FunctionSpace functionspace) const

◆ interpolateFromTable1D()

Data Data::interpolateFromTable1D ( const WrappedArray table,
DataTypes::real_t  Amin,
DataTypes::real_t  Astep,
DataTypes::real_t  undef,
bool  check_boundaries 
)

◆ interpolateFromTable1DP()

Data Data::interpolateFromTable1DP ( boost::python::object  table,
DataTypes::real_t  Amin,
DataTypes::real_t  Astep,
DataTypes::real_t  undef,
bool  check_boundaries 
)

◆ interpolateFromTable2D()

Data Data::interpolateFromTable2D ( const WrappedArray table,
DataTypes::real_t  Amin,
DataTypes::real_t  Astep,
DataTypes::real_t  undef,
Data B,
DataTypes::real_t  Bmin,
DataTypes::real_t  Bstep,
bool  check_boundaries 
)

◆ interpolateFromTable2DP()

Data Data::interpolateFromTable2DP ( boost::python::object  table,
DataTypes::real_t  Amin,
DataTypes::real_t  Astep,
Data B,
DataTypes::real_t  Bmin,
DataTypes::real_t  Bstep,
DataTypes::real_t  undef,
bool  check_boundaries 
)

◆ interpolateFromTable3D()

Data Data::interpolateFromTable3D ( const WrappedArray table,
DataTypes::real_t  Amin,
DataTypes::real_t  Astep,
DataTypes::real_t  undef,
Data B,
DataTypes::real_t  Bmin,
DataTypes::real_t  Bstep,
Data C,
DataTypes::real_t  Cmin,
DataTypes::real_t  Cstep,
bool  check_boundaries 
)

◆ interpolateFromTable3DP()

Data Data::interpolateFromTable3DP ( boost::python::object  table,
DataTypes::real_t  Amin,
DataTypes::real_t  Astep,
Data B,
DataTypes::real_t  Bmin,
DataTypes::real_t  Bstep,
Data C,
DataTypes::real_t  Cmin,
DataTypes::real_t  Cstep,
DataTypes::real_t  undef,
bool  check_boundaries 
)

◆ isComplex()

bool Data::isComplex ( ) const

◆ isConstant()

bool Data::isConstant ( ) const

◆ isDataPointShapeEqual()

bool escript::Data::isDataPointShapeEqual ( int  rank,
const int *  dimensions 
) const
inline

◆ isEmpty()

bool Data::isEmpty ( ) const

 Return true if this Data holds an instance of DataEmpty. This is _not_ the same as asking if the object 

contains datapoints.

References m_data.

Referenced by dudley::DudleyDomain::addPDEToRHS(), dudley::DudleyDomain::addPDEToSystem(), dudley::DudleyDomain::addPDEToTransportProblem(), speckley::SpeckleyDomain::addToRHS(), ripley::RipleyDomain::addToRHS(), dudley::Assemble_LumpedSystem(), finley::Assemble_LumpedSystem(), dudley::Assemble_PDE(), finley::Assemble_PDE(), dudley::Assemble_PDE_Points(), finley::Assemble_PDE_Points(), finley::Assemble_PDE_Single_1D(), dudley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_2D(), dudley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_C(), finley::Assemble_PDE_System_1D(), dudley::Assemble_PDE_System_2D(), finley::Assemble_PDE_System_2D(), dudley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_C(), dudley::AssembleParameters::AssembleParameters(), finley::AssembleParameters::AssembleParameters(), speckley::SpeckleyDomain::assemblePDE(), ripley::RipleyDomain::assemblePDE(), speckley::SpeckleyDomain::assemblePDEBoundary(), ripley::RipleyDomain::assemblePDEBoundary(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingleReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingleReduced(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystemReduced(), speckley::SpeckleyDomain::assemblePDEDirac(), ripley::RipleyDomain::assemblePDEDirac(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingleReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingleReduced(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystemReduced(), bessel(), BOOST_PYTHON_MODULE(), escript::C_TensorBinaryOperation(), escript::C_TensorUnaryOperation(), escript::convertToData(), escript::MPIDataReducer::copyValueFrom(), copyWithMask(), dp_algorithm(), expand(), getTagNumber(), grad(), gradOn(), init_from_data_and_fs(), escript::AbstractTransportProblem::insertConstraint(), isDataPointShapeEqual(), numSamplesEqual(), escript::MPIDataReducer::reduceLocalValue(), reduction(), setToZero(), tag(), speckley::WaveAssembler2D::WaveAssembler2D(), and speckley::WaveAssembler3D::WaveAssembler3D().

◆ isExpanded()

bool Data::isExpanded ( ) const

◆ isLazy()

bool Data::isLazy ( ) const

◆ isProtected()

bool Data::isProtected ( ) const

◆ isReady()

bool Data::isReady ( ) const

Return true if this data is ready.

References m_data.

Referenced by BOOST_PYTHON_MODULE(), and getDataPointRO().

◆ isShared()

bool escript::Data::isShared ( ) const
inlineprivate

◆ isTagged()

bool Data::isTagged ( ) const

◆ lazyAlgWorker() [1/2]

template<class BinaryOp >
DataTypes::real_t escript::Data::lazyAlgWorker ( DataTypes::real_t  init)
private

Referenced by hasNoSamples(), and inf().

◆ lazyAlgWorker() [2/2]

template<class BinaryOp >
real_t escript::Data::lazyAlgWorker ( real_t  init)

◆ log()

Data Data::log ( ) const

Return the natural log of each data point of this Data object.

References escript::C_TensorUnaryOperation(), escript::LOG, and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ log10()

Data Data::log10 ( ) const

Return the log to base 10 of each data point of this Data object.

References escript::C_TensorUnaryOperation(), escript::LOG10, and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ Lsup()

real_t Data::Lsup ( )

Return the maximum absolute value of this Data object.

The method is not const because lazy data needs to be expanded before Lsup can be computed. The _const form can be used when the Data object is const, however this will only work for Data which is not Lazy.

For Data which contain no samples (or tagged Data for which no tags in use have a value) zero is returned.

References actsExpanded(), CHECK_DO_CRES, isComplex(), isLazy(), LsupWorker(), MPI_MAX, and resolve().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ Lsup_const()

real_t Data::Lsup_const ( ) const

References isLazy(), and LsupWorker().

Referenced by hasNoSamples(), and toString().

◆ LsupWorker()

real_t Data::LsupWorker ( ) const
private

◆ matrixInverse()

Data Data::matrixInverse ( ) const

◆ maxGlobalDataPoint()

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.

Note
If you are working in python, please consider using Locator instead of manually manipulating process and point IDs.

References calc_maxGlobalDataPoint(), and THROWONCOMPLEX.

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ maxval()

Data Data::maxval ( ) const

Return the maximum value of each data point of this Data object.

References MAKELAZYOP, escript::MAXVAL, maxval_nonlazy(), and THROWONCOMPLEX.

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ maxval_nonlazy()

Data Data::maxval_nonlazy ( ) const
inlineprivate

◆ minGlobalDataPoint()

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.

Note
If you are working in python, please consider using Locator instead of manually manipulating process and point IDs.

References calc_minGlobalDataPoint(), and THROWONCOMPLEX.

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ minval()

Data Data::minval ( ) const

Return the minimum value of each data point of this Data object.

References MAKELAZYOP, escript::MINVAL, minval_nonlazy(), and THROWONCOMPLEX.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ minval_nonlazy()

Data Data::minval_nonlazy ( ) const
inlineprivate

◆ neg()

Data Data::neg ( ) const

Return the negation of each data point of this Data object.

References escript::C_TensorUnaryOperation(), MAKELAZYOP, and escript::NEG.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ nonuniforminterp()

Data Data::nonuniforminterp ( boost::python::object  in,
boost::python::object  out,
bool  check_boundaries 
)

◆ nonuniformslope()

Data Data::nonuniformslope ( boost::python::object  in,
boost::python::object  out,
bool  check_boundaries 
)

◆ numSamplesEqual()

bool escript::Data::numSamplesEqual ( int  numDataPointsPerSample,
int  numSamples 
) const
inline

◆ oneOver()

Data Data::oneOver ( ) const

◆ operandCheck()

void escript::Data::operandCheck ( const Data right) const
inlineprivate

Check *this and the right operand are compatible. Throws an exception if they aren't.

Parameters
right- Input - The right hand side.

References dp_algorithm(), initialise(), m_data, reduction(), typeMatchLeft(), and typeMatchRight().

Referenced by TensorSelfUpdateBinaryOperation().

◆ operator*=() [1/2]

Data & Data::operator*= ( const Data right)

Overloaded operator *=.

Parameters
right- Input - The right hand side.

References complicate(), exclusiveWrite(), isComplex(), isProtected(), MAKELAZYBINSELF, escript::MUL, and TensorSelfUpdateBinaryOperation().

Referenced by hasNoSamples().

◆ operator*=() [2/2]

Data & Data::operator*= ( const boost::python::object &  right)

◆ operator+=() [1/2]

Data & Data::operator+= ( const Data right)

Overloaded operator +=.

Parameters
right- Input - The right hand side.

References escript::ADD, complicate(), exclusiveWrite(), isComplex(), isProtected(), MAKELAZYBINSELF, and TensorSelfUpdateBinaryOperation().

Referenced by hasNoSamples().

◆ operator+=() [2/2]

Data & Data::operator+= ( const boost::python::object &  right)

◆ operator-=() [1/2]

Data & Data::operator-= ( const Data right)

Overloaded operator -=.

Parameters
right- Input - The right hand side.

References complicate(), exclusiveWrite(), isComplex(), isProtected(), MAKELAZYBINSELF, escript::SUB, and TensorSelfUpdateBinaryOperation().

Referenced by hasNoSamples().

◆ operator-=() [2/2]

Data & Data::operator-= ( const boost::python::object &  right)

◆ operator/=() [1/2]

Data & Data::operator/= ( const Data right)

Overloaded operator /=.

Parameters
right- Input - The right hand side.

References complicate(), escript::DIV, exclusiveWrite(), isComplex(), isProtected(), MAKELAZYBINSELF, and TensorSelfUpdateBinaryOperation().

Referenced by hasNoSamples().

◆ operator/=() [2/2]

Data & Data::operator/= ( const boost::python::object &  right)

◆ operator=()

Data & Data::operator= ( const Data other)

References m_data, m_protected, and set_m_data().

Referenced by hasNoSamples().

◆ pos()

Data Data::pos ( ) const

Return the identity of each data point of this Data object. Simply returns this object unmodified.

References copy(), and THROWONCOMPLEX.

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ powD()

Data Data::powD ( const Data right) const

Return the given power of each data point of this Data object.

Parameters
rightInput - the power to raise the object to.

References escript::C_TensorBinaryOperation(), MAKELAZYBIN, and escript::POW.

Referenced by BOOST_PYTHON_MODULE(), hasNoSamples(), powO(), and rpowO().

◆ powO()

Data Data::powO ( const boost::python::object &  right) const

Return the given power of each data point of this boost python object.

Parameters
rightInput - the power to raise the object to.

References getFunctionSpace(), and powD().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ print()

void Data::print ( void  )

print the data values to stdout. Used for debugging

References getNumDataPointsPerSample(), getNumSamples(), and getSampleDataRW().

Referenced by hasNoSamples().

◆ probeInterpolation()

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(), hasNoSamples(), and init_from_data_and_fs().

◆ real()

Data Data::real ( ) const

◆ reduction()

template<class BinaryFunction >
DataTypes::real_t escript::Data::reduction ( BinaryFunction  operation,
DataTypes::real_t  initial_value 
) const
inlineprivate

Perform the specified reduction algorithm on every element of every data point in this Data object according to the given function and return the single value result.

Perform the given Data object reduction algorithm on this and return the result. Given operation combines each element of each data point, thus argument object (*this) is a rank n Data object, and returned object is a scalar. Calls escript::algorithm.

References ESYS_ASSERT, escript::DataTagged::getDefaultOffset(), escript::DataAbstract::getFunctionSpace(), escript::FunctionSpace::getListOfTagsSTL(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataExpanded::getPointOffset(), escript::DataAbstract::getShape(), escript::DataTagged::getTagLookup(), escript::DataExpanded::getTypedVectorRO(), escript::DataConstant::getTypedVectorRO(), escript::DataTagged::getTypedVectorRO(), isConstant(), isEmpty(), isExpanded(), isLazy(), isTagged(), m_data, escript::reductionOpVector(), and tag().

Referenced by infWorker(), LsupWorker(), operandCheck(), and supWorker().

◆ replaceNaN() [1/2]

void Data::replaceNaN ( DataTypes::real_t  value)

replaces all NaN values with value

References getReady(), isLazy(), escript::DataReady::replaceNaN(), and resolve().

Referenced by replaceNaNPython().

◆ replaceNaN() [2/2]

void Data::replaceNaN ( DataTypes::cplx_t  value)

replaces all NaN values with value

References getReady(), isLazy(), escript::DataReady::replaceNaN(), and resolve().

◆ replaceNaNPython()

void Data::replaceNaNPython ( boost::python::object  obj)

replaces all NaN values with value

References replaceNaN().

Referenced by BOOST_PYTHON_MODULE().

◆ requireWrite()

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.

Warning
This method should only be called in single threaded sections of code. (It modifies m_data). Do not create any Data objects from this one between calling requireWrite and getSampleDataRW. Doing so might introduce additional sharing.

References exclusiveWrite(), and resolve().

Referenced by dudley::Assemble_AverageElementData(), finley::Assemble_AverageElementData(), dudley::Assemble_CopyElementData(), finley::Assemble_CopyElementData(), dudley::Assemble_CopyNodalData(), finley::Assemble_CopyNodalData(), dudley::Assemble_getNormal(), finley::Assemble_getNormal(), dudley::Assemble_getSize(), finley::Assemble_getSize(), dudley::Assemble_gradient(), finley::Assemble_gradient(), dudley::Assemble_interpolate(), finley::Assemble_interpolate(), dudley::Assemble_LumpedSystem(), finley::Assemble_LumpedSystem(), dudley::Assemble_NodeCoordinates(), finley::Assemble_NodeCoordinates(), dudley::Assemble_PDE_Points(), finley::Assemble_PDE_Points(), finley::Assemble_PDE_Single_1D(), dudley::Assemble_PDE_Single_2D(), finley::Assemble_PDE_Single_2D(), dudley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_3D(), finley::Assemble_PDE_Single_C(), finley::Assemble_PDE_System_1D(), dudley::Assemble_PDE_System_2D(), finley::Assemble_PDE_System_2D(), dudley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_3D(), finley::Assemble_PDE_System_C(), speckley::Brick::assembleCoordinates(), ripley::Brick::assembleCoordinates(), ripley::Rectangle::assembleCoordinates(), speckley::Rectangle::assembleCoordinates(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySingleReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySingleReduced(), ripley::LameAssembler2D::assemblePDEBoundarySystem(), ripley::LameAssembler3D::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDEBoundarySystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDEBoundarySystemReduced(), speckley::SpeckleyDomain::assemblePDEDirac(), ripley::RipleyDomain::assemblePDEDirac(), speckley::DefaultAssembler2D::assemblePDESingle(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingle(), speckley::DefaultAssembler3D::assemblePDESingle(), ripley::DefaultAssembler2D< Scalar >::assemblePDESingleReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESingleReduced(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), ripley::LameAssembler2D::assemblePDESystem(), ripley::LameAssembler3D::assemblePDESystem(), speckley::DefaultAssembler2D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystem(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystem(), speckley::DefaultAssembler3D::assemblePDESystem(), speckley::WaveAssembler2D::assemblePDESystem(), speckley::WaveAssembler3D::assemblePDESystem(), ripley::DefaultAssembler2D< Scalar >::assemblePDESystemReduced(), ripley::DefaultAssembler3D< Scalar >::assemblePDESystemReduced(), ripley::RipleyDomain::averageData(), paso::TransportProblem::copyConstraint(), speckley::SpeckleyDomain::copyData(), ripley::RipleyDomain::copyData(), ripley::RipleyDomain::dofToNodes(), speckley::Brick::gradient_order10(), speckley::Rectangle::gradient_order10(), speckley::Brick::gradient_order2(), speckley::Rectangle::gradient_order2(), speckley::Brick::gradient_order3(), speckley::Rectangle::gradient_order3(), speckley::Brick::gradient_order4(), speckley::Rectangle::gradient_order4(), speckley::Brick::gradient_order5(), speckley::Rectangle::gradient_order5(), speckley::Brick::gradient_order6(), speckley::Rectangle::gradient_order6(), speckley::Brick::gradient_order7(), speckley::Rectangle::gradient_order7(), speckley::Brick::gradient_order8(), speckley::Rectangle::gradient_order8(), speckley::Brick::gradient_order9(), speckley::Rectangle::gradient_order9(), speckley::RipleyCoupler::interpolate(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodes(), ripley::MultiRectangle::interpolateElementsToElementsCoarser(), ripley::MultiBrick::interpolateElementsToElementsCoarser(), ripley::MultiRectangle::interpolateElementsToElementsFiner(), ripley::MultiBrick::interpolateElementsToElementsFiner(), speckley::Brick::interpolateNodesOnElements(), speckley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnElements(), ripley::Rectangle::interpolateNodesOnElements(), ripley::Brick::interpolateNodesOnFaces(), ripley::Rectangle::interpolateNodesOnFaces(), ripley::MultiRectangle::interpolateNodesToElementsFiner(), ripley::MultiBrick::interpolateNodesToElementsFiner(), ripley::MultiRectangle::interpolateNodesToNodesFiner(), ripley::MultiBrick::interpolateNodesToNodesFiner(), speckley::SpeckleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), ripley::MultiRectangle::interpolateReducedToElementsFiner(), ripley::MultiBrick::interpolateReducedToElementsFiner(), ripley::MultiRectangle::interpolateReducedToReducedFiner(), ripley::MultiBrick::interpolateReducedToReducedFiner(), speckley::SpeckleyDomain::multiplyData(), ripley::RipleyDomain::multiplyData(), ripley::Brick::nodesToDOF(), ripley::Rectangle::nodesToDOF(), paso::SystemMatrix::nullifyRowsAndCols(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), ripley::Brick::setToNormal(), ripley::Rectangle::setToNormal(), ripley::MultiBrick::setToNormal(), ripley::Brick::setToSize(), ripley::Rectangle::setToSize(), speckley::Brick::setToSize(), speckley::Rectangle::setToSize(), ripley::MultiBrick::setToSize(), paso::TransportProblem::setToSolution(), paso::SystemMatrix::setToSolution(), and paso::SystemMatrix::ypAx().

◆ resolve()

void Data::resolve ( )

◆ rpowO()

Data Data::rpowO ( const boost::python::object &  left) const

Return the given power of each data point of this boost python object.

Parameters
leftInput - the bases

References powD().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ rtruedivO()

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(), and hasNoSamples().

◆ set_m_data()

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)

Warning
Only to be called in single threaded code or inside a single/critical section. This method needs to be atomic.

References m_data, and m_lazy.

Referenced by checkExclusiveWrite(), copy(), Data(), delaySelf(), exclusiveWrite(), expand(), init_from_data_and_fs(), initialise(), operator=(), resolve(), setToZero(), tag(), TensorSelfUpdateBinaryOperation(), and ~Data().

◆ setItemD()

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.

Parameters
key- Input - python slice tuple specifying slice to copy from value.
value- Input - Data object to copy from.

References Data(), exclusiveWrite(), getDataPointRank(), getDataPointShape(), getFunctionSpace(), escript::DataTypes::getSliceRegion(), and setSlice().

Referenced by BOOST_PYTHON_MODULE(), hasNoSamples(), and setItemO().

◆ setItemO()

void Data::setItemO ( const boost::python::object &  key,
const boost::python::object &  value 
)

References getFunctionSpace(), and setItemD().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ setProtection()

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().

◆ setSlice()

void Data::setSlice ( const Data value,
const DataTypes::RegionType region 
)

Copy the specified slice from the given value into this Data object.

Parameters
value- Input - Data to copy from.
region- Input - Region to copy.

References exclusiveWrite(), forceResolve(), getReady(), isProtected(), m_data, escript::DataReady::setSlice(), typeMatchLeft(), and typeMatchRight().

Referenced by hasNoSamples(), and setItemD().

◆ setTaggedValue()

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.

Parameters
tagKey- Input - Integer key.
value- Input - Value to associate with given key. ==>*

References escript::DataTypes::DataVectorAlt< T >::copyFromArray(), exclusiveWrite(), escript::DataTypes::fillComplexFromReal(), forceResolve(), escript::WrappedArray::getShape(), escript::WrappedArray::isComplex(), isComplex(), isConstant(), isProtected(), m_data, and tag().

Referenced by BOOST_PYTHON_MODULE(), hasNoSamples(), and setTaggedValueByName().

◆ 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.

Parameters
name- Input - name of tag.
value- Input - Value to associate with given key.

References exclusiveWrite(), forceResolve(), escript::FunctionSpace::getDomain(), getDomain(), getFunctionSpace(), and setTaggedValue().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ setTaggedValueFromCPP() [1/2]

void Data::setTaggedValueFromCPP ( int  tagKey,
const DataTypes::ShapeType pointshape,
const DataTypes::RealVectorType value,
int  dataOffset = 0 
)

Assign the given value to the tag. Implicitly converts this object to type DataTagged if it is constant.

Parameters
tagKey- Input - Integer key.
pointshape- Input - The shape of the value parameter
value- Input - Value to associate with given key.
dataOffset- Input - Offset of the begining of the point within the value parameter

References exclusiveWrite(), forceResolve(), isConstant(), isProtected(), m_data, and tag().

Referenced by escript::MPIDataReducer::groupSend(), hasNoSamples(), and escript::MPIDataReducer::recvFrom().

◆ setTaggedValueFromCPP() [2/2]

void Data::setTaggedValueFromCPP ( int  tagKey,
const DataTypes::ShapeType pointshape,
const DataTypes::CplxVectorType value,
int  dataOffset = 0 
)

◆ setToZero()

void Data::setToZero ( )

set all values to zero

Data object operation methods and operators.

References exclusiveWrite(), getDataPointShape(), getFunctionSpace(), getNoValues(), escript::DataAbstract::getPtr(), isEmpty(), isLazy(), m_data, and set_m_data().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ setTupleForGlobalDataPoint()

void Data::setTupleForGlobalDataPoint ( int  id,
int  proc,
boost::python::object   
)

Set the value of a global data point.

References get_MPIRank(), getDomain(), MPI_INT, MPI_MAX, MPI_SUM, setValueOfDataPoint(), setValueOfDataPointToArray(), and THROWONCOMPLEX.

Referenced by BOOST_PYTHON_MODULE().

◆ setValueOfDataPoint()

void Data::setValueOfDataPoint ( int  dataPointNo,
const DataTypes::real_t  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().

◆ setValueOfDataPointC()

void Data::setValueOfDataPointC ( int  dataPointNo,
const DataTypes::cplx_t  value 
)

◆ setValueOfDataPointToArray()

void Data::setValueOfDataPointToArray ( int  dataPointNo,
const boost::python::object &   
)

◆ 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().

◆ sign()

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(), MAKELAZYOP, and escript::SIGN.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ sin()

Data Data::sin ( ) const

Return the sin of each data point of this Data object.

References escript::C_TensorUnaryOperation(), MAKELAZYOP, and escript::SIN.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ sinh()

Data Data::sinh ( ) const

Return the sinh of each data point of this Data object.

References escript::C_TensorUnaryOperation(), MAKELAZYOP, and escript::SINH.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ sqrt()

Data Data::sqrt ( ) const

Return the square root of each data point of this Data object.

References escript::C_TensorUnaryOperation(), MAKELAZYOP, and escript::SQRT.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ sup()

real_t Data::sup ( )

Return the maximum value of this Data object.

The method is not const because lazy data needs to be expanded before sup can be computed. The _const form can be used when the Data object is const, however this will only work for Data which is not Lazy.

For Data which contain no samples (or tagged Data for which no tags in use have a value) a large negative value is returned.

References actsExpanded(), CHECK_DO_CRES, isComplex(), isLazy(), MPI_MAX, resolve(), and supWorker().

Referenced by BOOST_PYTHON_MODULE(), and hasNoSamples().

◆ sup_const()

real_t Data::sup_const ( ) const

References isComplex(), isLazy(), and supWorker().

Referenced by hasNoSamples(), and toString().

◆ supWorker()

real_t Data::supWorker ( ) const
private

◆ swapaxes()

Data Data::swapaxes ( const int  axis0,
const int  axis1 
) const

◆ symmetric()

Data Data::symmetric ( ) const

Return the symmetric part of a matrix which is half the matrix plus its transpose.

References getDataPointRank(), getDataPointShape(), getFunctionSpace(), m_data, MAKELAZYOP, escript::SYM, and typeMatchRight().

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), hasNoSamples(), and hermitian().

◆ tag()

void Data::tag ( )

◆ tan()

Data Data::tan ( ) const

Return the tan of each data point of this Data object.

References escript::C_TensorUnaryOperation(), MAKELAZYOP, and escript::TAN.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ tanh()

Data Data::tanh ( ) const

Return the tanh of each data point of this Data object.

References escript::C_TensorUnaryOperation(), MAKELAZYOP, and escript::TANH.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ TensorSelfUpdateBinaryOperation()

void Data::TensorSelfUpdateBinaryOperation ( const Data right,
escript::ES_optype  operation 
)
private

◆ toListOfTuples()

const bp::object Data::toListOfTuples ( bool  scalarastuple = true)

returns the values of the object as a list of tuples (one for each datapoint).

Parameters
scalarastupleIf true, scalar data will produce single valued tuples [(1,) (2,) ...] If false, the result is a list of scalars [1, 2, ...]

References expand(), get_MPISize(), getDataPointRank(), getDataPointShape(), getDataPointSize(), getNumDataPoints(), getReady(), escript::DataReady::getTypedVectorRO(), escript::DataReady::getVectorRO(), and isComplex().

Referenced by BOOST_PYTHON_MODULE(), and getNoValues().

◆ toString()

std::string Data::toString ( ) const

◆ trace()

Data Data::trace ( int  axis_offset) const

◆ transpose()

Data Data::transpose ( int  axis_offset) const

◆ truedivD()

Data escript::Data::truedivD ( const Data right)
inline

Newer style division operator for python.

Operator/ Takes RHS Data object.

Referenced by BOOST_PYTHON_MODULE(), hasNoSamples(), rtruedivO(), and truedivO().

◆ 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(), and hasNoSamples().

◆ typeMatchLeft()

void Data::typeMatchLeft ( Data right) const
private

Convert the data type of the RHS to match this.

Parameters
right- Input - data type to match.

References complicate(), expand(), isComplex(), isConstant(), isExpanded(), isLazy(), isTagged(), resolve(), and tag().

Referenced by operandCheck(), and setSlice().

◆ typeMatchRight()

void Data::typeMatchRight ( const Data right)
private

◆ unaryOp2()

template<class UnaryFunction >
void escript::Data::unaryOp2 ( UnaryFunction  operation)
inline

Perform the given unary operation on every element of every data point in this Data object.

Referenced by hasNoSamples().

◆ whereNegative()

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(), isComplex(), escript::LZ, and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ whereNonNegative()

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, isComplex(), and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ whereNonPositive()

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(), isComplex(), escript::LEZ, and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ whereNonZero()

Data Data::whereNonZero ( DataTypes::real_t  tol = 0.0) const

Return a Data with a 0 for 0 values and a 1 for +ive or -ive values.

References escript::C_TensorUnaryOperation(), MAKELAZYOPOFF, and escript::NEZ.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ wherePositive()

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, isComplex(), and MAKELAZYOP.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

◆ whereZero()

Data Data::whereZero ( DataTypes::real_t  tol = 0.0) const

Return a Data with a 1 for 0 values and a 0 for +ive or -ive values.

References escript::C_TensorUnaryOperation(), escript::EZ, and MAKELAZYOPOFF.

Referenced by BOOST_PYTHON_MODULE(), escript::DataLazy::collapseToReady(), and hasNoSamples().

Friends And Related Function Documentation

◆ condEval

Data condEval ( escript::Data mask,
escript::Data trueval,
escript::Data falseval 
)
friend

◆ DataAbstract

friend class DataAbstract
friend

◆ randomData

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.

◆ TestDomain

friend class TestDomain
friend

Member Data Documentation

◆ m_data

DataAbstract_ptr escript::Data::m_data
private

◆ m_lazy

bool escript::Data::m_lazy
private

Referenced by isLazy(), and set_m_data().

◆ m_protected

bool escript::Data::m_protected
private

The documentation for this class was generated from the following files: