/Users/jack/Code/basso_dev/inc/ElasticityFormulation.h

Go to the documentation of this file.
00001 
00012 #ifndef _ELASTICITY_FORMULATION_BASSO_H_
00013 #define _ELASTICITY_FORMULATION_BASSO_H_
00014 
00015 // std includes
00016 
00017 // Basso includes
00018 #include "basso.h"
00019 #include "StructuralFormulation.h"
00020 #include "MatElastic.h"
00021 #include "basic_fem_operations.h"
00022 
00023 namespace basso {
00024 
00025 
00036 class ElasticityFormulation : public StructuralFormulation {
00037 
00038 public:
00039         
00040         // PUBLIC DEFS
00041         
00042         // CONSTRUCTORS 
00046         ElasticityFormulation( list< Element > &elem, const Array< Node > &nodes, 
00047                 const Material *material, Numeric t=1.0, StressStateType ss=kSTRESS_3D ) 
00048                 : StructuralFormulation( elem, nodes, ss )
00049         { 
00050                 this->fMat=material; 
00051                 Initialize(t);
00052                 CheckElements();
00053         }
00054         
00055         ~ElasticityFormulation() { }
00056         
00057         // ACCESSORS
00058         
00059         // MEMBER FUNCTIONS
00060         
00061 protected:
00063         virtual void SetCMatrix()  
00064                 { this->fMat->ComputeTangentStiffness( this->mCmat, this->fStressState );       }
00065         
00068         void CheckElements() const;
00069         
00071         void Initialize( Numeric t );
00072         
00073 private:
00074         Numeric mThickness;
00075 
00076 };
00077         
00078 void ElasticityFormulation::Initialize( Numeric t ) 
00079 { 
00080         this->mSdim = this->fStressState->Dimension();
00081         mThickness=t; 
00082         resize( this->activeLocalDofs, this->mSdim );
00083         this->activeLocalDofs[0]=kDISPx; 
00084         if ( this->mSdim>1 ) this->activeLocalDofs[1]=kDISPy;
00085         if ( this->mSdim>2 ) this->activeLocalDofs[2]=kDISPz;
00086 }
00087 
00088 void ElasticityFormulation::CheckElements() const
00089 {
00090         list< Element >::const_iterator eItr;
00091         for ( eItr=this->fElement->begin(); eItr!=this->fElement->end(); ++eItr ) 
00092                 if ( eItr->Dimension()!=this->mSdim )
00093                         WarningMessage("ElasticityFormulation",
00094                                 "Elements must be of proper dimension; other elements will be ignored");
00095 }
00096 
00097 
00098 } // end namespace
00099 
00100 #endif
00101 
00102 

Generated on Sat Jan 19 09:03:57 2008 for Basso by  doxygen 1.5.2