// @HEADER // ***************************************************************************** // Piro: Strategy package for embedded analysis capabilitites // // Copyright 2010 NTESS and the Piro contributors. // SPDX-License-Identifier: BSD-3-Clause // ***************************************************************************** // @HEADER #ifndef PIRO_EPETRA_LOCAADAPTIVESOLVER_H #define PIRO_EPETRA_LOCAADAPTIVESOLVER_H #include #include "LOCA.H" #include "LOCA_Epetra.H" #include "Epetra_Vector.h" #include "Epetra_LocalMap.h" #include "LOCA_Epetra_ModelEvaluatorInterface.H" #include "LOCA_SaveEigenData_AbstractStrategy.H" #include "LOCA_Epetra_AdaptiveStepper.H" #include #include #include #ifdef HAVE_MPI #include "Epetra_MpiComm.h" #else #include "Epetra_SerialComm.h" #endif #include "EpetraExt_ModelEvaluator.h" namespace Piro { namespace Epetra { /** \ingroup Piro_Epetra_solver_grp */ class LOCAAdaptiveSolver : public EpetraExt::ModelEvaluator { public: /** \name Constructors/initializers */ //@{ LOCAAdaptiveSolver(const Teuchos::RCP& piroParams, const Teuchos::RCP& model, const Teuchos::RCP& solnManager, Teuchos::RCP observer = Teuchos::null, Teuchos::RCP saveEigData = Teuchos::null ); //@} ~LOCAAdaptiveSolver(); /** \name Overridden from EpetraExt::ModelEvaluator . */ //@{ Teuchos::RCP get_g_map(int j) const; /** \brief . */ Teuchos::RCP get_p_init(int l) const; /** \brief . */ // Teuchos::RCP create_W() const; /** \brief . */ EpetraExt::ModelEvaluator::InArgs createInArgs() const; /** \brief . */ EpetraExt::ModelEvaluator::OutArgs createOutArgs() const; /** \brief . */ void evalModel( const InArgs& inArgs, const OutArgs& outArgs ) const; private: /** \brief . */ Teuchos::RCP get_x_map() const; /** \brief . */ Teuchos::RCP get_f_map() const; /** \brief . */ Teuchos::RCP get_x_init() const; /** \brief . */ Teuchos::RCP get_p_map(int l) const; /** \brief . */ void setProblemParamDefaults(Teuchos::ParameterList* piroParams_); /** \brief . */ void setSolverParamDefaults(Teuchos::ParameterList* piroParams_); //@} private: //These are set in the constructor and used in evalModel Teuchos::RCP piroParams; Teuchos::RCP model; Teuchos::RCP observer; Teuchos::RCP saveEigData; Teuchos::RCP solnManager; NOX::Utils utils; Teuchos::RCP stepper; Teuchos::RCP interface; Teuchos::RCP pVector; Teuchos::RCP globalData; int num_p; int num_g; }; } } #endif