Bar2DL2.h
Go to the documentation of this file.00001 /*============================================================================== 00002 00003 O F E L I 00004 00005 Object Finite Element Library 00006 00007 ============================================================================== 00008 00009 Copyright (C) 1998 - 2008 Rachid Touzani 00010 00011 This program is free software; you can redistribute it and/or modify it under 00012 the terms of the GNU General Public License as published by the Free 00013 Software Foundation; Version 2 of the License. 00014 00015 This program is distributed in the hope that it will be useful, but WITHOUT 00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00017 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 00018 details. 00019 00020 You should have received a copy of the GNU General Public License 00021 along with this program; if not, write to the : 00022 00023 Free Software Foundation 00024 Inc., 59 Temple Place - Suite 330 00025 Boston, MA 02111-1307, USA 00026 00027 ============================================================================== 00028 00029 Definition of class Bar2DL2 00030 for Planar Bar element with 2 d.o.f. per node 00031 00032 ==============================================================================*/ 00033 00034 00035 #ifndef __BAR2DL2_H 00036 #define __BAR2DL2_H 00037 00038 00039 #include "Equa_Solid.h" 00040 #include "Line2.h" 00041 #include "UserData.h" 00042 00043 namespace OFELI { 00044 00061 class Bar2DL2 : public Equa_Solid<double,2,4,1,2> 00062 { 00063 00064 public : 00065 00068 Bar2DL2() { _ln = NULL; } 00069 00074 Bar2DL2(Element *el, double section); 00075 00077 ~Bar2DL2() { delete _ln; _ln = NULL; } 00078 00079 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00081 void build(); 00082 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00083 00086 void Mass(double coef=1.) { MassToLHS(coef); MassToRHS(coef); } 00087 00090 void LMass(double coef=1.) { LMassToLHS(coef); LMassToRHS(coef); } 00091 00094 void LMassToLHS(double coef=1); 00095 00098 void LMassToRHS(double coef=1); 00099 00102 void MassToLHS(double coef=1); 00103 00106 void MassToRHS(double coef=1); 00107 00110 void Stiffness(double coef=1.); 00111 00114 void BodyRHS(UserData<double> &ud); 00115 00117 double Stress() const; 00118 00123 void getStresses(const NodeVect<double> &u, ElementVect<double> &s) const; 00124 00125 private : 00126 00127 void ElementSet(const Element *el); 00128 double _section, _cc, _ss, _sc; 00129 Line2 *_ln; 00130 }; 00131 00132 } /* namespace OFELI */ 00133 00134 #endif