/[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 101 by jgs, Wed Dec 15 03:48:48 2004 UTC revision 102 by jgs, Wed Dec 15 07:08:39 2004 UTC
# Line 35  DataTagged::DataTagged(): Line 35  DataTagged::DataTagged():
35  DataTagged::DataTagged(const TagListType& tagKeys,  DataTagged::DataTagged(const TagListType& tagKeys,
36                 const ValueListType& values,                 const ValueListType& values,
37                 const DataArrayView& defaultValue,                 const DataArrayView& defaultValue,
38                 const FunctionSpace& what):                 const FunctionSpace& what)
39    DataAbstract(what)    : DataAbstract(what)
40  {  {
41    //    //
42    // The default value is always the first item in the values list    // The default value is always the first item in the values list
# Line 47  DataTagged::DataTagged(const TagListType Line 47  DataTagged::DataTagged(const TagListType
47    addTaggedValues(tagKeys,values);    addTaggedValues(tagKeys,values);
48  }  }
49    
50  DataTagged::DataTagged(const DataTagged& other):  DataTagged::DataTagged(const DataTagged& other)
51    DataAbstract(other.getFunctionSpace()),    : DataAbstract(other.getFunctionSpace()),
52    m_data(other.m_data),    m_data(other.m_data),
53    m_offsetLookup(other.m_offsetLookup)    m_offsetLookup(other.m_offsetLookup)
54  {  {
# Line 56  DataTagged::DataTagged(const DataTagged& Line 56  DataTagged::DataTagged(const DataTagged&
56    setPointDataView(temp);    setPointDataView(temp);
57  }  }
58    
59  DataTagged::DataTagged(const DataConstant& other):  DataTagged::DataTagged(const DataConstant& other)
60    DataAbstract(other.getFunctionSpace())    : DataAbstract(other.getFunctionSpace())
61  {  {
62    //    //
63    // Fill the default value with the constant value item from other    // Fill the default value with the constant value item from other
# Line 68  DataTagged::DataTagged(const DataConstan Line 68  DataTagged::DataTagged(const DataConstan
68  }  }
69    
70  DataTagged::DataTagged(const DataTagged& other,  DataTagged::DataTagged(const DataTagged& other,
71                 const DataArrayView::RegionType& region):                 const DataArrayView::RegionType& region)
72    DataAbstract(other.getFunctionSpace())    : DataAbstract(other.getFunctionSpace())
73  {  {
74    //    //
75    // get the shape of the slice to copy from other    // get the shape of the slice to copy from other
# Line 146  DataTagged::setSlice(const DataAbstract* Line 146  DataTagged::setSlice(const DataAbstract*
146      throw DataException (value->getPointDataView().createShapeErrorMessage(      throw DataException (value->getPointDataView().createShapeErrorMessage(
147                  "Error - Couldn't copy slice due to shape mismatch.",shape));                  "Error - Couldn't copy slice due to shape mismatch.",shape));
148    }    }
149      //
150    getDefaultValue().copySliceFrom(tempDataTag->getDefaultValue(),region);    getDefaultValue().copySliceFrom(tempDataTag->getDefaultValue(),region);
151    //    //
152    // Loop through the tag values    // Loop through the tag values

Legend:
Removed from v.101  
changed lines
  Added in v.102

  ViewVC Help
Powered by ViewVC 1.1.26