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

PHAL_LangevinNoiseTerm.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 
00007 #ifndef PHAL_LANGEVINNOISETERM_HPP
00008 #define PHAL_LANGEVINNOISETERM_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 "QCAD_EvaluatorTools.hpp"
00016 
00017 // Random and Gaussian number distribution
00018 #include <boost/random.hpp>
00019 #include <boost/random/normal_distribution.hpp>
00020 #include <boost/random/mersenne_twister.hpp>
00021 #include <boost/random/variate_generator.hpp>
00022 
00028 namespace PHAL {
00029 
00030 template<typename EvalT, typename Traits>
00031 class LangevinNoiseTerm : public PHX::EvaluatorWithBaseImpl<Traits>,
00032        public PHX::EvaluatorDerived<EvalT, Traits>,
00033        public QCAD::EvaluatorTools<EvalT, Traits>
00034 {
00035 
00036 public:
00037 
00038   typedef typename EvalT::ScalarT ScalarT;
00039 
00040   LangevinNoiseTerm(const Teuchos::ParameterList& p);
00041 
00042   void postRegistrationSetup(typename Traits::SetupData d,
00043                       PHX::FieldManager<Traits>& vm);
00044 
00045   void evaluateFields(typename Traits::EvalData d);
00046 
00047   ScalarT& getValue(const std::string &n);
00048 
00049 
00050 private:
00051  
00052   typedef typename EvalT::MeshScalarT MeshScalarT;
00053 
00054   // Input:
00055   PHX::MDField<ScalarT,Cell,QuadPoint> rho;
00056   
00057   // Output:
00058   PHX::MDField<ScalarT,Cell,QuadPoint> noiseTerm;
00059 
00060   unsigned int numQPs, numDims, numNodes;
00061 
00062   ScalarT sd;
00063   Teuchos::Array<int> duration;
00064 
00065   boost::mt19937 rng;
00066   Teuchos::RCP<boost::normal_distribution<double> > nd;
00067   Teuchos::RCP<boost::variate_generator<boost::mt19937&, boost::normal_distribution<double> > > var_nor;
00068 //  Teuchos::RCP<boost::normal_distribution<ScalarT> > nd;
00069 //  Teuchos::RCP<boost::variate_generator<boost::mt19937&, boost::normal_distribution<ScalarT> > > var_nor;
00070 
00071   // generate seed convenience function
00072   long seedgen();
00073 
00074 };
00075 }
00076 
00077 #endif

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