// @HEADER // ***************************************************************************** // NOX: An Object-Oriented Nonlinear Solver Package // // Copyright 2002 NTESS and the NOX contributors. // SPDX-License-Identifier: BSD-3-Clause // ***************************************************************************** // @HEADER // Finite Element Problem Class /* Provides function (F) and Jacobian evaluations for the following equation * via a 1D linear finite element discretization with Epetra objects. * * d2u * --- - k * u**2 = 0 * dx2 * * subject to @ x=0, u=1 */ #ifndef _NOX_TEST_EPETRA_MULTIPHYSICS_BURGERS_H #define _NOX_TEST_EPETRA_MULTIPHYSICS_BURGERS_H #include "GenericEpetraProblem.H" // Forward Declarations //class Epetra_Comm; //class Epetra_Map; //class Epetra_Vector; //class Epetra_Import; //class Epetra_CrsGraph; //class Epetra_CrsMatrix; // Finite Element Problem Class class Burgers : public GenericEpetraProblem { public: // Constructor Burgers(Epetra_Comm& Comm, int NumGlobalNodes, std::string name); // Destructor ~Burgers(); // Reset problem for next parameter (time) step. // For now, this simply updates oldsoln with the given Epetra_Vector void reset(const Epetra_Vector& x); void reset(); // Empty reset method needed here to prevent hiding base // class method. // Set initial condition for solution vector bool initializeSoln(); // Evaluates the function (F) and/or the Jacobian using the solution // values in solnVector. bool evaluate( NOX::Epetra::Interface::Required::FillType fill, const Epetra_Vector *solnVector, Epetra_Vector *rhsVector); // Return a reference to the Epetra_Vector with the exact analytic solution Epetra_Vector& getExactSoln(double time); // Return a reference to the Epetra_Vector with the initial guess // that is generated by the FiniteElementProblem class. Teuchos::RCP getSolution(); // Accesor function for time step double getdt() const { return dt; } // Accesor function for setting time step void setdt( double dt_ ) { dt = dt_;} // Return a reference to the Epetra_Vector with the old solution Epetra_Vector& getOldSoln(); protected: // inserts the global column indices into the Graph void generateGraph(); protected: double xFactor; double viscosity; double xmin; double xmax; double dx; double dt; Epetra_Import *ColumnToOverlapImporter; Epetra_Vector *oldSolution; Epetra_Vector *rhs; Epetra_Vector *exactSolution; }; #endif