/[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 149 by jgs, Thu Sep 1 03:31:39 2005 UTC revision 150 by jgs, Thu Sep 15 03:44:45 2005 UTC
# Line 17  extern "C" { Line 17  extern "C" {
17  #include "finley/finleyC/Assemble.h"  #include "finley/finleyC/Assemble.h"
18  #include "finley/finleyC/Mesh.h"  #include "finley/finleyC/Mesh.h"
19  #include "finley/finleyC/Finley.h"  #include "finley/finleyC/Finley.h"
20  #include "finley/finleyC/System.h"  #include "paso/SystemMatrix.h"
21  }  }
22  #include "finley/CPPAdapter/SystemMatrixAdapter.h"  #include "finley/CPPAdapter/SystemMatrixAdapter.h"
23  #include "finley/CPPAdapter/MeshAdapter.h"  #include "finley/CPPAdapter/MeshAdapter.h"
# Line 241  void MeshAdapter::getTagList(int functio Line 241  void MeshAdapter::getTagList(int functio
241      break;      break;
242    default:    default:
243      stringstream temp;      stringstream temp;
244      temp << "Error - Invalid function space type: "      temp << "Error - Invalid function space type: " << functionSpaceType << " for domain: " << getDescription();
      << functionSpaceType << " for domain: " << getDescription();  
245      throw FinleyAdapterException(temp.str());      throw FinleyAdapterException(temp.str());
246      break;      break;
247    }    }
# Line 314  void MeshAdapter::getReferenceNoList(int Line 313  void MeshAdapter::getReferenceNoList(int
313      break;      break;
314    default:    default:
315      stringstream temp;      stringstream temp;
316      temp << "Error - Invalid function space type: "      temp << "Error - Invalid function space type: " << functionSpaceType << " for domain: " << getDescription();
      << functionSpaceType << " for domain: " << getDescription();  
317      throw FinleyAdapterException(temp.str());      throw FinleyAdapterException(temp.str());
318      break;      break;
319    }    }
# Line 395  pair<int,int> MeshAdapter::getDataShape( Line 393  pair<int,int> MeshAdapter::getDataShape(
393             break;             break;
394        default:        default:
395          stringstream temp;          stringstream temp;
396          temp << "Error - Invalid function space type: "          temp << "Error - Invalid function space type: " << functionSpaceCode << " for domain: " << getDescription();
          << functionSpaceCode << " for domain: " << getDescription();  
