/[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 1945 by jfenwick, Mon Oct 13 00:18:55 2008 UTC revision 1946 by jfenwick, Wed Oct 29 05:48:53 2008 UTC
# Line 146  DataTagged::DataTagged(const FunctionSpa Line 146  DataTagged::DataTagged(const FunctionSpa
146    
147  DataTagged::DataTagged(const DataTagged& other)  DataTagged::DataTagged(const DataTagged& other)
148    : DataAbstract(other.getFunctionSpace(),other.getShape()),    : DataAbstract(other.getFunctionSpace(),other.getShape()),
149    m_data(other.m_data),    m_offsetLookup(other.m_offsetLookup),
150    m_offsetLookup(other.m_offsetLookup)    m_data(other.m_data)
151  {  {
152    // copy constructor    // copy constructor
153    
# Line 201  DataTagged::DataTagged(const FunctionSpa Line 201  DataTagged::DataTagged(const FunctionSpa
201    
202    if (tagsource!=0)    if (tagsource!=0)
203    {    {
204      int numtags=tagsource->getTagLookup().size();         m_data.resize(defaultvalue.size(),0.);   // since this is tagged data, we should have blocksize=1
     //  m_offsetLookup.reserve(tagsource.getTagLookup().size());  
     m_data.resize(defaultvalue.size(),0.);  // since this is tagged data, we should have blocksize=1  
205    
206         DataTagged::DataMapType::const_iterator i;         DataTagged::DataMapType::const_iterator i;
207         for (i=tagsource->getTagLookup().begin();i!=tagsource->getTagLookup().end();i++) {         for (i=tagsource->getTagLookup().begin();i!=tagsource->getTagLookup().end();i++) {
# Line 215  DataTagged::DataTagged(const FunctionSpa Line 213  DataTagged::DataTagged(const FunctionSpa
213      m_data.resize(defaultvalue.size());      m_data.resize(defaultvalue.size());
214    }    }
215    
   
   
216    // need to set the default value ....    // need to set the default value ....
217    for (int i=0; i<defaultvalue.size(); i++) {    for (int i=0; i<defaultvalue.size(); i++) {
218       m_data[i]=defaultvalue[i];       m_data[i]=defaultvalue[i];

Legend:
Removed from v.1945  
changed lines
  Added in v.1946

  ViewVC Help
Powered by ViewVC 1.1.26