/[escript]/branches/domexper/dudley/src/CPPAdapter/MeshAdapter.cpp
ViewVC logotype

Diff of /branches/domexper/dudley/src/CPPAdapter/MeshAdapter.cpp

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

revision 1632 by trankine, Sat Jul 12 07:17:50 2008 UTC revision 1716 by gross, Thu Aug 21 05:03:49 2008 UTC
# Line 2047  std::string MeshAdapter::showTagNames() Line 2047  std::string MeshAdapter::showTagNames()
2047     return temp.str();     return temp.str();
2048  }  }
2049    
2050    int MeshAdapter::getNumberOfTagsInUse(int functionSpaceCode) const
2051    {
2052      Finley_Mesh* mesh=m_finleyMesh.get();
2053      dim_t numTags=0;
2054      switch(functionSpaceCode) {
2055       case(Nodes):
2056              numTags=mesh->Nodes->numTagsInUse;
2057              break;
2058       case(ReducedNodes):
2059              throw FinleyAdapterException("Error - ReducedNodes does not support tags");
2060              break;
2061       case(DegreesOfFreedom):
2062              throw FinleyAdapterException("Error - DegreesOfFreedom does not support tags");
2063              break;
2064       case(ReducedDegreesOfFreedom):
2065              throw FinleyAdapterException("Error - ReducedDegreesOfFreedom does not support tags");
2066              break;
2067       case(Elements):
2068       case(ReducedElements):
2069              numTags=mesh->Elements->numTagsInUse;
2070              break;
2071       case(FaceElements):
2072       case(ReducedFaceElements):
2073              numTags=mesh->FaceElements->numTagsInUse;
2074              break;
2075       case(Points):
2076              numTags=mesh->Points->numTagsInUse;
2077              break;
2078       case(ContactElementsZero):
2079       case(ReducedContactElementsZero):
2080       case(ContactElementsOne):
2081       case(ReducedContactElementsOne):
2082              numTags=mesh->ContactElements->numTagsInUse;
2083              break;
2084       default:
2085          stringstream temp;
2086          temp << "Error - Finley does not know anything about function space type " << functionSpaceCode;
2087          throw FinleyAdapterException(temp.str());
2088      }
2089      return numTags;
2090    }
2091    int* MeshAdapter::borrowListOfTagsInUse(int functionSpaceCode) const
2092    {
2093      Finley_Mesh* mesh=m_finleyMesh.get();
2094      index_t* tags=NULL;
2095      switch(functionSpaceCode) {
2096       case(Nodes):
2097              tags=mesh->Nodes->tagsInUse;
2098              break;
2099       case(ReducedNodes):
2100              throw FinleyAdapterException("Error - ReducedNodes does not support tags");
2101              break;
2102       case(DegreesOfFreedom):
2103              throw FinleyAdapterException("Error - DegreesOfFreedom does not support tags");
2104              break;
2105       case(ReducedDegreesOfFreedom):
2106              throw FinleyAdapterException("Error - ReducedDegreesOfFreedom does not support tags");
2107              break;
2108       case(Elements):
2109       case(ReducedElements):
2110              tags=mesh->Elements->tagsInUse;
2111              break;
2112       case(FaceElements):
2113       case(ReducedFaceElements):
2114              tags=mesh->FaceElements->tagsInUse;
2115              break;
2116       case(Points):
2117              tags=mesh->Points->tagsInUse;
2118              break;
2119       case(ContactElementsZero):
2120       case(ReducedContactElementsZero):
2121       case(ContactElementsOne):
2122       case(ReducedContactElementsOne):
2123              tags=mesh->ContactElements->tagsInUse;
2124              break;
2125       default:
2126          stringstream temp;
2127          temp << "Error - Finley does not know anything about function space type " << functionSpaceCode;
2128          throw FinleyAdapterException(temp.str());
2129      }
2130      return tags;
2131    }
2132    
2133    
2134  }  // end of namespace  }  // end of namespace

Legend:
Removed from v.1632  
changed lines
  Added in v.1716

  ViewVC Help
Powered by ViewVC 1.1.26