• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

CapImplicitModel.hpp

Go to the documentation of this file.
00001 //*****************************************************************//
00002 //    Albany 2.0:  Copyright 2012 Sandia Corporation               //
00003 //    This Software is released under the BSD license detailed     //
00004 //    in the file "license.txt" in the top-level Albany directory  //
00005 //*****************************************************************//
00006 #if !defined(CapImplicitModel_hpp)
00007 #define CapImplicitModel_hpp
00008 
00009 #include <Intrepid_MiniTensor.h>
00010 #include "Phalanx_ConfigDefs.hpp"
00011 #include "Phalanx_Evaluator_WithBaseImpl.hpp"
00012 #include "Phalanx_Evaluator_Derived.hpp"
00013 #include "Phalanx_MDField.hpp"
00014 #include "Albany_Layouts.hpp"
00015 #include "LCM/models/ConstitutiveModel.hpp"
00016 
00017 #include "Sacado.hpp"
00018 
00019 namespace LCM
00020 {
00025   
00026   template<typename EvalT, typename Traits>
00027   class CapImplicitModel: public LCM::ConstitutiveModel<EvalT,Traits>
00028   {
00029 
00030   public:
00031 
00032     typedef typename EvalT::ScalarT ScalarT;
00033     typedef typename EvalT::MeshScalarT MeshScalarT;
00034     typedef typename Sacado::mpl::apply<FadType,ScalarT>::type DFadType;
00035     typedef typename Sacado::mpl::apply<FadType,DFadType>::type D2FadType;
00036       
00037       
00038     using ConstitutiveModel<EvalT, Traits>::num_dims_;
00039     using ConstitutiveModel<EvalT, Traits>::num_pts_;
00040     using ConstitutiveModel<EvalT, Traits>::field_name_map_;
00044   CapImplicitModel(Teuchos::ParameterList* p,
00045     const Teuchos::RCP<Albany::Layouts>& dl);
00046       
00050   virtual
00051   ~CapImplicitModel()
00052   {};
00053       
00057   virtual
00058   void
00059   computeState(typename Traits::EvalData workset,
00060     std::map<std::string, Teuchos::RCP<PHX::MDField<ScalarT> > > dep_fields,
00061     std::map<std::string, Teuchos::RCP<PHX::MDField<ScalarT> > > eval_fields);
00062  
00063   private:
00064       
00068     CapImplicitModel(const CapImplicitModel&);
00069       
00073     CapImplicitModel& operator=(const CapImplicitModel&);
00074       
00075     // all local functions used in computing cap model stress:
00076     ScalarT
00077     compute_f(Intrepid::Tensor<ScalarT> & sigma,
00078         Intrepid::Tensor<ScalarT> & alpha,
00079         ScalarT & kappa);
00080 
00081     std::vector<ScalarT>
00082     initialize(Intrepid::Tensor<ScalarT> & sigmaVal,
00083         Intrepid::Tensor<ScalarT> & alphaVal, ScalarT & kappaVal,
00084         ScalarT & dgammaVal);
00085 
00086     void
00087     compute_ResidJacobian(std::vector<ScalarT> const & XXVal,
00088         std::vector<ScalarT> & R, std::vector<ScalarT> & dRdX,
00089         const Intrepid::Tensor<ScalarT> & sigmaVal,
00090         const Intrepid::Tensor<ScalarT> & alphaVal, const ScalarT & kappaVal,
00091         Intrepid::Tensor4<ScalarT> const & Celastic, bool kappa_flag);
00092 
00093     DFadType
00094     compute_f(Intrepid::Tensor<DFadType> & sigma,
00095         Intrepid::Tensor<DFadType> & alpha, DFadType & kappa);
00096 
00097     D2FadType
00098     compute_g(Intrepid::Tensor<D2FadType> & sigma,
00099         Intrepid::Tensor<D2FadType> & alpha, D2FadType & kappa);
00100 
00101     Intrepid::Tensor<DFadType>
00102     compute_dgdsigma(std::vector<DFadType> const & XX);
00103 
00104     DFadType
00105     compute_Galpha(DFadType J2_alpha);
00106 
00107     Intrepid::Tensor<DFadType>
00108     compute_halpha(Intrepid::Tensor<DFadType> const & dgdsigma,
00109         DFadType const J2_alpha);
00110 
00111     DFadType
00112     compute_dedkappa(DFadType const kappa);
00113 
00114     DFadType
00115     compute_hkappa(DFadType const I1_dgdsigma, DFadType const dedkappa);
00116 
00117     RealType A;
00118     RealType B;
00119     RealType C;
00120     RealType theta;
00121     RealType R;
00122     RealType kappa0;
00123     RealType W;
00124     RealType D1;
00125     RealType D2;
00126     RealType calpha;
00127     RealType psi;
00128     RealType N;
00129     RealType L;
00130     RealType phi;
00131     RealType Q;
00132 
00133     std::string strainName, stressName;
00134     std::string backStressName, capParameterName, eqpsName,volPlasticStrainName;
00135     
00136   };
00137 }
00138 
00139 #endif
00140 

Generated on Wed Mar 26 2014 18:36:37 for Albany: a Trilinos-based PDE code by  doxygen 1.7.1