FedeasHyster1Material.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.5 $
00022 // $Date: 2004/07/15 21:36:46 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/fedeas/FedeasHyster1Material.cpp,v $
00024                                                                       
00025 // Written: MHS
00026 // Created: Jan 2001
00027 //
00028 // Description: This file contains the class definition for 
00029 // FedeasHyster1Material. FedeasHyster1Material wraps the FEDEAS
00030 // 1d material subroutine Hyster_1.
00031 
00032 #include <stdlib.h>
00033 #include <FedeasHyster1Material.h>
00034 
00035 FedeasHyster1Material::FedeasHyster1Material(int tag,
00036         double mom1p, double rot1p, double mom2p, double rot2p,
00037         double mom1n, double rot1n, double mom2n, double rot2n,
00038         double pinchX, double pinchY, double damfc1, double damfc2):
00039 // 6 history variables and 12 material parameters
00040 FedeasMaterial(tag, MAT_TAG_FedeasHysteretic1, 6, 12)
00041 {
00042         data[0]  = mom1p;
00043         data[1]  = rot1p;
00044         data[2]  = mom2p;
00045         data[3]  = rot2p;
00046 
00047         data[4]  = mom1n;
00048         data[5]  = rot1n;
00049         data[6]  = mom2n;
00050         data[7]  = rot2n;
00051 
00052         data[8]  = pinchX;
00053         data[9]  = pinchY;
00054         data[10] = damfc1;
00055         data[11] = damfc2;
00056 
00057         tangentP =  data[0]/data[1];
00058         tangent = tangentP;
00059 }
00060 
00061 FedeasHyster1Material::FedeasHyster1Material(int tag, const Vector &d):
00062 // 6 history variables and 12 material parameters
00063 FedeasMaterial(tag, MAT_TAG_FedeasHysteretic1, 6, 12)
00064 {
00065   if (d.Size() != numData) {
00066     opserr << "FedeasHyster1Material::FedeasHyster1Material -- not enough input arguments\n";
00067     exit(-1);
00068   }
00069                 
00070   for (int i = 0; i < numData; i++)
00071     data[i] = d(i);
00072 }
00073 
00074 FedeasHyster1Material::FedeasHyster1Material(void):
00075 FedeasMaterial(0, MAT_TAG_FedeasHysteretic1, 6, 12)
00076 {
00077         // Does nothing
00078 }
00079 
00080 FedeasHyster1Material::~FedeasHyster1Material(void)
00081 {
00082         // Does nothing
00083 }
00084 
00085 UniaxialMaterial*
00086 FedeasHyster1Material::getCopy(void)
00087 {
00088   Vector d(data, numData);
00089 
00090   FedeasHyster1Material *theCopy = new FedeasHyster1Material(this->getTag(), d);
00091   
00092   // Copy history variables
00093   for (int i = 0; i < 2*numHstv; i++)
00094     theCopy->hstv[i] = hstv[i];
00095   
00096   theCopy->epsilonP = epsilonP;
00097   theCopy->sigmaP   = sigmaP;
00098   theCopy->tangentP = tangentP;
00099 
00100   theCopy->epsilon = epsilonP;
00101   theCopy->sigma = sigmaP;
00102   theCopy->tangent = tangentP;  
00103 
00104   return theCopy;
00105 }
00106 
00107 double
00108 FedeasHyster1Material::getInitialTangent(void)
00109 {
00110         //return mom1p/rot1p;
00111         return data[0]/data[1];
00112 }

Generated on Mon Oct 23 15:05:20 2006 for OpenSees by doxygen 1.5.0