ReinfBar.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.2 $
00022 // $Date: 2003/02/14 23:01:37 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/section/repres/reinfBar/ReinfBar.cpp,v $
00024                                                                         
00025                                                                         
00026 // File: ReinfBar.C
00027 // Written by Remo M. de Souza
00028 // December 1998
00029 
00030 #include <math.h>
00031 #include <Matrix.h>
00032 #include <Vector.h>
00033 
00034 #include <ReinfBar.h>
00035 
00036 
00037 ReinfBar::ReinfBar (void):
00038                    diameter(0.0), area(0.0), matID(0), posit(2)
00039 {
00040 
00041 }
00042 
00043 
00044 ReinfBar::ReinfBar(double barArea, int materialID, const Vector &position):
00045                    diameter(0.0), area(barArea),
00046                    matID(materialID), posit(position)
00047 {
00048 }
00049 
00050 ReinfBar::~ReinfBar()
00051 {
00052 
00053 }
00054 
00055 void ReinfBar::setDiameter (double barDiameter)
00056 {
00057    double pi = acos(-1.0);
00058    diameter = barDiameter;
00059    area = pi * diameter*diameter/4.0;     
00060 }
00061 
00062 void ReinfBar::setArea (double barArea)
00063 {
00064    area = barArea;
00065 }
00066 
00067 void ReinfBar::setMaterial (int materialID)
00068 {
00069    matID = materialID;
00070 }
00071 
00072 void ReinfBar::setPosition (const Vector &position)
00073 {
00074    posit = position;
00075 }
00076 
00077 double ReinfBar::getDiameter(void) const
00078 {
00079    return diameter;
00080 }
00081 
00082 double ReinfBar::getArea (void) const
00083 {
00084    return area;
00085 }
00086 
00087 
00088 const Vector & ReinfBar::getPosition(void) const
00089 {
00090    return posit;
00091 }
00092 
00093 
00094 void ReinfBar::Print(OPS_Stream &s, int flag) const
00095 {
00096    s << "\nReinforcing Bar area: " << area;
00097    s << "\nMaterial ID: " << matID;
00098    s << "\nDiameter: " << diameter;
00099    s << "\nArea: " << area;
00100    s << "\nPosition: " << posit;
00101 }
00102 
00103 
00104 //    friend OPS_Stream &operator<<(OPS_Stream &s, ReinfBar &reinfBar);    
00105 

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