397          throw FinleyAdapterException(temp.str());          throw FinleyAdapterException(temp.str());
398          break;          break;
399        }        }
# Line 413  void MeshAdapter::addPDEToSystem( Line 410  void MeshAdapter::addPDEToSystem(
410                       const Data& d_contact,const Data& y_contact) const                       const Data& d_contact,const Data& y_contact) const
411  {  {
412     Finley_Mesh* mesh=m_finleyMesh.get();     Finley_Mesh* mesh=m_finleyMesh.get();
413     Finley_Assemble_PDE(mesh->Nodes,mesh->Elements,mat.getFinley_SystemMatrix(),&(rhs.getDataC()),     Finley_Assemble_PDE(mesh->Nodes,mesh->Elements,mat.getPaso_SystemMatrix(),&(rhs.getDataC()),
414                         &(A.getDataC()),&(B.getDataC()),&(C.getDataC()),&(D.getDataC()),&(X.getDataC()),&(Y.getDataC()));                         &(A.getDataC()),&(B.getDataC()),&(C.getDataC()),&(D.getDataC()),&(X.getDataC()),&(Y.getDataC()));
415     checkFinleyError();     checkFinleyError();
416     Finley_Assemble_RobinCondition(mesh->Nodes,mesh->FaceElements,     Finley_Assemble_RobinCondition(mesh->Nodes,mesh->FaceElements,
417                    mat.getFinley_SystemMatrix(),                    mat.getPaso_SystemMatrix(),
418                    &(rhs.getDataC()),                    &(rhs.getDataC()),
419                                    &(d.getDataC()),&(y.getDataC()),                                    &(d.getDataC()),&(y.getDataC()),
420                                    Finley_Assemble_handelShapeMissMatch_Mean_out);                                    Finley_Assemble_handelShapeMissMatch_Mean_out);
421     checkFinleyError();     checkFinleyError();
422     Finley_Assemble_RobinCondition(mesh->Nodes,mesh->ContactElements,     Finley_Assemble_RobinCondition(mesh->Nodes,mesh->ContactElements,
423                    mat.getFinley_SystemMatrix(),                    mat.getPaso_SystemMatrix(),
424                    &(rhs.getDataC()),                    &(rhs.getDataC()),
425                                    &(d_contact.getDataC()),                                    &(d_contact.getDataC()),
426                    &(y_contact.getDataC()),                    &(y_contact.getDataC()),
# Line 489  void MeshAdapter::interpolateOnDomain(Da Line 486  void MeshAdapter::interpolateOnDomain(Da
486                 Finley_Assemble_interpolate(mesh->Nodes,mesh->ContactElements,&(in.getDataC()),&(target.getDataC()));                 Finley_Assemble_interpolate(mesh->Nodes,mesh->ContactElements,&(in.getDataC()),&(target.getDataC()));
487                 break;                 break;
488             default:             default:
489                 Finley_ErrorCode=TYPE_ERROR;                 stringstream temp;
490                 sprintf(Finley_ErrorMsg,"Interpolation on Domain: Finley does not know anything about function space type %d",target.getFunctionSpace().getTypeCode());                 temp << "Error - Interpolation on Domain: Finley does not know anything about function space type " << target.getFunctionSpace().getTypeCode();
491                   throw FinleyAdapterException(temp.str());
492                 break;                 break;
493          }          }
494          break;          break;
# Line 498  void MeshAdapter::interpolateOnDomain(Da Line 496  void MeshAdapter::interpolateOnDomain(Da
496          if (target.getFunctionSpace().getTypeCode()==Elements) {          if (target.getFunctionSpace().getTypeCode()==Elements) {
497             Finley_Assemble_CopyElementData(mesh->Elements,&(target.getDataC()),&(in.getDataC()));             Finley_Assemble_CopyElementData(mesh->Elements,&(target.getDataC()),&(in.getDataC()));
498          } else {          } else {
499             Finley_ErrorCode=TYPE_ERROR;             throw FinleyAdapterException("Error - No interpolation with data on elements possible.");
            sprintf(Finley_ErrorMsg,"No interpolation with data on elements possible.");  
500          }          }
501          break;          break;
502       case(FaceElements):       case(FaceElements):
503          if (target.getFunctionSpace().getTypeCode()==FaceElements) {          if (target.getFunctionSpace().getTypeCode()==FaceElements) {
504             Finley_Assemble_CopyElementData(mesh->FaceElements,&(target.getDataC()),&(in.getDataC()));             Finley_Assemble_CopyElementData(mesh->FaceElements,&(target.getDataC()),&(in.getDataC()));
505          } else {          } else {
506             Finley_ErrorCode=TYPE_ERROR;             throw FinleyAdapterException("Error - No interpolation with data on face elements possible.");
            sprintf(Finley_ErrorMsg,"No interpolation with data on face elements possible.");  
507             break;             break;
508         }         }
509       case(Points):       case(Points):
510          if (target.getFunctionSpace().getTypeCode()==Points) {          if (target.getFunctionSpace().getTypeCode()==Points) {
511             Finley_Assemble_CopyElementData(mesh->Points,&(target.getDataC()),&(in.getDataC()));             Finley_Assemble_CopyElementData(mesh->Points,&(target.getDataC()),&(in.getDataC()));
512          } else {          } else {
513             Finley_ErrorCode=TYPE_ERROR;             throw FinleyAdapterException("Error - No interpolation with data on points possible.");
            sprintf(Finley_ErrorMsg,"No interpolation with data on points possible.");  
514             break;             break;
515          }          }
516          break;          break;
# Line 524  void MeshAdapter::interpolateOnDomain(Da Line 519  void MeshAdapter::interpolateOnDomain(Da
519          if (target.getFunctionSpace().getTypeCode()==ContactElementsZero || target.getFunctionSpace().getTypeCode()==ContactElementsOne) {          if (target.getFunctionSpace().getTypeCode()==ContactElementsZero || target.getFunctionSpace().getTypeCode()==ContactElementsOne) {
520             Finley_Assemble_CopyElementData(mesh->ContactElements,&(target.getDataC()),&(in.getDataC()));             Finley_Assemble_CopyElementData(mesh->ContactElements,&(target.getDataC()),&(in.getDataC()));
521          } else {          } else {
522             Finley_ErrorCode=TYPE_ERROR;             throw FinleyAdapterException("Error - No interpolation with data on contact elements possible.");
            sprintf(Finley_ErrorMsg,"No interpolation with data on contact elements possible.");  
523             break;             break;
524          }          }
525          break;          break;
# Line 550  void MeshAdapter::interpolateOnDomain(Da Line 544  void MeshAdapter::interpolateOnDomain(Da
544                Finley_Assemble_interpolate(mesh->Nodes,mesh->ContactElements,&(in.getDataC()),&(target.getDataC()));                Finley_Assemble_interpolate(mesh->Nodes,mesh->ContactElements,&(in.getDataC()),&(target.getDataC()));
545               break;               break;
546             default:             default:
547               Finley_ErrorCode=TYPE_ERROR;               stringstream temp;
548               sprintf(Finley_ErrorMsg,"Interpolation On Domain: Finley does not know anything about function space type %d",target.getFunctionSpace().getTypeCode());               temp << "Error - Interpolation On Domain: Finley does not know anything about function space type " << target.getFunctionSpace().getTypeCode();
549                 throw FinleyAdapterException(temp.str());
550               break;               break;
551          }          }
552          break;          break;
# Line 574  void MeshAdapter::interpolateOnDomain(Da Line 569  void MeshAdapter::interpolateOnDomain(Da
569               Finley_Assemble_interpolate(mesh->Nodes,mesh->ContactElements,&(in.getDataC()),&(target.getDataC()));               Finley_Assemble_interpolate(mesh->Nodes,mesh->ContactElements,&(in.getDataC()),&(target.getDataC()));
570               break;               break;
571            case(Nodes):            case(Nodes):
572               Finley_ErrorCode=TYPE_ERROR;               throw FinleyAdapterException("Error - Finley does not support interpolation from reduced degrees of freedom to mesh nodes.");
              sprintf(Finley_ErrorMsg,"Finley does not support interpolation from reduced degrees of freedom to mesh nodes.");  
