| 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 |
#ifndef LOCA_INTERFACE_H |
| 11 |
#define LOCA_INTERFACE_H |
| 12 |
|
| 13 |
// Trilinos headers |
| 14 |
#include <Epetra_Vector.h> |
| 15 |
#include <LOCA_Epetra.H> |
| 16 |
|
| 17 |
// ParaCont headers |
| 18 |
#include "ProblemLOCAPrototype.H" |
| 19 |
#include "ContinuationManager.H" |
| 20 |
|
| 21 |
class LOCAInterface : |
| 22 |
// public LOCA::Epetra::Interface::Required, |
| 23 |
public LOCA::Epetra::Interface::TimeDependent, |
| 24 |
public NOX::Epetra::Interface::Jacobian { |
| 25 |
|
| 26 |
public: |
| 27 |
|
| 28 |
// Constructor |
| 29 |
LOCAInterface( Teuchos::RCP <ProblemLOCAPrototype> & aProblem , |
| 30 |
Teuchos::RCP <ContinuationManager> aContinuationManager); |
| 31 |
|
| 32 |
// Destructor |
| 33 |
~LOCAInterface(); |
| 34 |
|
| 35 |
// Compute and return F |
| 36 |
bool computeF(const Epetra_Vector& x, Epetra_Vector& f, |
| 37 |
const NOX::Epetra::Interface::Required::FillType F); |
| 38 |
|
| 39 |
// Compute an explicit Jacobian |
| 40 |
bool computeJacobian(const Epetra_Vector& x, Epetra_Operator& Jac); |
| 41 |
|
| 42 |
// Set a parameter in the user's code. |
| 43 |
void setParameters(const LOCA::ParameterVector& params); |
| 44 |
|
| 45 |
// Print the solution |
| 46 |
void printSolution (const Epetra_Vector &x, const double conParam); |
| 47 |
|
| 48 |
// Compute the Shifted matrix needed for linear stability |
| 49 |
virtual bool computeShiftedMatrix (double alpha, double beta, |
| 50 |
const Epetra_Vector &x, Epetra_Operator &A); |
| 51 |
|
| 52 |
virtual void setXdot(const Epetra_Vector& xdot, const double time); |
| 53 |
|
| 54 |
private: |
| 55 |
|
| 56 |
// The continuation manager |
| 57 |
Teuchos::RCP <ContinuationManager> continuationManager; |
| 58 |
|
| 59 |
// The Problem |
| 60 |
Teuchos::RCP <ProblemLOCAPrototype> problem; |
| 61 |
|
| 62 |
double t; // time, for non-autonomous problems |
| 63 |
|
| 64 |
}; |
| 65 |
|
| 66 |
#endif |