// @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_VELOCITYVERLETSOLVER_H #define PIRO_EPETRA_VELOCITYVERLETSOLVER_H #include #include "Epetra_Vector.h" #include "EpetraExt_ModelEvaluator.h" #include "Teuchos_ParameterList.hpp" #include "Teuchos_RCP.hpp" #include "NOX_Epetra_Observer.H" namespace Piro { namespace Epetra { /** \ingroup Piro_Epetra_solver_grp */ class VelocityVerletSolver : public EpetraExt::ModelEvaluator { typedef double Scalar; public: /** \name Constructors/initializers */ //@{ /** \brief Takes the number of elements in the discretization . */ VelocityVerletSolver(Teuchos::RCP appParams, Teuchos::RCP model, Teuchos::RCP observer = Teuchos::null ); //@} ~VelocityVerletSolver(); /** \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* appParams_); /** \brief . */ void setSolverParamDefaults(Teuchos::ParameterList* appParams_); /** \brief . */ Teuchos::RCP getValidVelocityVerletParameters() const; //@} private: //These are set in the constructor and used in evalModel mutable Teuchos::RCP appParams; Teuchos::RCP model; Teuchos::RCP observer; Teuchos::RCP out; Teuchos::EVerbosityLevel solnVerbLevel; int num_p; int num_g; int numTimeSteps; double t_init, t_final, delta_t; }; } } #endif