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

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

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

revision 2486 by jfenwick, Mon Oct 13 00:18:55 2008 UTC revision 2487 by jfenwick, Tue Jun 23 04:26:07 2009 UTC
# Line 172  int FunctionSpace::getReferenceIDFromDat Line 172  int FunctionSpace::getReferenceIDFromDat
172       // Get the number of samples and data-points per sample       // Get the number of samples and data-points per sample
173       int numSamples = getNumSamples();       int numSamples = getNumSamples();
174       int numDataPointsPerSample = getNumDPPSample();       int numDataPointsPerSample = getNumDPPSample();
175       int*referenceIDs= borrowSampleReferenceIDs();       const int* referenceIDs= borrowSampleReferenceIDs();
176       int numDataPoints = numSamples * numDataPointsPerSample;       int numDataPoints = numSamples * numDataPointsPerSample;
177    
178       if (numDataPointsPerSample==0) {       if (numDataPointsPerSample==0) {
# Line 185  int FunctionSpace::getReferenceIDFromDat Line 185  int FunctionSpace::getReferenceIDFromDat
185       return referenceIDs[sampleNo];       return referenceIDs[sampleNo];
186  }  }
187    
188  int*  const int*
189  FunctionSpace::borrowSampleReferenceIDs() const  FunctionSpace::borrowSampleReferenceIDs() const
190  {  {
191    return m_domain->borrowSampleReferenceIDs(m_functionSpaceType);    return m_domain->borrowSampleReferenceIDs(m_functionSpaceType);
# Line 258  FunctionSpace::getNumberOfTagsInUse() co Line 258  FunctionSpace::getNumberOfTagsInUse() co
258     return  m_domain->getNumberOfTagsInUse(m_functionSpaceType);     return  m_domain->getNumberOfTagsInUse(m_functionSpaceType);
259  }  }
260    
261  int*  const int*
262  FunctionSpace::borrowListOfTagsInUse() const  FunctionSpace::borrowListOfTagsInUse() const
263  {  {
264     return  m_domain->borrowListOfTagsInUse(m_functionSpaceType);     return  m_domain->borrowListOfTagsInUse(m_functionSpaceType);
# Line 269  FunctionSpace::getListOfTagsSTL() const Line 269  FunctionSpace::getListOfTagsSTL() const
269  {  {
270    std::list<int> taglist;    std::list<int> taglist;
271    int i;    int i;
272    int* tags=borrowListOfTagsInUse();    const int* tags=borrowListOfTagsInUse();
273    for (i=0;i<getNumberOfTagsInUse();++i) taglist.push_back(tags[i]);    for (i=0;i<getNumberOfTagsInUse();++i) taglist.push_back(tags[i]);
274    return taglist;    return taglist;
275  }  }
# Line 280  FunctionSpace::getListOfTags() const Line 280  FunctionSpace::getListOfTags() const
280  {  {
281    boost::python::list taglist;    boost::python::list taglist;
282    int i;    int i;
283    int* tags=borrowListOfTagsInUse();    const int* tags=borrowListOfTagsInUse();
284    for (i=0;i<getNumberOfTagsInUse();++i) taglist.append(tags[i]);    for (i=0;i<getNumberOfTagsInUse();++i) taglist.append(tags[i]);
285    return taglist;    return taglist;
286  }  }

Legend:
Removed from v.2486  
changed lines
  Added in v.2487

  ViewVC Help
Powered by ViewVC 1.1.26