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

QCAD_GreensFunctionTunneling.hpp

Go to the documentation of this file.
00001 /********************************************************************\
00002 *            Albany, Copyright (2010) Sandia Corporation             *
00003 *                                                                    *
00004 * Notice: This computer software was prepared by Sandia Corporation, *
00005 * hereinafter the Contractor, under Contract DE-AC04-94AL85000 with  *
00006 * the Department of Energy (DOE). All rights in the computer software*
00007 * are reserved by DOE on behalf of the United States Government and  *
00008 * the Contractor as provided in the Contract. You are authorized to  *
00009 * use this computer software for Governmental purposes but it is not *
00010 * to be released or distributed to the public. NEITHER THE GOVERNMENT*
00011 * NOR THE CONTRACTOR MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR      *
00012 * ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. This notice    *
00013 * including this sentence must appear on any copies of this software.*
00014 *    Questions to Andy Salinger, agsalin@sandia.gov                  *
00015 \********************************************************************/
00016 
00017 
00018 #ifndef QCAD_GREENSFUNCTIONTUNNELING_HPP
00019 #define QCAD_GREENSFUNCTIONTUNNELING_HPP
00020 
00021 #include "Epetra_Map.h"
00022 #include "Epetra_Comm.h"
00023 #include "AnasaziEpetraAdapter.hpp"
00024 
00025 namespace QCAD {
00026 
00027   class GreensFunctionTunnelingSolver
00028   {
00029   public:
00030 
00031     // EcValues are in units of eV
00032     // effMass is in units of m_0 (electron rest mass)
00033     // ptSpacing is in units of microns (um)
00034     GreensFunctionTunnelingSolver(const Teuchos::RCP<std::vector<double> >& EcValues_,
00035           const Teuchos::RCP<std::vector<double> >& pathLen_, int nGFPts_,  
00036           double ptSpacing_, double effMass_, 
00037           const Teuchos::RCP<const Epetra_Comm>& Comm_,
00038           const std::string& outputFilename,
00039           bool bNeumannBC_ = true);
00040     ~GreensFunctionTunnelingSolver();
00041 
00042     // returns current in units of Amps at a given Vds (in Volts)
00043     double computeCurrent(double Vds, double kbT, double Ecutoff_offset_from_Emax, bool bUseAnasazi);
00044     
00045     void computeCurrentRange(const std::vector<double> Vds, double kbT, double Ecutoff_offset_from_Emax,
00046            std::vector<double>& resultingCurrent, bool bUseAnasazi);
00047 
00048   private:
00049     double f0(double x) const;
00050 
00051     bool doMatrixDiag_Anasazi(double Vds, std::vector<double>& Ec, double Ecutoff,
00052           std::vector<double>& evals,
00053           Teuchos::RCP<Epetra_MultiVector>& evecs);
00054     bool doMatrixDiag_tql2(double Vds, std::vector<double>& Ec, double Ecutoff,
00055          std::vector<double>& evals, 
00056          std::vector<double>& evecs);
00057     int tql2(int n, int max_iter, std::vector<double>& d, std::vector<double>& e, 
00058        std::vector<double>& z, int& ierr);
00059     void sortTql2PartialResults(int n, std::vector<double>& d, std::vector<double>& z); 
00060 
00061 
00062     // y2 must be passed by reference since its values are changed in the routine
00063     void prepSplineInterp(const std::vector<double>& x, const std::vector<double>& y,  
00064           std::vector<double>& y2, const int& n); 
00065 
00066     // klo and khi must be passed by reference since their values are changed in the routine
00067     double execSplineInterp(const std::vector<double>& xa, const std::vector<double>& ya, 
00068           const std::vector<double>& y2a, const int& n, const double& x); 
00069    
00070   private:
00071     Teuchos::RCP<const Epetra_Comm> Comm;
00072     Teuchos::RCP<Epetra_Map> Map;
00073     Teuchos::RCP<std::vector<double> > EcValues;
00074     
00075     double ptSpacing, effMass, t0;
00076     bool bNeumannBC;
00077     int nGFPts; 
00078     
00079     std::vector<double> matlabEvals; 
00080   };
00081 
00082 }
00083 
00084 #endif

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