Debian Codegraph @

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

raw
1 // @HEADER
2 // *****************************************************************************
3 // NOX: An Object-Oriented Nonlinear Solver Package
4 //
5 // Copyright 2002 NTESS and the NOX 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 "Epetra_Operator.h"
21 #include "Epetra_RowMatrix.h"
22 #include "NOX_Epetra_Interface_Required.H" // base class
23 #include "NOX_Epetra_Interface_Jacobian.H" // base class
24 #include "NOX_Epetra_Interface_Preconditioner.H" // base class
25
26 // ---------- Forward Declarations ----------
27 class FiniteElementProblem;
28
29 class Problem_Interface : public NOX::Epetra::Interface::Required,
30 public NOX::Epetra::Interface::Jacobian,
31 public NOX::Epetra::Interface::Preconditioner
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& FVec, FillType flag = Residual);
39
40 //! Compute an explicit Jacobian
41 bool computeJacobian(const Epetra_Vector& x, Epetra_Operator& Jac);
42
43 //! Computes a user supplied preconditioner based on input vector x. Returns true if computation was successful.
44 bool computePreconditioner(const Epetra_Vector& x, Epetra_Operator& M,
45 Teuchos::ParameterList* precParams = 0);
46
47 //! Application Operator: Object that points to the user's evaluation routines.
48 /*! This is used to point to the actual routines and to store
49 * auxiliary data required by the user's application for function/Jacobian
50 * evaluations that NOX does not need to know about. This is type of
51 * passdown class design by the application code.
52 */
53 FiniteElementProblem& problem;
54 };
55
56 #endif
57