FedeasHardeningMaterial.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/FedeasHardeningMaterial.cpp,v $
00024                                                                       
00025 // Written: MHS
00026 // Created: Jan 2001
00027 //
00028 // Description: This file contains the class definition for 
00029 // FedeasHardeningMaterial. FedeasHardeningMaterial wraps the FEDEAS
00030 // 1d material subroutine Hard_1.
00031 
00032 #include <stdlib.h>
00033 #include <FedeasHardeningMaterial.h>
00034 
00035 FedeasHardeningMaterial::FedeasHardeningMaterial(int tag,
00036                                          double E, double sigmaY, double Hiso, double Hkin):
00037 // 3 history variables and 4 material parameters
00038 FedeasMaterial(tag, MAT_TAG_FedeasHardening, 3, 4)
00039 {
00040         // Fill in material parameters
00041         data[0] = E;
00042         data[1] = sigmaY;
00043         data[2] = Hiso;
00044         data[3] = Hkin;
00045 
00046         tangentP = E;
00047         tangent = tangentP;
00048 }
00049 
00050 FedeasHardeningMaterial::FedeasHardeningMaterial(int tag, const Vector &d):
00051 // 3 history variables and 4 material parameters
00052 FedeasMaterial(tag, MAT_TAG_FedeasHardening, 3, 4)
00053 {
00054   if (d.Size() != numData) {
00055     opserr << "FedeasHardeningMaterial::FedeasHardeningMaterial -- not enough input arguments\n";
00056     exit(-1);   
00057   }
00058 
00059   for (int i = 0; i < numData; i++)
00060     data[i] = d(i);
00061 
00062   tangentP = data[0];
00063   tangent = tangentP;
00064 }
00065 
00066 FedeasHardeningMaterial::FedeasHardeningMaterial(void):
00067 FedeasMaterial(0, MAT_TAG_FedeasHardening, 3, 4)
00068 {
00069         // Does nothing
00070 }
00071 
00072 FedeasHardeningMaterial::~FedeasHardeningMaterial(void)
00073 {
00074         // Does nothing
00075 }
00076 
00077 UniaxialMaterial*
00078 FedeasHardeningMaterial::getCopy(void)
00079 {
00080   Vector d(data, numData);
00081 
00082   FedeasHardeningMaterial *theCopy = new FedeasHardeningMaterial(this->getTag(), d);
00083   
00084   // Copy history variables
00085   for (int i = 0; i < 2*numHstv; i++)
00086     theCopy->hstv[i] = hstv[i];
00087   
00088   theCopy->epsilonP = epsilonP;
00089   theCopy->sigmaP   = sigmaP;
00090   theCopy->tangentP = tangentP;
00091 
00092   theCopy->epsilon = epsilonP;
00093   theCopy->sigma = sigmaP;
00094   theCopy->tangent = tangentP;  
00095   
00096   return theCopy;
00097 }
00098 
00099 double
00100 FedeasHardeningMaterial::getInitialTangent(void)
00101 {
00102         //return E;
00103         return data[0];
00104 }

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