Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

FE_Datastore.cpp

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.1.1.1 $
00022 // $Date: 2000/09/15 08:23:17 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/database/FE_Datastore.cpp,v $
00024                                                                         
00025                                                                         
00026 // File: ~/database/FE_Datastore.C
00027 //
00028 // Written: fmk 
00029 // Created: 10/98
00030 // Revision: A
00031 //
00032 // Description: This file contains the class implementation for FE_Datastore.
00033 // FE_Datastore is an abstract base class. An FE_Datastore object is used
00034 // in the program to store/restore the geometry and state information in
00035 // a domain at a particular instance in the analysis.
00036 //
00037 // What: "@(#) FE_Datastore.C, revA"
00038 
00039 #include "FE_Datastore.h"
00040 #include <FEM_ObjectBroker.h>
00041 #include <Domain.h>
00042 #include <G3Globals.h>
00043 
00044 
00045 
00046 // FE_Datastore(int tag, int noExtNodes);
00047 //  constructor that takes the FE_Datastore's unique tag and the number
00048 // of external nodes for the FE_Datastore.
00049 
00050 FE_Datastore::FE_Datastore(Domain &thDomain, FEM_ObjectBroker &theBroker) 
00051   :theObjectBroker(&theBroker), theDomain(&thDomain)
00052 {
00053 
00054 }
00055 
00056 
00057 FE_Datastore::~FE_Datastore() 
00058 {
00059     // does nothing
00060 }
00061 
00062 
00063 
00064 
00065 int
00066 FE_Datastore::commitState(int commitTag)
00067 {
00068   // invoke sendSelf on the domain object with this as an arg
00069   int res = 0;
00070   if (theDomain != 0) {
00071     res = theDomain->sendSelf(commitTag, *this);
00072     if (res < 0) {
00073       g3ErrorHandler->warning("FE_Datastore::commitState - domain failed to sendSelf\n");
00074     }
00075   }
00076     
00077   return res;
00078 }
00079 
00080 
00081 
00082 int
00083 FE_Datastore::restoreState(int commitTag)
00084 {
00085   // invoke sendSelf on the domain object with this as an arg
00086   int res = 0;
00087   if (theDomain != 0) {
00088     res = theDomain->recvSelf(commitTag, *this, *theObjectBroker);
00089     if (res < 0) {
00090       g3ErrorHandler->warning("FE_Datastore::restoreState - domain failed to recvSelf\n");
00091     }
00092   }
00093     
00094   return res;
00095 }
00096 
00097 
00098 
00099 
Copyright Contact Us