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

Albany_DataTypes.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_DATATYPES
00008 #define PHAL_DATATYPES
00009 
00011 
00012 // Include all of our AD types
00013 #include "Sacado_MathFunctions.hpp"
00014 #include "Stokhos_Sacado_MathFunctions.hpp"
00015 #include "Sacado_ELRFad_DFad.hpp"
00016 #include "Sacado_ELRCacheFad_DFad.hpp"
00017 #include "Sacado_Fad_DFad.hpp"
00018 #include "Sacado_ELRFad_SLFad.hpp"
00019 #include "Sacado_CacheFad_DFad.hpp"
00020 #include "Sacado_PCE_OrthogPoly.hpp"
00021 #include "Sacado_ETV_Vector.hpp"
00022 
00023 // Typedef AD types to standard names
00024 typedef double RealType;
00025 #ifdef ALBANY_FAST_FELIX
00026   // Code templated on data type need to know if FadType and TanFadType
00027   // are the same or different typdefs
00028 #define ALBANY_FADTYPE_NOTEQUAL_TANFADTYPE
00029   typedef Sacado::ELRFad::SLFad<double,16> FadType;
00030 #else
00031   typedef Sacado::ELRFad::DFad<double> FadType;
00032 #endif
00033 typedef Sacado::ELRFad::DFad<double> TanFadType;
00034 typedef Stokhos::StandardStorage<int,double> StorageType;
00035 typedef Sacado::PCE::OrthogPoly<double,StorageType> SGType;
00036 typedef Sacado::Fad::DFad<SGType> SGFadType;
00037 typedef Sacado::ETV::Vector<double,StorageType> MPType;
00038 typedef Sacado::Fad::DFad<MPType> MPFadType;
00039 
00040 
00041 // Include ScalarParameterLibrary to specialize its traits
00042 #include "Sacado_ScalarParameterLibrary.hpp"
00043 #include "Sacado_ScalarParameterVector.hpp"
00044 
00045 // ******************************************************************
00046 // Definition of Sacado::ParameterLibrary traits
00047 // ******************************************************************
00048 struct SPL_Traits {
00049   template <class T> struct apply {
00050     typedef typename T::ScalarT type;
00051   };
00052 };
00053 
00054 // Synonym for the ScalarParameterLibrary/Vector on our traits
00055 typedef Sacado::ScalarParameterLibrary<SPL_Traits> ParamLib;
00056 typedef Sacado::ScalarParameterVector<SPL_Traits> ParamVec;
00057 
00058 namespace Albany {
00059 
00060   // Function to get the underlying value out of a scalar type
00061   template <typename T>
00062   typename Sacado::ScalarType<T>::type
00063   ADValue(const T& x) { return Sacado::ScalarValue<T>::eval(x); }
00064 
00065 }
00066 
00067 #endif

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