00001
00002
00003
00004 #include <YS_Section2D01.h>
00005
00006 YS_Section2D01::YS_Section2D01(void)
00007 :YieldSurfaceSection2d(0, SEC_TAG_YieldSurface2D01, 0, true),
00008 E(0), A(0), I(0)
00009 {
00010 }
00011
00012 YS_Section2D01::YS_Section2D01
00013 (int tag, double E_in, double A_in, double I_in, YieldSurface_BC *ptrys, bool use_kr)
00014 :YieldSurfaceSection2d(tag, SEC_TAG_YieldSurface2D01, ptrys, use_kr),
00015 E(E_in), A(A_in), I(I_in)
00016 {
00017 if (E <= 0.0)
00018 {
00019 opserr << "YS_Section2D01::YS_Section2D01 -- Input E <= 0.0 ... setting E to 1.0\n";
00020 E = 1.0;
00021 }
00022
00023 if (A <= 0.0)
00024 {
00025 opserr << "YS_Section2D01::YS_Section2D01 -- Input A <= 0.0 ... setting A to 1.0\n";
00026 A = 1.0;
00027 }
00028
00029 if (I <= 0.0)
00030 {
00031 opserr << "YS_Section2D01::YS_Section2D01 -- Input I <= 0.0 ... setting I to 1.0",
00032 I = 1.0;
00033 }
00034
00035 }
00036
00037
00038 YS_Section2D01::~YS_Section2D01(void)
00039 {
00040
00041 }
00042
00043 void YS_Section2D01::getSectionStiffness(Matrix &Ks)
00044 {
00045 Ks(0,0) = E*A; Ks(0,1) = 0.0;
00046 Ks(1,0) = 0.0; Ks(1,1) = E*I;
00047 }
00048
00049 const Matrix &
00050 YS_Section2D01::getInitialTangent(void)
00051 {
00052 ks(0,0) = E*A; ks(0,1) = 0.0;
00053 ks(1,0) = 0.0; ks(1,1) = E*I;
00054
00055 return ks;
00056 }
00057
00058 SectionForceDeformation* YS_Section2D01::getCopy ()
00059 {
00060
00061 YS_Section2D01 *theCopy =
00062 new YS_Section2D01 (this->getTag(), E, A, I, ys, use_Kr_orig);
00063 theCopy->eCommit = eCommit;
00064 theCopy->sCommit = sCommit;
00065
00066 return theCopy;
00067 }
00068
00069 void YS_Section2D01::Print (OPS_Stream &s, int flag)
00070 {
00071 s << "YS_Section2D01, tag: " << this->getTag() << endln;
00072 s << "\tE: " << E << endln;
00073 s << "\tA: " << A << endln;
00074 s << "\tI: " << I << endln;
00075 this->YieldSurfaceSection2d::Print(s, flag);
00076 }