vtf-logo

shells/materials/MaterialBase.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 /*
00003  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00004  *
00005  *                                   Fehmi Cirak
00006  *                        California Institute of Technology
00007  *                           (C) 2005 All Rights Reserved
00008  *
00009  * <LicenseText>
00010  *
00011  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00012 */
00013 #ifndef MATERIALBASE_H
00014 #define MATERIALBASE_H
00015 #include <iosfwd>
00016 
00017 #include "../utilities/PropertiesParser.h"
00018 
00019 
00020 namespace shells {
00021     class MaterialBase;
00022 }
00023 
00024 
00025 class shells::MaterialBase {
00026 public:
00027     MaterialBase(int numInternal, bool planeStress);
00028     virtual ~MaterialBase();
00029     
00030     // update stresses 
00031     virtual void updateStress(double * const stress, 
00032                               double const * const gstrain, 
00033                               double const dtime = 0.0,
00034                               double * const history=NULL,
00035                               double const * const gstrainPrv=NULL)=0;    
00036 
00037     virtual double density()=0;    
00038 
00039     // estimated young's modulus (used for computing stable time step)
00040     virtual double estimatedElasticityConst()=0;     
00041     
00042     // initialize history vars. and perform material specific initialization
00043     virtual void initialization(double * history)=0; 
00044 
00045     // I/O 
00046     void readMaterialParams(std::istream& is);
00047     void printMaterialParams(std::ostream& os);
00048 
00049     // accessors
00050     int numInternal() const {return _numInternal;}
00051     bool planeStress() const {return _planeStress;}
00052     
00053 protected:
00054     template <typename T>
00055     void registerVariable(const std::string& name, T& variable) {
00056         _parser->registerPropertiesVar(name, variable);
00057     }
00058     
00059 private:
00060     const int      _numInternal;
00061     const bool     _planeStress;
00062     
00063     utilities::PropertiesParser   *_parser;
00064 };
00065 
00066 #endif
00067 

Generated on Fri Aug 24 13:00:24 2007 for SFC Thin-Shell Finite Element Solver by  doxygen 1.4.7