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:   return ierr;
 58: }

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

 68: /* ::esi::petsc::Object OInstForIntel64CompilerBug; */