|
OOFEM
2.1
|
00001 /* 00002 * 00003 * ##### ##### ###### ###### ### ### 00004 * ## ## ## ## ## ## ## ### ## 00005 * ## ## ## ## #### #### ## # ## 00006 * ## ## ## ## ## ## ## ## 00007 * ## ## ## ## ## ## ## ## 00008 * ##### ##### ## ###### ## ## 00009 * 00010 * 00011 * OOFEM : Object Oriented Finite Element Code 00012 * 00013 * Copyright (C) 1993 - 2013 Borek Patzak 00014 * 00015 * 00016 * 00017 * Czech Technical University, Faculty of Civil Engineering, 00018 * Department of Structural Mechanics, 166 29 Prague, Czech Republic 00019 * 00020 * This program is free software; you can redistribute it and/or modify 00021 * it under the terms of the GNU General Public License as published by 00022 * the Free Software Foundation; either version 2 of the License, or 00023 * (at your option) any later version. 00024 * 00025 * This program is distributed in the hope that it will be useful, 00026 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00027 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00028 * GNU General Public License for more details. 00029 * 00030 * You should have received a copy of the GNU General Public License 00031 * along with this program; if not, write to the Free Software 00032 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00033 */ 00034 00035 #ifndef crosssection_h 00036 #define crosssection_h 00037 00038 #include "femcmpnn.h" 00039 #include "gausspnt.h" 00040 #include "materialmode.h" 00041 #include "matresponsemode.h" 00042 #include "material.h" 00043 00044 #include "classtype.h" 00045 #include "internalstatetype.h" 00046 #include "internalstatevaluetype.h" 00047 #include "crosssectextension.h" 00048 00049 namespace oofem { 00050 00052 enum CrossSectionProperty { 00053 CS_Thickness=400, 00054 CS_Width, 00055 CS_BeamShearCoeff, 00056 CS_Area, 00057 CS_InertiaMomentY, 00058 CS_InertiaMomentZ, 00059 CS_TorsionMomentX, 00060 CS_SHEAR_AREA_Y, 00061 CS_SHEAR_AREA_Z, 00062 CS_TopZCoord, 00063 CS_BottomZCoord, 00064 CS_NumLayers, 00065 }; 00066 00095 class CrossSection : public FEMComponent 00096 { 00097 protected: 00103 Dictionary *propertyDictionary; 00104 00105 public: 00111 CrossSection(int n, Domain *d) : FEMComponent(n, d) 00112 { propertyDictionary = new Dictionary(); } 00114 virtual ~CrossSection() { delete propertyDictionary; } 00115 00121 virtual double give(CrossSectionProperty a); 00130 virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode, int mat); 00131 00132 virtual void printYourself(); 00133 00139 virtual int testCrossSectionExtension(CrossSectExtension ext) { return 0; } 00140 00149 virtual int giveIPValue(FloatArray &answer, GaussPoint *ip, InternalStateType type, TimeStep *atTime) 00150 { return ip->giveMaterial()->giveIPValue(answer, ip, type, atTime); } 00157 virtual int giveIPValueSize(InternalStateType type, GaussPoint *ip) 00158 { return ip->giveMaterial()->giveIPValueSize(type, ip); } 00167 virtual int giveIntVarCompFullIndx(IntArray &answer, InternalStateType type, MaterialMode mmode, Material *mat) 00168 { return mat->giveIntVarCompFullIndx(answer, type, mmode); } 00175 virtual InternalStateValueType giveIPValueType(InternalStateType type, Material *mat) 00176 { return mat->giveIPValueType(type); } 00177 00178 #ifdef __PARALLEL_MODE 00179 00191 virtual int packUnknowns(CommunicationBuffer &buff, TimeStep *stepN, GaussPoint *ip) 00192 { return ip->giveMaterial()->packUnknowns(buff, stepN, ip); } 00202 virtual int unpackAndUpdateUnknowns(CommunicationBuffer &buff, TimeStep *stepN, GaussPoint *ip) 00203 { return ip->giveMaterial()->unpackAndUpdateUnknowns(buff, stepN, ip); } 00212 virtual int estimatePackSize(CommunicationBuffer &buff, GaussPoint *ip) 00213 { return ip->giveMaterial()->estimatePackSize(buff, ip); } 00224 virtual double predictRelativeComputationalCost(GaussPoint *ip); 00232 virtual double giveRelativeSelfComputationalCost() { return 1.0; } 00236 virtual double predictRelativeRedistributionCost(GaussPoint *gp) { return 1.0; } 00237 #endif 00238 00239 virtual IRResultType initializeFrom(InputRecord *ir); 00240 virtual const char *giveClassName() const { return "CrossSection"; } 00241 virtual classType giveClassID() const { return CrossSectionClass; } 00242 00251 virtual contextIOResultType saveIPContext(DataStream *stream, ContextMode mode, GaussPoint *gp); 00260 virtual contextIOResultType restoreIPContext(DataStream *stream, ContextMode mode, GaussPoint *gp); 00261 00262 friend class Material; 00263 }; 00264 } // end namespace oofem 00265 #endif // crosssection_h 00266