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

CapImplicit.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 #ifndef CAPIMPLICIT_HPP
00007 #define CAPIMPLICIT_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 
00016 #include "Sacado.hpp"
00017 
00018 namespace LCM {
00025   template<typename EvalT, typename Traits>
00026   class CapImplicit: public PHX::EvaluatorWithBaseImpl<Traits>,
00027       public PHX::EvaluatorDerived<EvalT, Traits> {
00028 
00029   public:
00030 
00031     CapImplicit(const Teuchos::ParameterList& p,
00032                 const Teuchos::RCP<Albany::Layouts>& dl);
00033 
00034     void postRegistrationSetup(typename Traits::SetupData d,
00035         PHX::FieldManager<Traits>& vm);
00036 
00037     void evaluateFields(typename Traits::EvalData d);
00038 
00039   private:
00040 
00041     typedef typename EvalT::ScalarT ScalarT;
00042     typedef typename EvalT::MeshScalarT MeshScalarT;
00043     // typedef typename Sacado::Fad::DFad<ScalarT> DFadType;
00044     // typedef typename Sacado::Fad::DFad<DFadType> D2FadType;
00045     typedef typename Sacado::mpl::apply<FadType,ScalarT>::type DFadType;
00046     typedef typename Sacado::mpl::apply<FadType,DFadType>::type D2FadType;
00047 
00048     // all local functions used in computing cap model stress:
00049     ScalarT
00050     compute_f(Intrepid::Tensor<ScalarT> & sigma,
00051         Intrepid::Tensor<ScalarT> & alpha,
00052         ScalarT & kappa);
00053 
00054     std::vector<ScalarT>
00055     initialize(Intrepid::Tensor<ScalarT> & sigmaVal,
00056         Intrepid::Tensor<ScalarT> & alphaVal, ScalarT & kappaVal,
00057         ScalarT & dgammaVal);
00058 
00059     void
00060     compute_ResidJacobian(std::vector<ScalarT> const & XXVal,
00061         std::vector<ScalarT> & R, std::vector<ScalarT> & dRdX,
00062         const Intrepid::Tensor<ScalarT> & sigmaVal,
00063         const Intrepid::Tensor<ScalarT> & alphaVal, const ScalarT & kappaVal,
00064         Intrepid::Tensor4<ScalarT> const & Celastic, bool kappa_flag);
00065 
00066     DFadType
00067     compute_f(Intrepid::Tensor<DFadType> & sigma,
00068         Intrepid::Tensor<DFadType> & alpha, DFadType & kappa);
00069 
00070     D2FadType
00071     compute_g(Intrepid::Tensor<D2FadType> & sigma,
00072         Intrepid::Tensor<D2FadType> & alpha, D2FadType & kappa);
00073 
00074     Intrepid::Tensor<DFadType>
00075     compute_dgdsigma(std::vector<DFadType> const & XX);
00076 
00077     DFadType
00078     compute_Galpha(DFadType J2_alpha);
00079 
00080     Intrepid::Tensor<DFadType>
00081     compute_halpha(Intrepid::Tensor<DFadType> const & dgdsigma,
00082         DFadType const J2_alpha);
00083 
00084     DFadType
00085     compute_dedkappa(DFadType const kappa);
00086 
00087     DFadType
00088     compute_hkappa(DFadType const I1_dgdsigma, DFadType const dedkappa);
00089 
00093     unsigned int numQPs;
00094 
00098     unsigned int numDims;
00099 
00103     PHX::MDField<ScalarT, Cell, QuadPoint, Dim, Dim> strain;
00104 
00108     PHX::MDField<ScalarT, Cell, QuadPoint> elasticModulus;
00109 
00113     PHX::MDField<ScalarT, Cell, QuadPoint> poissonsRatio;
00114 
00118 
00119     RealType A;
00120     RealType B;
00121     RealType C;
00122     RealType theta;
00123     RealType R;
00124     RealType kappa0;
00125     RealType W;
00126     RealType D1;
00127     RealType D2;
00128     RealType calpha;
00129     RealType psi;
00130     RealType N;
00131     RealType L;
00132     RealType phi;
00133     RealType Q;
00134 
00135     std::string strainName, stressName;
00136     std::string backStressName, capParameterName, eqpsName,volPlasticStrainName;
00137 
00141     PHX::MDField<ScalarT, Cell, QuadPoint, Dim, Dim> stress;
00142 
00146     PHX::MDField<ScalarT, Cell, QuadPoint, Dim, Dim> backStress;
00147 
00151     PHX::MDField<ScalarT, Cell, QuadPoint> capParameter;
00152 
00156     //PHX::MDField<ScalarT, Cell, QuadPoint> friction;
00157 
00161     //PHX::MDField<ScalarT, Cell, QuadPoint> dilatancy;
00162 
00166     PHX::MDField<ScalarT, Cell, QuadPoint> eqps;
00167 
00171     PHX::MDField<ScalarT, Cell, QuadPoint> volPlasticStrain;
00172 
00176     //PHX::MDField<ScalarT, Cell, QuadPoint> hardeningModulus;
00177 
00178   };
00179 }
00180 
00181 #endif
00182 

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