00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
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