/[escript]/temp/escript/src/Data.h
ViewVC logotype

Diff of /temp/escript/src/Data.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 559 by jgs, Thu Feb 23 01:43:44 2006 UTC revision 576 by gross, Fri Mar 3 08:28:42 2006 UTC
# Line 593  class Data { Line 593  class Data {
593       *       *
594    */    */
595    Data    Data
596    wherePositive() const;    wherePositive(double tol=0.0) const;
597    
598    /**    /**
599       \brief       \brief
# Line 601  class Data { Line 601  class Data {
601       *       *
602    */    */
603    Data    Data
604    whereNegative() const;    whereNegative(double tol=0.0) const;
605    
606    /**    /**
607       \brief       \brief
# Line 609  class Data { Line 609  class Data {
609       *       *
610    */    */
611    Data    Data
612    whereNonNegative() const;    whereNonNegative(double tol=0.0) const;
613    
614    /**    /**
615       \brief       \brief
# Line 617  class Data { Line 617  class Data {
617       *       *
618    */    */
619    Data    Data
620    whereNonPositive() const;    whereNonPositive(double tol=0.0) const;
621    
622    /**    /**
623       \brief       \brief
# Line 625  class Data { Line 625  class Data {
625       *       *
626    */    */
627    Data    Data
628    whereZero() const;    whereZero(double tol=0.0) const;
629    
630    /**    /**
631       \brief       \brief
# Line 633  class Data { Line 633  class Data {
633       *       *
634    */    */
635    Data    Data
636    whereNonZero() const;    whereNonZero(double tol=0.0) const;
637    
638    /**    /**
639       \brief       \brief
# Line 714  class Data { Line 714  class Data {
714    
715    /**    /**
716       \brief       \brief
717         Return the eigenvalues of the symmetric part at each data point of this Data object in increasing values.
718         Currently this function is restricted to rank 2, square shape, and dimension 3.
719         *
720      */
721      Data
722      eigenvalues() const;
723    
724      /**
725         \brief
726         Return the eigenvalues and corresponding eigenvcetors of the symmetric part at each data point of this Data object.
727         the eigenvalues are ordered in increasing size where eigenvalues with relative difference less than
728         tol are treated as equal. The eigenvectors are orthogonal, normalized and the sclaed such that the
729         first non-zero entry is positive.
730         Currently this function is restricted to rank 2, square shape, and dimension 3
731         *
732      */
733      const boost::python::tuple
734      eigenvalues_and_eigenvectors(const double tol=1.e-12) const;
735    
736      /**
737         \brief
738       Transpose each data point of this Data object around the given axis.       Transpose each data point of this Data object around the given axis.
739       --* not implemented yet *--       --* not implemented yet *--
740       *       *
# Line 724  class Data { Line 745  class Data {
745    /**    /**
746       \brief       \brief
747       Calculate the trace of each data point of this Data object.       Calculate the trace of each data point of this Data object.
      sum(A[i,i,i,i])  
748       *       *
749    */    */
750    Data    Data
# Line 1492  Data::dp_algorithm(BinaryFunction operat Line 1512  Data::dp_algorithm(BinaryFunction operat
1512      return result;      return result;
1513    } else if (isTagged()) {    } else if (isTagged()) {
1514      DataTagged* dataT=dynamic_cast<DataTagged*>(m_data.get());      DataTagged* dataT=dynamic_cast<DataTagged*>(m_data.get());
     DataTagged::TagListType keys;  
     DataTagged::DataMapType::const_iterator i;  
     for (i=dataT->getTagLookup().begin();i!=dataT->getTagLookup().end();i++) {  
       keys.push_back(i->first);  
     }  
1515      DataArrayView::ShapeType viewShape;      DataArrayView::ShapeType viewShape;
1516      DataArrayView::ValueType viewData(1);      DataArrayView::ValueType viewData(1);
1517      viewData[0]=0;      viewData[0]=0;
1518      DataArrayView defaultValue(viewData,viewShape);      DataArrayView defaultValue(viewData,viewShape);
1519        DataTagged::TagListType keys;
1520      DataTagged::ValueListType values;      DataTagged::ValueListType values;
1521      values.push_back(defaultValue);      DataTagged::DataMapType::const_iterator i;
1522        for (i=dataT->getTagLookup().begin();i!=dataT->getTagLookup().end();i++) {
1523          keys.push_back(i->first);
1524          values.push_back(defaultValue);
1525        }
1526      Data result(keys,values,defaultValue,getFunctionSpace());      Data result(keys,values,defaultValue,getFunctionSpace());
1527      DataTagged* resultT=dynamic_cast<DataTagged*>(result.m_data.get());      DataTagged* resultT=dynamic_cast<DataTagged*>(result.m_data.get());
1528      EsysAssert((dataT!=0), "Programming error - casting data to DataTagged.");      EsysAssert((dataT!=0), "Programming error - casting data to DataTagged.");

Legend:
Removed from v.559  
changed lines
  Added in v.576

  ViewVC Help
Powered by ViewVC 1.1.26