/[escript]/trunk/escript/src/DataTagged.cpp
ViewVC logotype

Diff of /trunk/escript/src/DataTagged.cpp

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

revision 1800 by ksteube, Thu Sep 18 05:28:20 2008 UTC revision 1802 by jfenwick, Tue Sep 23 01:03:29 2008 UTC
# Line 72  DataTagged::DataTagged(const FunctionSpa Line 72  DataTagged::DataTagged(const FunctionSpa
72    // not unit_tested tested yet    // not unit_tested tested yet
73    // It is not explicitly unit tested yet, but it is called from DataFactory    // It is not explicitly unit tested yet, but it is called from DataFactory
74    
75      if (!what.canTag())
76      {
77        throw DataException("Programming error - DataTag created with a non-taggable FunctionSpace.");
78      }
79    // copy the data    // copy the data
80    m_data=data;    m_data=data;
81    
# Line 100  DataTagged::DataTagged(const FunctionSpa Line 104  DataTagged::DataTagged(const FunctionSpa
104  {  {
105    // alternative constructor    // alternative constructor
106    
107      if (!what.canTag())
108      {
109        throw DataException("Programming error - DataTag created with a non-taggable FunctionSpace.");
110      }
111    
112    // copy the data    // copy the data
113    m_data=data;    m_data=data;
114    
# Line 149  DataTagged::DataTagged(const DataConstan Line 158  DataTagged::DataTagged(const DataConstan
158  {  {
159    // copy constructor    // copy constructor
160    
161      if (!other.getFunctionSpace().canTag())
162      {
163        throw DataException("Programming error - DataTag created with a non-taggable FunctionSpace.");
164      }
165    
166    // fill the default value with the constant value item from "other"    // fill the default value with the constant value item from "other"
167  //   const DataArrayView& value=other.getPointDataView();  //   const DataArrayView& value=other.getPointDataView();
168    int len = other.getNoValues();    int len = other.getNoValues();
# Line 177  DataTagged::DataTagged(const FunctionSpa Line 191  DataTagged::DataTagged(const FunctionSpa
191    }    }
192    
193    
194      if (!what.canTag())
195      {
196        throw DataException("Programming error - DataTag created with a non-taggable FunctionSpace.");
197      }
198    
199    if (tagsource!=0)    if (tagsource!=0)
200    {    {
201      int numtags=tagsource->getTagLookup().size();      int numtags=tagsource->getTagLookup().size();
# Line 590  DataTagged::toString() const Line 609  DataTagged::toString() const
609  //   DataArrayView tempView(getPointDataView().getData(), getPointDataView().getShape());  //   DataArrayView tempView(getPointDataView().getData(), getPointDataView().getShape());
610    for (i=m_offsetLookup.begin();i!=m_offsetLookup.end();++i) {    for (i=m_offsetLookup.begin();i!=m_offsetLookup.end();++i) {
611      temp << "Tag(" << i->first << ")" << endl;      temp << "Tag(" << i->first << ")" << endl;
612      temp << pointToString(m_data,getShape(),i->second,empty);      temp << pointToString(m_data,getShape(),i->second,empty) << endl;
613  //     tempView.setOffset(i->second);  //     tempView.setOffset(i->second);
614  //     temp << tempView.toString() << endl;  //     temp << tempView.toString() << endl;
615    }    }

Legend:
Removed from v.1800  
changed lines
  Added in v.1802

  ViewVC Help
Powered by ViewVC 1.1.26