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

QCAD_SchrodingerPotential.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 QCAD_SCHRODINGERPOTENTIAL_HPP
00008 #define QCAD_SCHRODINGERPOTENTIAL_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 "Albany_Layouts.hpp"
00016 
00017 #include "Teuchos_ParameterList.hpp"
00018 #include "Epetra_Vector.h"
00019 #include "Sacado_ParameterAccessor.hpp"
00020 #include "Stokhos_KL_ExponentialRandomField.hpp"
00021 #include "Teuchos_Array.hpp"
00022 
00023 namespace QCAD {
00027   template<typename EvalT, typename Traits>
00028   class SchrodingerPotential : 
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 
00037     SchrodingerPotential(Teuchos::ParameterList& p,
00038                  const Teuchos::RCP<Albany::Layouts>& dl);
00039   
00040     void postRegistrationSetup(typename Traits::SetupData d,
00041            PHX::FieldManager<Traits>& vm);
00042   
00043     void evaluateFields(typename Traits::EvalData d);
00044   
00046     ScalarT& getValue(const std::string &n);
00047 
00048   private:
00049 
00051     Teuchos::RCP<const Teuchos::ParameterList>
00052         getValidSchrodingerPotentialParameters() const;
00053 
00054     ScalarT parabolicPotentialValue( const int numDim, const MeshScalarT* coord);
00055     ScalarT finiteWallPotential( const int numDim, const MeshScalarT* coord);
00056     ScalarT stringFormulaPotential( const int numDim, const MeshScalarT* coord);
00057 
00059     std::size_t numQPs;
00060     std::size_t numDims;
00061     PHX::MDField<MeshScalarT,Cell,QuadPoint,Dim> coordVec;
00062     PHX::MDField<ScalarT,Cell,QuadPoint> psi;  //wavefunction
00063 
00065     PHX::MDField<ScalarT,Cell,QuadPoint> V; //potential 
00066 
00068     //  Parabolic case -> confinement energy
00069     //  Finite Wall case -> barrier height 
00070     ScalarT E0;
00071 
00073     std::string stringFormula;
00074     
00076     double barrEffMass; // in [m0]
00077     double barrWidth;   // in length_unit_in_m
00078     double wellEffMass;
00079     double wellWidth; 
00080     
00082     ScalarT scalingFactor;
00083     
00084     std::string potentialType;
00085     std::string potentialStateName;
00086 
00088     double energy_unit_in_eV, length_unit_in_m;
00089   };
00090 }
00091 
00092 
00093 #endif

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