573               break;               break;
574            case(DegreesOfFreedom):            case(DegreesOfFreedom):
575               Finley_ErrorCode=TYPE_ERROR;               throw FinleyAdapterException("Error - Finley does not support interpolation from reduced degrees of freedom to degrees of freedom");
              sprintf(Finley_ErrorMsg,"Finley does not support interpolation from reduced degrees of freedom to degrees of freedom");  
576               break;               break;
577            default:            default:
578               Finley_ErrorCode=TYPE_ERROR;               stringstream temp;
579               sprintf(Finley_ErrorMsg,"Interpolation On Domain: Finley does not know anything about function space type %d",target.getFunctionSpace().getTypeCode());               temp << "Error - Interpolation On Domain: Finley does not know anything about function space type " << target.getFunctionSpace().getTypeCode();
580                 throw FinleyAdapterException(temp.str());
581               break;               break;
582         }         }
583         break;         break;
584       default:       default:
585          Finley_ErrorCode=TYPE_ERROR;          stringstream temp;
586          sprintf(Finley_ErrorMsg,"Interpolation On Domain: Finley does not know anything about function space type %d",in.getFunctionSpace().getTypeCode());          temp << "Error - Interpolation On Domain: Finley does not know anything about function space type %d" << in.getFunctionSpace().getTypeCode();
587            throw FinleyAdapterException(temp.str());
588          break;          break;
589    }    }
590    checkFinleyError();    checkFinleyError();
# Line 627  void MeshAdapter::setToNormal(Data& norm Line 622  void MeshAdapter::setToNormal(Data& norm
622    Finley_Mesh* mesh=m_finleyMesh.get();    Finley_Mesh* mesh=m_finleyMesh.get();
623    switch(normal.getFunctionSpace().getTypeCode()) {    switch(normal.getFunctionSpace().getTypeCode()) {
624      case(Nodes):      case(Nodes):
625        Finley_ErrorCode=TYPE_ERROR;        throw FinleyAdapterException("Error - Finley does not support surface normal vectors for nodes");
       sprintf(Finley_ErrorMsg,"Finley does not support surface normal vectors for nodes");  
626        break;        break;
627      case(Elements):      case(Elements):
628        Finley_ErrorCode=TYPE_ERROR;        throw FinleyAdapterException("Error - Finley does not support surface normal vectors for elements");
       sprintf(Finley_ErrorMsg,"Finley does not support surface normal vectors for elements");  
629        break;        break;
630      case (FaceElements):      case (FaceElements):
631        Finley_Assemble_setNormal(mesh->Nodes,mesh->FaceElements,&(normal.getDataC()));        Finley_Assemble_setNormal(mesh->Nodes,mesh->FaceElements,&(normal.getDataC()));
632        break;        break;
633      case(Points):      case(Points):
634        Finley_ErrorCode=TYPE_ERROR;        throw FinleyAdapterException("Error - Finley does not support surface normal vectors for point elements");
       sprintf(Finley_ErrorMsg,"Finley does not support surface normal vectors for point elements");  
635        break;        break;
636      case (ContactElementsOne):      case (ContactElementsOne):
637      case (ContactElementsZero):      case (ContactElementsZero):
638        Finley_Assemble_setNormal(mesh->Nodes,mesh->ContactElements,&(normal.getDataC()));        Finley_Assemble_setNormal(mesh->Nodes,mesh->ContactElements,&(normal.getDataC()));
639        break;        break;
640      case(DegreesOfFreedom):      case(DegreesOfFreedom):
641        Finley_ErrorCode=TYPE_ERROR;        throw FinleyAdapterException("Error - Finley does not support surface normal vectors for degrees of freedom.");
       sprintf(Finley_ErrorMsg,"Finley does not support surface normal vectors for degrees of freedom.");  
642        break;        break;
643      case(ReducedDegreesOfFreedom):      case(ReducedDegreesOfFreedom):
644        Finley_ErrorCode=TYPE_ERROR;        throw FinleyAdapterException("Error - Finley does not support surface normal vectors for reduced degrees of freedom.");
       sprintf(Finley_ErrorMsg,"Finley does not support surface normal vectors for reduced degrees of freedom.");  
645        break;        break;
646      default:      default:
647        Finley_ErrorCode=TYPE_ERROR;        stringstream temp;
648        sprintf(Finley_ErrorMsg,"Normal Vectors: Finley does not know anything about function space type %d",normal.getFunctionSpace().getTypeCode());        temp << "Error - Normal Vectors: Finley does not know anything about function space type " << normal.getFunctionSpace().getTypeCode();
649          throw FinleyAdapterException(temp.str());
650        break;        break;
651    }    }
652    checkFinleyError();    checkFinleyError();
# Line 670  void MeshAdapter::interpolateACross(Data Line 661  void MeshAdapter::interpolateACross(Data
661    if (targetDomain!=*this)    if (targetDomain!=*this)
662       throw FinleyAdapterException("Error - Illegal domain of interpolation target");       throw FinleyAdapterException("Error - Illegal domain of interpolation target");
663    
664    Finley_ErrorCode=SYSTEM_ERROR;    throw FinleyAdapterException("Error - Finley does not allow interpolation across domains yet.");
   sprintf(Finley_ErrorMsg,"Finley does not allow interpolation across domains yet.");  
   checkFinleyError();  
