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

Albany_DummyParameterAccessor.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 ALBANY_DUMMYPARAMETERACCESSOR_H
00008 #define ALBANY_DUMMYPARAMETERACCESSOR_H
00009 
00010 #include <string>
00011 #include "PHAL_AlbanyTraits.hpp"
00012 #include "Sacado_ParameterAccessor.hpp"
00013 
00014 // This dummy function allows us to register parameters for
00015 // all evaluation types. This is needed for sensitivities with
00016 // respect to shapeParams, where the parameters are only 
00017 // accessed through the Residual fill type (getValue method in
00018 // Albany_Application). These dummy accessors are created for
00019 // other evaluation types, so that Sacado ParamLib has somewhere
00020 // to assign them. But, they are never used.
00021 
00022 namespace Albany {
00023 
00024 template<typename EvalT, typename Traits>
00025 class DummyParameterAccessor :
00026      public Sacado::ParameterAccessor<EvalT, Traits> {
00027 
00028    public:
00029      DummyParameterAccessor() { dummy = 0.0;};
00030      typename EvalT::ScalarT& getValue(const std::string &name)
00031      { return dummy;};
00032    private:
00033      typename EvalT::ScalarT dummy;
00034   };
00035 }
00036 #endif

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