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

AAdapt_AdaptiveModelFactory.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 #ifndef AADAPT_ADAPTIVEMODELFACTORY_HPP
00007 #define AADAPT_ADAPTIVEMODELFACTORY_HPP
00008 
00009 #include "EpetraExt_ModelEvaluator.h"
00010 #include "Thyra_EpetraModelEvaluator.hpp"
00011 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
00012 
00013 #include "Teuchos_RCP.hpp"
00014 #include "Teuchos_ParameterList.hpp"
00015 
00016 class Epetra_MultiVector;
00017 class Epetra_Map;
00018 
00019 namespace AAdapt {
00020 
00021 class AdaptiveModelFactory {
00022   public:
00023     AdaptiveModelFactory(
00024       const Teuchos::RCP<Teuchos::ParameterList>& parentParams);
00025 
00026     ~AdaptiveModelFactory();
00027 
00028     Teuchos::RCP<Thyra::ModelEvaluator<double> > create(const Teuchos::RCP<EpetraExt::ModelEvaluator>& epetraModel,
00029          const Teuchos::RCP<Thyra::LinearOpWithSolveFactoryBase<double> > &W_factory);
00030 
00031     // Returns a weak pointer to the Thyra model
00032     Teuchos::RCP<Thyra::ModelEvaluator<double> > 
00033        getThyraModel(){ return thyra_model; }
00034 
00035     void releaseModel(){ thyra_model = Teuchos::null; }
00036 
00037   private:
00038 
00039     Teuchos::RCP<Teuchos::ParameterList> params;
00040 
00041     Teuchos::RCP<Teuchos::ParameterList> 
00042     extractAdaptiveModelParams(const Teuchos::RCP<Teuchos::ParameterList>& source);
00043 
00044     bool useAdaptiveModel() const;
00045 
00047     Teuchos::RCP<Thyra::ModelEvaluator<double> > thyra_model;
00048 
00049     // Disallow copy & assignment
00050     AdaptiveModelFactory(const AdaptiveModelFactory&);
00051     AdaptiveModelFactory& operator=(const AdaptiveModelFactory&);
00052 };
00053 
00054 } // namespace AAdapt
00055 
00056 #endif /* ALBANY_ADAPTIVEMODELFACTORY_HPP */

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