665  }  }
666    
667  //  //
# Line 687  void MeshAdapter::setToIntegrals(std::ve Line 676  void MeshAdapter::setToIntegrals(std::ve
676    Finley_Mesh* mesh=m_finleyMesh.get();    Finley_Mesh* mesh=m_finleyMesh.get();
677    switch(arg.getFunctionSpace().getTypeCode()) {    switch(arg.getFunctionSpace().getTypeCode()) {
678       case(Nodes):       case(Nodes):
679          Finley_ErrorCode=TYPE_ERROR;          throw FinleyAdapterException("Error - Integral of data on nodes is not supported.");
         sprintf(Finley_ErrorMsg,"Integral of data on nodes is not supported.");  
680          break;          break;
681       case(Elements):       case(Elements):
682          Finley_Assemble_integrate(mesh->Nodes,mesh->Elements,&(arg.getDataC()),&integrals[0]);          Finley_Assemble_integrate(mesh->Nodes,mesh->Elements,&(arg.getDataC()),&integrals[0]);
# Line 697  void MeshAdapter::setToIntegrals(std::ve Line 685  void MeshAdapter::setToIntegrals(std::ve
685          Finley_Assemble_integrate(mesh->Nodes,mesh->FaceElements,&(arg.getDataC()),&integrals[0]);          Finley_Assemble_integrate(mesh->Nodes,mesh->FaceElements,&(arg.getDataC()),&integrals[0]);
686          break;          break;
687       case(Points):       case(Points):
688          Finley_ErrorCode=TYPE_ERROR;          throw FinleyAdapterException("Error - Integral of data on points is not supported.");
         sprintf(Finley_ErrorMsg,"Integral of data on points is not supported.");  
689          break;          break;
690       case(ContactElementsZero):       case(ContactElementsZero):
691          Finley_Assemble_integrate(mesh->Nodes,mesh->ContactElements,&(arg.getDataC()),&integrals[0]);          Finley_Assemble_integrate(mesh->Nodes,mesh->ContactElements,&(arg.getDataC()),&integrals[0]);
# Line 707  void MeshAdapter::setToIntegrals(std::ve Line 694  void MeshAdapter::setToIntegrals(std::ve
694          Finley_Assemble_integrate(mesh->Nodes,mesh->ContactElements,&(arg.getDataC()),&integrals[0]);          Finley_Assemble_integrate(mesh->Nodes,mesh->ContactElements,&(arg.getDataC()),&integrals[0]);
695          break;          break;
696       case(DegreesOfFreedom):       case(DegreesOfFreedom):
697          Finley_ErrorCode=TYPE_ERROR;          throw FinleyAdapterException("Error - Integral of data on degrees of freedom is not supported.");
         sprintf(Finley_ErrorMsg,"Integral of data on degrees of freedom is not supported.");  
698          break;          break;
699       case(ReducedDegreesOfFreedom):       case(ReducedDegreesOfFreedom):
700          Finley_ErrorCode=TYPE_ERROR;          throw FinleyAdapterException("Error - Integral of data on reduced degrees of freedom is not supported.");
         sprintf(Finley_ErrorMsg,"Integral of data on reduced degrees of freedom is not supported.");  
701          break;          break;
702       default:       default:
703          Finley_ErrorCode=TYPE_ERROR;          stringstream temp;
704          sprintf(Finley_ErrorMsg,"Integrals: Finley does not know anything about function space type %d",arg.getFunctionSpace().getTypeCode());          temp << "Error - Integrals: Finley does not know anything about function space type " << arg.getFunctionSpace().getTypeCode();
705            throw FinleyAdapterException(temp.str());
706          break;          break;
707    }    }
708    checkFinleyError();    checkFinleyError();
# Line 737  void MeshAdapter::setToGradient(Data& gr Line 723  void MeshAdapter::setToGradient(Data& gr
723    Finley_Mesh* mesh=m_finleyMesh.get();    Finley_Mesh* mesh=m_finleyMesh.get();
724    switch(grad.getFunctionSpace().getTypeCode()) {    switch(grad.getFunctionSpace().getTypeCode()) {
725         case(Nodes):         case(Nodes):
726            Finley_ErrorCode=TYPE_ERROR;            throw FinleyAdapterException("Error - Gradient at nodes is not supported.");
           sprintf(Finley_ErrorMsg,"Gradient at nodes is not supported.");  
727            break;            break;
728         case(Elements):         case(Elements):
729            Finley_Assemble_gradient(mesh->Nodes,mesh->Elements,&(grad.getDataC()),&(arg.getDataC()));            Finley_Assemble_gradient(mesh->Nodes,mesh->Elements,&(grad.getDataC()),&(arg.getDataC()));
# Line 747  void MeshAdapter::setToGradient(Data& gr Line 732  void MeshAdapter::setToGradient(Data& gr
732            Finley_Assemble_gradient(mesh->Nodes,mesh->FaceElements,&(grad.getDataC()),&(arg.getDataC()));            Finley_Assemble_gradient(mesh->Nodes,mesh->FaceElements,&(grad.getDataC()),&(arg.getDataC()));
733            break;            break;
734         case(Points):         case(Points):
735            Finley_ErrorCode=TYPE_ERROR;            throw FinleyAdapterException("Error - Gradient at points is not supported.");
           sprintf(Finley_ErrorMsg,"Gradient at points is not supported.");  
736            break;            break;
737         case(ContactElementsZero):         case(ContactElementsZero):
738            Finley_Assemble_gradient(mesh->Nodes,mesh->ContactElements,&(grad.getDataC()),&(arg.getDataC()));            Finley_Assemble_gradient(mesh->Nodes,mesh->ContactElements,&(grad.getDataC()),&(arg.getDataC()));
# Line 757  void MeshAdapter::setToGradient(Data& gr Line 741  void MeshAdapter::setToGradient(Data& gr
741            Finley_Assemble_gradient(mesh->Nodes,mesh->ContactElements,&(grad.getDataC()),&(arg.getDataC()));            Finley_Assemble_gradient(mesh->Nodes,mesh->ContactElements,&(grad.getDataC()),&(arg.getDataC()));
742            break;            break;
743         case(DegreesOfFreedom):         case(DegreesOfFreedom):
744            Finley_ErrorCode=TYPE_ERROR;            throw FinleyAdapterException("Error - Gradient at degrees of freedom is not supported.");
           sprintf(Finley_ErrorMsg,"Gradient at degrees of freedom is not supported.");  
745            break;            break;
746         case(ReducedDegreesOfFreedom):         case(ReducedDegreesOfFreedom):
747            Finley_ErrorCode=TYPE_ERROR;            throw FinleyAdapterException("Error - Gradient at reduced degrees of freedom is not supported.");
           sprintf(Finley_ErrorMsg,"Gradient at reduced degrees of freedom is not supported.");  
748            break;            break;
749         default:         default:
750            Finley_ErrorCode=TYPE_ERROR;            stringstream temp;
751            sprintf(Finley_ErrorMsg,"Gradient: Finley does not know anything about function space type %d",arg.getFunctionSpace().getTypeCode());            temp << "Error - Gradient: Finley does not know anything about function space type " << arg.getFunctionSpace().getTypeCode();
752              throw FinleyAdapterException(temp.str());
753            break;            break;
754    }    }
755    checkFinleyError();    checkFinleyError();
# Line 781  void MeshAdapter::setToSize(Data& size) Line 764  void MeshAdapter::setToSize(Data& size)
764    escriptDataC tmp=size.getDataC();    escriptDataC tmp=size.getDataC();
765    switch(size.getFunctionSpace().getTypeCode()) {    switch(size.getFunctionSpace().getTypeCode()) {
766         case(Nodes):         case(Nodes):
767            Finley_ErrorCode=TYPE_ERROR;            throw FinleyAdapterException("Error - Size of nodes is not supported.");
           sprintf(Finley_ErrorMsg,"Size of nodes is not supported.");  
768            break;            break;
769         case(Elements):         case(Elements):
770            Finley_Assemble_getSize(mesh->Nodes,mesh->Elements,&tmp);            Finley_Assemble_getSize(mesh->Nodes,mesh->Elements,&tmp);
# Line 791  void MeshAdapter::setToSize(Data& size) Line 773  void MeshAdapter::setToSize(Data& size)
773            Finley_Assemble_getSize(mesh->Nodes,mesh->FaceElements,&tmp);            Finley_Assemble_getSize(mesh->Nodes,mesh->FaceElements,&tmp);
774            break;            break;
775         case(Points):         case(Points):
776            Finley_ErrorCode=TYPE_ERROR;            throw FinleyAdapterException("Error - Size of point elements is not supported.");
           sprintf(Finley_ErrorMsg,"Size of point elements is not supported.");  
777            break;            break;
778         case(ContactElementsZero):         case(ContactElementsZero):
779         case(ContactElementsOne):         case(ContactElementsOne):
780            Finley_Assemble_getSize(mesh->Nodes,mesh->ContactElements,&tmp);            Finley_Assemble_getSize(mesh->Nodes,mesh->ContactElements,&tmp);
781            break;            break;
782         case(DegreesOfFreedom):         case(DegreesOfFreedom):
783            Finley_ErrorCode=TYPE_ERROR;            throw FinleyAdapterException("Error - Size of degrees of freedom is not supported.");
           sprintf(Finley_ErrorMsg,"Size of degrees of freedom is not supported.");  
784            break;            break;
785         case(ReducedDegreesOfFreedom):         case(ReducedDegreesOfFreedom):
786            Finley_ErrorCode=TYPE_ERROR;            throw FinleyAdapterException("Error - Size of reduced degrees of freedom is not supported.");
           sprintf(Finley_ErrorMsg,"Size of reduced degrees of freedom is not supported.");  
787            break;            break;
788         default:         default:
789            Finley_ErrorCode=TYPE_ERROR;            stringstream temp;
790            sprintf(Finley_ErrorMsg,"Element size: Finley does not know anything about function space type %d",size.getFunctionSpace().getTypeCode());            temp << "Error - Element size: Finley does not know anything about function space type " << size.getFunctionSpace().getTypeCode();
791              throw FinleyAdapterException(temp.str());
792            break;            break;
793    }    }
794    checkFinleyError();    checkFinleyError();
# Line 873  SystemMatrixAdapter MeshAdapter::newSyst Line 853  SystemMatrixAdapter MeshAdapter::newSyst
853      }      }
854      // generate matrix:      // generate matrix:
855            
856      Finley_SystemMatrixPattern* fsystemMatrixPattern=Finley_getPattern(getFinley_Mesh(),reduceRowOrder,reduceColOrder);      Paso_SystemMatrixPattern* fsystemMatrixPattern=Finley_getPattern(getFinley_Mesh(),reduceRowOrder,reduceColOrder);
857      checkFinleyError();      checkFinleyError();
858      Finley_SystemMatrix* fsystemMatrix=Finley_SystemMatrix_alloc(type,fsystemMatrixPattern,row_blocksize,column_blocksize);      Paso_SystemMatrix* fsystemMatrix=Paso_SystemMatrix_alloc(type,fsystemMatrixPattern,row_blocksize,column_blocksize);
859      checkFinleyError();      checkPasoError();
860      Finley_SystemMatrixPattern_dealloc(fsystemMatrixPattern);      Paso_SystemMatrixPattern_dealloc(fsystemMatrixPattern);
861      return SystemMatrixAdapter(fsystemMatrix,row_blocksize,row_functionspace,column_blocksize,column_functionspace);      return SystemMatrixAdapter(fsystemMatrix,row_blocksize,row_functionspace,column_blocksize,column_functionspace);
862  }  }
863    
# Line 904  bool MeshAdapter::isCellOriented(int fun Line 884  bool MeshAdapter::isCellOriented(int fun
884            return true;            return true;
885            break;            break;
886         default:         default:
887            Finley_ErrorCode=TYPE_ERROR;            stringstream temp;
888            sprintf(Finley_ErrorMsg,"Cell: Finley does not know anything about function space type %d",functionSpaceCode);            temp << "Error - Cell: Finley does not know anything about function space type " << functionSpaceCode;
889              throw FinleyAdapterException(temp.str());
890            break;            break;
891    }    }
892    checkFinleyError();    checkFinleyError();
# Line 927  bool MeshAdapter::probeInterpolationOnDo Line 908  bool MeshAdapter::probeInterpolationOnDo
908             case(ContactElementsOne):             case(ContactElementsOne):
909                 return true;                 return true;
910             default:             default:
911                 Finley_ErrorCode=TYPE_ERROR;                 stringstream temp;
912                 sprintf(Finley_ErrorMsg,"Interpolation On Domain: Finley does not know anything about function space type %d",functionSpaceType_target);                 temp << "Error - Interpolation On Domain: Finley does not know anything about function space type " << functionSpaceType_target;
913                   throw FinleyAdapterException(temp.str());
914          }          }
915          break;          break;
916       case(Elements):       case(Elements):
# Line 968  bool MeshAdapter::probeInterpolationOnDo Line 950  bool MeshAdapter::probeInterpolationOnDo
950             case(ContactElementsOne):             case(ContactElementsOne):
951                return true;                return true;
952             default:             default:
953               Finley_ErrorCode=TYPE_ERROR;               stringstream temp;
954               sprintf(Finley_ErrorMsg,"Interpolation On Domain: Finley does not know anything about function space type %d",functionSpaceType_target);               temp << "Error - Interpolation On Domain: Finley does not know anything about function space type " << functionSpaceType_target;
955                 throw FinleyAdapterException(temp.str());
956          }          }
957          break;          break;
958       case(ReducedDegreesOfFreedom):       case(ReducedDegreesOfFreedom):
# Line 985  bool MeshAdapter::probeInterpolationOnDo Line 968  bool MeshAdapter::probeInterpolationOnDo
968            case(DegreesOfFreedom):            case(DegreesOfFreedom):
969               return false;               return false;
970            default:            default:
971               Finley_ErrorCode=TYPE_ERROR;               stringstream temp;
972               sprintf(Finley_ErrorMsg,"Interpolation On Domain: Finley does not know anything about function space type %d",functionSpaceType_target);               temp << "Error - Interpolation On Domain: Finley does not know anything about function space type " << functionSpaceType_target;
973                 throw FinleyAdapterException(temp.str());
974         }         }
975         break;         break;
976       default:       default:
977          Finley_ErrorCode=TYPE_ERROR;          stringstream temp;
978          sprintf(Finley_ErrorMsg,"Interpolation On Domain: Finley does not know anything about function space type %d",functionSpaceType_source);          temp << "Error - Interpolation On Domain: Finley does not know anything about function space type " << functionSpaceType_source;
979            throw FinleyAdapterException(temp.str());
980          break;          break;
981    }    }
982    checkFinleyError();    checkFinleyError();
# Line 1018  bool MeshAdapter::operator!=(const Abstr Line 1003  bool MeshAdapter::operator!=(const Abstr
1003    return !(operator==(other));    return !(operator==(other));
1004  }  }
1005    
1006  int MeshAdapter::getSystemMatrixTypeId(const int solver, const bool symmetry) const  int MeshAdapter::getSystemMatrixTypeId(const int solver, const int package, const bool symmetry) const
1007  {  {
1008     int out=Finley_SystemMatrix_getSystemMatrixTypeId(solver,symmetry?1:0);     int out=Paso_SystemMatrix_getSystemMatrixTypeId(SystemMatrixAdapter::mapOptionToPaso(solver),SystemMatrixAdapter::mapOptionToPaso(package),symmetry?1:0);
1009     checkFinleyError();     checkPasoError();
1010     return out;     return out;
1011  }  }
1012    

Legend:
Removed from v.149  
changed lines
  Added in v.150

  ViewVC Help
Powered by ViewVC 1.1.26