| 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 |
// ---------- Includes ---------- |
| 11 |
#include <iostream> |
| 12 |
#include "Problem_Interface.H" |
| 13 |
|
| 14 |
// ---------- User Defined Includes ---------- |
| 15 |
#include "DennisSchnabel.H" |
| 16 |
using namespace std; |
| 17 |
|
| 18 |
//----------------------------------------------------------------------------- |
| 19 |
Problem_Interface::Problem_Interface(DennisSchnabel& Problem) : |
| 20 |
problem(Problem) |
| 21 |
{ } |
| 22 |
|
| 23 |
Problem_Interface::~Problem_Interface() |
| 24 |
{ } |
| 25 |
|
| 26 |
bool Problem_Interface::computeF(const Vec& x, Vec& RHS) |
| 27 |
{ |
| 28 |
return problem.evaluate(RHS_ONLY, &x, &RHS, NULL); |
| 29 |
} |
| 30 |
|
| 31 |
bool Problem_Interface::computeJacobian(const Vec& x, Mat& Jac) |
| 32 |
{ |
| 33 |
return problem.evaluate(MATRIX_ONLY, &x, NULL, &Jac); |
| 34 |
} |
| 35 |
|
| 36 |
bool Problem_Interface::computePreconditioner(Mat& M) |
| 37 |
{ |
| 38 |
std::cout << "ERROR: Problem_Interface::computePreconditioner() - Use Explicit Jaciban only for this test problem!" << std::endl; |
| 39 |
throw; |
| 40 |
} |
| 41 |
bool Problem_Interface::preconditionVector(Vec& y) |
| 42 |
{ |
| 43 |
std::cout << "ERROR: Problem_Interface::preconditionVector() - Use Explicit Jaciban only for this test problem!" << std::endl; |
| 44 |
throw; |
| 45 |
} |
| 46 |
//----------------------------------------------------------------------------- |
| 47 |
|