TclNewUniaxialMaterial.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.1 $ 00022 // $Date: 2005/08/19 19:40:55 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/TclNewUniaxialMaterial.cpp,v $ 00024 00025 // Written: fmk 00026 // Created: Aug 2005 00027 // 00028 // Description: This file contains the implementation of the 00029 00030 00031 #include <NewUniaxialMaterial.h> 00032 00033 #include <TclModelBuilder.h> 00034 #include <string.h> 00035 00036 int 00037 TclCommand_NewUniaxialMaterial(ClientData clientData, Tcl_Interp *interp, int argc, 00038 TCL_Char **argv, TclModelBuilder *theTclBuilder) 00039 { 00040 00041 int tag; 00042 UniaxialMaterial *theMaterial = 0; 00043 00044 if (argc < 3) { 00045 opserr << "WARNING insufficient number of arguments\n"; 00046 return 0; 00047 } 00048 00049 if (Tcl_GetInt(interp, argv[2], &tag) != TCL_OK) { 00050 opserr << "WARNING invalid uniaxialMaterial tag\n"; 00051 return 0; 00052 } 00053 00054 /* 00055 if (Tcl_GetDouble(interp, argv[3], &E) != TCL_OK) { 00056 opserr << "WARNING invalid E\n"; 00057 return 0; 00058 } 00059 */ 00060 00061 theMaterial = new NewUniaxialMaterial(tag); 00062 00063 if (theMaterial != 0) 00064 return theTclBuilder->addUniaxialMaterial(*theMaterial); 00065 else 00066 return -1; 00067 } |