00001
00002
00003
00004
00005
00006
00007 #if !defined(LCM_ConstitutiveModelParameters_hpp)
00008 #define LCM_ConstitutiveModelParameters_hpp
00009
00010 #include "Phalanx_ConfigDefs.hpp"
00011 #include "Phalanx_Evaluator_WithBaseImpl.hpp"
00012 #include "Phalanx_Evaluator_Derived.hpp"
00013 #include "Phalanx_MDField.hpp"
00014
00015 #include "Teuchos_ParameterList.hpp"
00016 #include "Epetra_Vector.h"
00017 #include "Sacado_ParameterAccessor.hpp"
00018 #include "Stokhos_KL_ExponentialRandomField.hpp"
00019 #include "Teuchos_Array.hpp"
00020 #include "Albany_Layouts.hpp"
00021
00022 namespace LCM {
00027 template<typename EvalT, typename Traits>
00028 class ConstitutiveModelParameters :
00029 public PHX::EvaluatorWithBaseImpl<Traits>,
00030 public PHX::EvaluatorDerived<EvalT, Traits>,
00031 public Sacado::ParameterAccessor<EvalT, SPL_Traits> {
00032
00033 public:
00034 typedef typename EvalT::ScalarT ScalarT;
00035 typedef typename EvalT::MeshScalarT MeshScalarT;
00036
00040 ConstitutiveModelParameters(Teuchos::ParameterList& p,
00041 const Teuchos::RCP<Albany::Layouts>& dl);
00042
00046 void postRegistrationSetup(typename Traits::SetupData d,
00047 PHX::FieldManager<Traits>& vm);
00048
00052 void evaluateFields(typename Traits::EvalData d);
00053
00057 ScalarT& getValue(const std::string &n);
00058
00062 void parseParameters(const std::string &n,
00063 Teuchos::ParameterList &pl,
00064 Teuchos::RCP<ParamLib> paramLib);
00065
00066 private:
00067
00071 std::size_t num_pts_;
00072
00076 std::size_t num_dims_;
00077
00081 PHX::MDField<MeshScalarT,Cell,QuadPoint,Dim> coord_vec_;
00082
00087 PHX::MDField<ScalarT,Cell,QuadPoint> elastic_mod_;
00088 PHX::MDField<ScalarT,Cell,QuadPoint> poissons_ratio_;
00089 PHX::MDField<ScalarT,Cell,QuadPoint> bulk_mod_;
00090 PHX::MDField<ScalarT,Cell,QuadPoint> shear_mod_;
00092 PHX::MDField<ScalarT,Cell,QuadPoint> yield_strength_;
00093 PHX::MDField<ScalarT,Cell,QuadPoint> hardening_mod_;
00094 PHX::MDField<ScalarT,Cell,QuadPoint> recovery_mod_;
00096 PHX::MDField<ScalarT,Cell,QuadPoint> conc_eq_param_;
00097 PHX::MDField<ScalarT,Cell,QuadPoint> diff_coeff_;
00099 PHX::MDField<ScalarT,Cell,QuadPoint> thermal_cond_;
00100
00104 std::map<std::string, PHX::MDField<ScalarT,Cell,QuadPoint> > field_map_;
00105
00109 std::map<std::string, bool> is_constant_map_;
00110
00114 std::map<std::string, ScalarT> constant_value_map_;
00115
00119 bool have_temperature_;
00120 PHX::MDField<ScalarT,Cell,QuadPoint> temperature_;
00121 std::map<std::string, RealType> dparam_dtemp_map_;
00122 std::map<std::string, RealType> ref_temp_map_;
00123 std::map<std::string, RealType> ideal_map_;
00124 std::map<std::string, RealType> pre_exp_map_;
00125 std::map<std::string, RealType> exp_param_map_;
00126
00128 std::map<std::string, Teuchos::RCP< Stokhos::KL::ExponentialRandomField<MeshScalarT> > > exp_rf_kl_map_;
00129
00131 std::map<std::string, Teuchos::Array<ScalarT> > rv_map_;
00132
00134 const Teuchos::RCP<Albany::Layouts>& dl_;
00135 };
00136 }
00137
00138 #endif