Actual source code: eobject.c


  3: /*
  4:     Provides several of the esi::Object methods used by all 
  5:   of the esi::petsc classes
  6: */

  8: #include "esi/petsc/object.h"


 11: esi::ErrorCode esi::petsc::Object::getRunTimeModel(const char* name, void *& icomm)
 12: {
 13:   esi::ErrorCode 0;

 15:   PetscTruth flg;
 16:   if (PetscStrcmp(name,"MPI",&flg),flg){
 17:     icomm = &(this->comm);
 18:     return ierr;
 19:   }
 20:   icomm = 0;
 21:   return 0;
 22: }

 24: esi::ErrorCode esi::petsc::Object::setRunTimeModel(const char* name, void * icomm)
 25: {
 26:   return 1;
 27: }

 29: esi::ErrorCode esi::petsc::Object::getRunTimeModelsSupported(esi::Argv * list)
 30: {
 31:   list->appendArg("MPI");
 32:   return 0;
 33: }

 35: esi::ErrorCode esi::petsc::Object::getInterfacesSupported(esi::Argv * list)
 36: {
 37:   list->appendArg("esi:Object");
 38:   return 0;
 39: }

 41: esi::ErrorCode esi::petsc::Object::getInterface(const char* name, void *& iface)
 42: {
 43:   PetscTruth flg;
 44:   if (PetscStrcmp(name,"esi::Object",&flg),flg){
 45:     iface = (void *) (esi::Object *) this;
 46:   } else {
 47:     iface = 0;
 48:   }
 49:   return 0;
 50: }


 53: esi::ErrorCode esi::petsc::Object::addReference()
 54: {
 55:   int 0;
 56:   this->refcnt++;
 57:   if (this->pobject) PetscObjectReference(this->pobject);
 58:   return ierr;
 59: }

 61: esi::ErrorCode esi::petsc::Object::deleteReference()
 62: {
 63:   int 0;
 64:   this->refcnt--;
 65:   if (this->refcnt <= 0) delete this;
 66:   return ierr;
 67: }

 69: #if defined(PETSC_HAVE_CCA)
 70: void esi::petsc::Object::setServices(gov::cca::Services *)
 71: {
 72:   ;
 73: }
 74: #endif

 76: ::esi::petsc::Object OInstForIntel64CompilerBug;