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 |
|
|
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++) { |
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]; |