Debian Codegraph @

packages/nox/test/epetra/LOCA_TestProblems/Problem_Interface.H

raw
1 // @HEADER
2 // *****************************************************************************
3 // LOCA: Library of Continuation Algorithms Package
4 //
5 // Copyright 2001-2005 NTESS and the LOCA contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9
10 //-----------------------------------------------------------------------------
11 #ifndef Problem_Interface_H
12 #define Problem_Interface_H
13
14 // Interface to the NLS_PetraGroup to provide for
15 // residual and matrix fill routines.
16
17 // ---------- Standard Includes ----------
18 #include <iostream>
19 #include "Epetra_Vector.h"
20 #include "LOCA_Epetra.H"
21
22 // ---------- Forward Declarations ----------
23 class FiniteElementProblem;
24 namespace LOCA {
25 class ParameterVector;
26 }
27
28
29 class Problem_Interface :
30 public LOCA::Epetra::Interface::TimeDependent,
31 public NOX::Epetra::Interface::Jacobian
32 {
33 public:
34 Problem_Interface(FiniteElementProblem& Problem);
35 ~Problem_Interface();
36
37 //! Compute and return F
38 bool computeF(const Epetra_Vector& x, Epetra_Vector& F, FillType flag);
39
40 //! Compute an explicit Jacobian
41 bool computeJacobian(const Epetra_Vector& x, Epetra_Operator& Jac);
42
43 /*!
44 * \brief Call user routine for computing the shifted matrix
45 * \f$\alpha J + \beta M\f$ where \f$J\f$ is the Jacobian matrix
46 * and \f$M\f$ is the mass matrix.
47 */
48 bool computeShiftedMatrix(double alpha, double beta,
49 const Epetra_Vector& x,
50 Epetra_Operator& A);
51
52 //! Set a parameter in the user's code.
53 void setParameters(const LOCA::ParameterVector& params);
54
55 //! Application Operator: Object that points to the user's evaluation routines.
56 /*! This is used to point to the actual routines and to store
57 * auxiliary data required by the user's application for function/Jacobian
58 * evaluations that NOX does not need to know about. This is type of
59 * passdown class design by the application code.
60 */
61 FiniteElementProblem& problem;
62
63 //! Number of residual fills
64 int numFillsF;
65 };
66
67 #endif
68