/[escript]/trunk/finley/src/CPPAdapter/MeshAdapter.cpp
ViewVC logotype

Diff of /trunk/finley/src/CPPAdapter/MeshAdapter.cpp

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

revision 817 by ksteube, Sat Aug 26 03:08:52 2006 UTC revision 971 by ksteube, Wed Feb 14 04:40:49 2007 UTC
# Line 1044  int MeshAdapter::getTagFromSampleNo(int Line 1044  int MeshAdapter::getTagFromSampleNo(int
1044    }    }
1045    return out;    return out;
1046  }  }
1047  int MeshAdapter::getReferenceNoFromSampleNo(int functionSpaceType, int sampleNo) const  int* MeshAdapter::borrowSampleReferenceIDs(int functionSpaceType) const
1048  {  {
1049    int out=0,i;    int *out=0,i;
1050    Finley_Mesh* mesh=m_finleyMesh.get();    Finley_Mesh* mesh=m_finleyMesh.get();
1051    switch (functionSpaceType) {    switch (functionSpaceType) {
1052    case(Nodes):    case(Nodes):
1053      if (mesh->Nodes!=NULL) {      if (mesh->Nodes!=NULL) {
1054        out=mesh->Nodes->Id[sampleNo];        out=mesh->Nodes->Id;
1055        break;        break;
1056      }      }
1057    case(Elements):    case(Elements):
1058      out=mesh->Elements->Id[sampleNo];      out=mesh->Elements->Id;
1059      break;      break;
1060    case(FaceElements):    case(FaceElements):
1061      out=mesh->FaceElements->Id[sampleNo];      out=mesh->FaceElements->Id;
1062      break;      break;
1063    case(Points):    case(Points):
1064      out=mesh->Points->Id[sampleNo];      out=mesh->Points->Id;
1065      break;      break;
1066    case(ContactElementsZero):    case(ContactElementsZero):
1067      out=mesh->ContactElements->Id[sampleNo];      out=mesh->ContactElements->Id;
1068      break;      break;
1069    case(ContactElementsOne):    case(ContactElementsOne):
1070      out=mesh->ContactElements->Id[sampleNo];      out=mesh->ContactElements->Id;
1071      break;      break;
1072    case(DegreesOfFreedom):    case(DegreesOfFreedom):
1073      for (i=0;i<mesh->Nodes->numNodes; ++i) {      out=mesh->Nodes->degreeOfFreedomId;
        if (mesh->Nodes->degreeOfFreedom[i]==sampleNo) {  
           out=mesh->Nodes->Id[i];  
           break;  
        }  
     }  
1074      break;      break;
1075    case(ReducedDegreesOfFreedom):    case(ReducedDegreesOfFreedom):
1076      for (i=0;i<mesh->Nodes->numNodes; ++i) {      out=mesh->Nodes->reducedDegreeOfFreedomId;
        if (mesh->Nodes->reducedDegreeOfFreedom[i]==sampleNo) {  
           out=mesh->Nodes->Id[i];  
           break;  
        }  
     }  
1077      break;      break;
1078    default:    default:
1079      stringstream temp;      stringstream temp;

Legend:
Removed from v.817  
changed lines
  Added in v.971

  ViewVC Help
Powered by ViewVC 1.1.26