StaticIntegrator.cppGo 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.4 $ 00022 // $Date: 2003/02/14 23:00:49 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/integrator/StaticIntegrator.cpp,v $ 00024 00025 00026 // File: ~/analysis/integrator/StaticIntegrator.C 00027 // 00028 // Written: fmk 00029 // Created: 11/96 00030 // Revision: A 00031 // 00032 // Description: This file contains the class definition for StaticIntegrator. 00033 // StaticIntegrator is an algorithmic class for setting up the finite element 00034 // equations for a static analysis and for Incrementing the nodal displacements 00035 // with the values in the soln vector to the LinearSOE object. 00036 // 00037 // What: "@(#) StaticIntegrator.C, revA" 00038 00039 #include <StaticIntegrator.h> 00040 #include <FE_Element.h> 00041 #include <LinearSOE.h> 00042 #include <AnalysisModel.h> 00043 #include <Vector.h> 00044 #include <DOF_Group.h> 00045 #include <Channel.h> 00046 #include <FEM_ObjectBroker.h> 00047 00048 StaticIntegrator::StaticIntegrator(int clasTag) 00049 :IncrementalIntegrator(clasTag) 00050 { 00051 // for subclasses 00052 } 00053 00054 StaticIntegrator::~StaticIntegrator() 00055 { 00056 } 00057 00058 int 00059 StaticIntegrator::formEleTangent(FE_Element *theEle) 00060 { 00061 // only elements stiffness matrix needed 00062 00063 if (statusFlag == CURRENT_TANGENT) { 00064 theEle->zeroTangent(); 00065 theEle->addKtToTang(); 00066 } else if (statusFlag == INITIAL_TANGENT) { 00067 theEle->zeroTangent(); 00068 theEle->addKiToTang(); 00069 } 00070 00071 return 0; 00072 } 00073 00074 int 00075 StaticIntegrator::formEleResidual(FE_Element *theEle) 00076 { 00077 // only elements residual needed 00078 theEle->zeroResidual(); 00079 theEle->addRtoResidual(); 00080 return 0; 00081 } 00082 00083 int 00084 StaticIntegrator::formNodTangent(DOF_Group *theDof) 00085 { 00086 // should never be called 00087 opserr << "StaticIntegrator::formNodTangent() -"; 00088 opserr << " this method should never have been called!\n"; 00089 return -1; 00090 } 00091 00092 int 00093 StaticIntegrator::formNodUnbalance(DOF_Group *theDof) 00094 { 00095 // only nodes unbalance need be added 00096 theDof->zeroUnbalance(); 00097 theDof->addPtoUnbalance(); 00098 return 0; 00099 } 00100 |