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

DomainDecompAlgo.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:16 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/algorithm/domainDecompAlgo/DomainDecompAlgo.cpp,v $
00024                                                                         
00025                                                                         
00026 // File: ~/OOP/analysis/algorithm/DomainDecompAlgo.C
00027 // 
00028 // Written: fmk 
00029 // Created: Sun Sept 15 15:06:47: 1996 
00030 // Revision: A 
00031 //
00032 
00033 // Description: This file contains the class definition for 
00034 // DomainDecompAlgo. DomainDecompAlgo is an abstract base class, 
00035 // i.e. no objects of it's type can be created.  Its subclasses deifine
00036 // the sequence of operations to be performed in the analysis by static
00037 // equilibrium of a finite element model.  
00038 // 
00039 // What: "@(#)DomainDecompAlgo.h, revA"
00040 
00041 #include <DomainDecompAlgo.h>
00042 #include <AnalysisModel.h>
00043 #include <IncrementalIntegrator.h>
00044 #include <LinearSOE.h>
00045 #include <DomainSolver.h>
00046 #include <Subdomain.h>
00047 #include <Channel.h>
00048 #include <FEM_ObjectBroker.h>
00049 
00050 DomainDecompAlgo::DomainDecompAlgo()
00051 :SolutionAlgorithm(DomDecompALGORITHM_TAGS_DomainDecompAlgo),
00052  theModel(0), theIntegrator(0), theLinearSOE(0), theSolver(0),
00053  theSubdomain(0)
00054 {
00055 
00056 }
00057 
00058 
00059 DomainDecompAlgo::~DomainDecompAlgo()
00060 {
00061 
00062 }
00063 
00064 int
00065 DomainDecompAlgo::solveCurrentStep(void)
00066 {
00067     if (theModel == 0 || theIntegrator == 0 || theLinearSOE == 0 ||
00068  theSolver == 0 || theSubdomain != 0 ) {
00069 
00070  const Vector &extResponse = 
00071      theSubdomain->getLastExternalSysResponse();
00072 
00073  theSolver->setComputedXext(extResponse);
00074  theSolver->solveXint();
00075 
00076  theIntegrator->update(theLinearSOE->getX());
00077  
00078  return 0;
00079     }
00080     else {
00081  cerr << "DomainDecompAlgo::solveCurrentStep() ";
00082  cerr << "no links have been set\n";
00083  return -1;
00084     }
00085 }
00086 
00087 void 
00088 DomainDecompAlgo::setLinks(AnalysisModel &theAnaModel, 
00089       IncrementalIntegrator &theInteg,
00090       LinearSOE &theSOE,
00091       DomainSolver &theDomainSolver,
00092       Subdomain &theSub)
00093 {
00094     theModel = &theAnaModel;
00095     theIntegrator = &theInteg;
00096     theLinearSOE = &theSOE;
00097     theSolver = &theDomainSolver;
00098     theSubdomain = &theSub;
00099 }
00100     
00101 
00102 
00103 int
00104 DomainDecompAlgo::sendSelf(int cTag, Channel &theChannel)
00105 {
00106     return 0;
00107 }
00108 
00109 int
00110 DomainDecompAlgo::recvSelf(int ctag, Channel &theChannel, 
00111       FEM_ObjectBroker &theBroker)
00112 {
00113     return 0;
00114 }
00115 
Copyright Contact Us