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

Albany_ModelEvaluator.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_MODELEVALUATOR_HPP
00008 #define ALBANY_MODELEVALUATOR_HPP
00009 
00010 #include "Teuchos_RCP.hpp"
00011 #include "Teuchos_Array.hpp"
00012 #include "Teuchos_TimeMonitor.hpp"
00013 
00014 #include "Albany_Application.hpp"
00015 #include "EpetraExt_ModelEvaluator.h"
00016 #include "Epetra_LocalMap.h"
00017 
00018 namespace Albany {
00019 
00020   class ModelEvaluator : public EpetraExt::ModelEvaluator {
00021   public:
00022 
00023     // Constructor
00024     ModelEvaluator(
00025        const Teuchos::RCP<Albany::Application>& app,
00026        const Teuchos::RCP<Teuchos::ParameterList>& appParams);
00027 
00028     virtual ~ModelEvaluator();
00029 
00032 
00034     Teuchos::RCP<const Epetra_Map> get_x_map() const;
00035 
00037     Teuchos::RCP<const Epetra_Map> get_f_map() const;
00038 
00040     Teuchos::RCP<const Epetra_Map> get_p_map(int l) const;
00041 
00043     Teuchos::RCP<const Epetra_Map> get_g_map(int j) const;
00044 
00046     Teuchos::RCP<const Teuchos::Array<std::string> > 
00047     get_p_names(int l) const;
00048 
00050     Teuchos::RCP<const Epetra_Vector> get_x_init() const;
00051     Teuchos::RCP<const Epetra_Vector> get_x_dot_init() const;
00052     Teuchos::RCP<const Epetra_Vector> get_x_dotdot_init() const;
00053 
00055     Teuchos::RCP<const Epetra_Vector> get_p_init(int l) const;
00056 
00058     Teuchos::RCP<Epetra_Operator> create_W() const;
00059 
00061     Teuchos::RCP<EpetraExt::ModelEvaluator::Preconditioner> create_WPrec() const;
00062 
00064     Teuchos::RCP<Epetra_Operator> create_DgDx_op(int j) const;
00065 
00067     Teuchos::RCP<Epetra_Operator> create_DgDx_dot_op(int j) const;
00068     Teuchos::RCP<Epetra_Operator> create_DgDx_dotdot_op(int j) const;
00069     
00071     InArgs createInArgs() const;
00072 
00074     OutArgs createOutArgs() const;
00075 
00077     void evalModel(const InArgs& inArgs, const OutArgs& outArgs) const;
00078 
00080 
00081   protected:
00082 
00084     Teuchos::RCP<Albany::Application> app;
00085 
00087     Teuchos::Array< Teuchos::RCP< Teuchos::Array<std::string> > > param_names;
00088 
00090     mutable Teuchos::Array<ParamVec> sacado_param_vec;
00091 
00093     Teuchos::Array< Teuchos::RCP<Epetra_LocalMap> > epetra_param_map;
00094 
00096     Teuchos::Array< Teuchos::RCP<Epetra_Vector> > epetra_param_vec;
00097 
00099     bool supplies_prec;
00100 
00102     mutable Teuchos::Array< Teuchos::Array<SGType> > p_sg_vals;
00103 
00105     mutable Teuchos::Array< Teuchos::Array<MPType> > p_mp_vals;
00106 
00108     mutable Teuchos::RCP<Epetra_CrsMatrix> Extra_W_crs;
00109 
00110     Teuchos::RCP<Teuchos::Time> timer;
00111   };
00112 
00113 }
00114 
00115 #endif // ALBANY_MODELEVALUATOR_HPP

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