/[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 969 by ksteube, Tue Feb 13 23:02:23 2007 UTC
# Line 839  SystemMatrixAdapter MeshAdapter::newSyst Line 839  SystemMatrixAdapter MeshAdapter::newSyst
839            
840      Paso_SystemMatrixPattern* fsystemMatrixPattern=Finley_getPattern(getFinley_Mesh(),reduceRowOrder,reduceColOrder);      Paso_SystemMatrixPattern* fsystemMatrixPattern=Finley_getPattern(getFinley_Mesh(),reduceRowOrder,reduceColOrder);
841      checkFinleyError();      checkFinleyError();
842      Paso_SystemMatrix* fsystemMatrix=Paso_SystemMatrix_alloc(type,fsystemMatrixPattern,row_blocksize,column_blocksize);      printf("ksteube in finley/src/CPPAdapter/MeshAdapter.cpp newSystemMatrix\n");
843        Paso_SystemMatrix* fsystemMatrix;
844        int trilinos = 0;
845        if (trilinos) {
846    #ifdef TRILINOS
847          /* printf("ksteube newSystemMatrix package=%d\n", row_functionspace.domain.package); */
848          /* Allocation Epetra_VrbMatrix here */
849    #endif
850        }
851        else {
852          fsystemMatrix=Paso_SystemMatrix_alloc(type,fsystemMatrixPattern,row_blocksize,column_blocksize);
853        }
854      checkPasoError();      checkPasoError();
855      Paso_SystemMatrixPattern_dealloc(fsystemMatrixPattern);      Paso_SystemMatrixPattern_dealloc(fsystemMatrixPattern);
856      return SystemMatrixAdapter(fsystemMatrix,row_blocksize,row_functionspace,column_blocksize,column_functionspace);      return SystemMatrixAdapter(fsystemMatrix,row_blocksize,row_functionspace,column_blocksize,column_functionspace);
# Line 1044  int MeshAdapter::getTagFromSampleNo(int Line 1055  int MeshAdapter::getTagFromSampleNo(int
1055    }    }
1056    return out;    return out;
1057  }  }
1058  int MeshAdapter::getReferenceNoFromSampleNo(int functionSpaceType, int sampleNo) const  int* MeshAdapter::borrowSampleReferenceIDs(int functionSpaceType) const
1059  {  {
1060    int out=0,i;    int *out=0,i;
1061    Finley_Mesh* mesh=m_finleyMesh.get();    Finley_Mesh* mesh=m_finleyMesh.get();
1062    switch (functionSpaceType) {    switch (functionSpaceType) {
1063    case(Nodes):    case(Nodes):
1064      if (mesh->Nodes!=NULL) {      if (mesh->Nodes!=NULL) {
1065        out=mesh->Nodes->Id[sampleNo];        out=mesh->Nodes->Id;
1066        break;        break;
1067      }      }
1068    case(Elements):    case(Elements):
1069      out=mesh->Elements->Id[sampleNo];      out=mesh->Elements->Id;
1070      break;      break;
1071    case(FaceElements):    case(FaceElements):
1072      out=mesh->FaceElements->Id[sampleNo];      out=mesh->FaceElements->Id;
1073      break;      break;
1074    case(Points):    case(Points):
1075      out=mesh->Points->Id[sampleNo];      out=mesh->Points->Id;
1076      break;      break;
1077    case(ContactElementsZero):    case(ContactElementsZero):
1078      out=mesh->ContactElements->Id[sampleNo];      out=mesh->ContactElements->Id;
1079      break;      break;
1080    case(ContactElementsOne):    case(ContactElementsOne):
1081      out=mesh->ContactElements->Id[sampleNo];      out=mesh->ContactElements->Id;
1082      break;      break;
1083    case(DegreesOfFreedom):    case(DegreesOfFreedom):
1084      for (i=0;i<mesh->Nodes->numNodes; ++i) {      out=mesh->Nodes->degreeOfFreedomId;
        if (mesh->Nodes->degreeOfFreedom[i]==sampleNo) {  
           out=mesh->Nodes->Id[i];  
           break;  
        }  
     }  
1085      break;      break;
1086    case(ReducedDegreesOfFreedom):    case(ReducedDegreesOfFreedom):
1087      for (i=0;i<mesh->Nodes->numNodes; ++i) {      out=mesh->Nodes->reducedDegreeOfFreedomId;
        if (mesh->Nodes->reducedDegreeOfFreedom[i]==sampleNo) {  
           out=mesh->Nodes->Id[i];  
           break;  
        }  
     }  
1088      break;      break;
1089    default:    default:
1090      stringstream temp;      stringstream temp;

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

  ViewVC Help
Powered by ViewVC 1.1.26