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_RESPONSE_FACTORY_HPP 00008 #define ALBANY_RESPONSE_FACTORY_HPP 00009 00010 #include "Albany_AbstractResponseFunction.hpp" 00011 #include "Albany_Application.hpp" 00012 #include "Albany_AbstractProblem.hpp" 00013 #include "Albany_StateManager.hpp" 00014 #include "Albany_StateInfoStruct.hpp" // contains MeshSpecsStuct 00015 #include "Teuchos_RCP.hpp" 00016 #include "Teuchos_Array.hpp" 00017 #include "Teuchos_ParameterList.hpp" 00018 00019 namespace Albany { 00020 00024 class ResponseFactory { 00025 public: 00026 00028 ResponseFactory( 00029 const Teuchos::RCP<Albany::Application>& application, 00030 const Teuchos::RCP<Albany::AbstractProblem>& problem, 00031 const Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct> >& ms, 00032 const Teuchos::RCP<Albany::StateManager>& state_manager) : 00033 app(application), prob(problem), meshSpecs(ms), stateMgr(state_manager) 00034 {}; 00035 00037 virtual ~ResponseFactory() {}; 00038 00040 virtual Teuchos::Array< Teuchos::RCP<AbstractResponseFunction> > 00041 createResponseFunctions(Teuchos::ParameterList& responsesList) const; 00042 00043 00044 private: 00045 00047 ResponseFactory(const ResponseFactory&); 00048 00050 ResponseFactory& operator=(const ResponseFactory&); 00051 00052 protected: 00053 00055 Teuchos::RCP<Albany::Application> app; 00056 00058 Teuchos::RCP<Albany::AbstractProblem> prob; 00059 00061 Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct> > meshSpecs; 00062 00064 Teuchos::RCP<Albany::StateManager> stateMgr; 00065 00067 void createResponseFunction( 00068 const std::string& name, 00069 Teuchos::ParameterList& responseParams, 00070 Teuchos::Array< Teuchos::RCP<AbstractResponseFunction> >& responses) const; 00071 00072 }; 00073 00074 } 00075 00076 #endif // ALBANY_SCALAR_RESPONSE_FUNCTION_HPP