Debian Codegraph @

packages/nox/examples/petsc/DS6.5.1/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 "petscksp.h"
20 #include "NOX_Petsc_Interface.H"
21
22 // ---------- Forward Declarations ----------
23 class DennisSchnabel;
24
25 class Problem_Interface : public NOX::Petsc::Interface
26 {
27 public:
28 Problem_Interface(DennisSchnabel& Problem);
29 ~Problem_Interface();
30
31 //! Compute and return RHS. Returns true if computation was successful.
32 bool computeF(const Vec& x, Vec& RHS);
33
34 //! Compute an explicit Jacobian. Returns true if computation was successful.
35 bool computeJacobian(const Vec& x, Mat& Jac);
36
37 //! Compute the matrix M that will be used as the preconditioner. Returns true if computation was successful.
38 bool computePreconditioner(Mat& M);
39
40 //! Return the action of the preconditioner on a vector. Returns true if computation was successful.
41 bool preconditionVector(Vec& y);
42
43 //! Application Operator: Object that points to the user's evaluation routines.
44 /*! This is used to point to the actual routines and to store
45 * auxiliary data required by the user's application for function/Jacobian
46 * evaluations that NOX does not need to know about. This is type of
47 * passdown class design by the application code.
48 */
49 DennisSchnabel& problem;
50 };
51
52 #endif
53