| 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 |
// Finite Element Problem Class |
| 11 |
|
| 12 |
#ifndef _FINITEELEMENTPROBLEM_H |
| 13 |
#define _FINITEELEMENTPROBLEM_H |
| 14 |
|
| 15 |
// Flag to tell the evaluate routine what objects to fill |
| 16 |
enum FillType {F_ONLY, MATRIX_ONLY, ALL}; |
| 17 |
|
| 18 |
// Finite Element Problem Class |
| 19 |
class FiniteElementProblem { |
| 20 |
|
| 21 |
public: |
| 22 |
|
| 23 |
// Constructor |
| 24 |
FiniteElementProblem() {} |
| 25 |
|
| 26 |
// Destructor |
| 27 |
virtual ~FiniteElementProblem() {} |
| 28 |
|
| 29 |
// Evaluates the function (F) and/or the Jacobian using the solution |
| 30 |
// values in solnVector. |
| 31 |
virtual bool evaluate(FillType f, const Epetra_Vector *solnVector, |
| 32 |
Epetra_Vector *rhsVector, |
| 33 |
Epetra_RowMatrix *matrix, |
| 34 |
double jac_coeff = 1.0, |
| 35 |
double mass_coeff = 0.0) = 0; |
| 36 |
|
| 37 |
// Return a reference to the Epetra_Vector with the initial guess |
| 38 |
// that is generated by the FiniteElementProblem class. |
| 39 |
virtual Epetra_Vector& getSolution() = 0; |
| 40 |
|
| 41 |
// Return a reference to the Epetra_Vector with the Jacobian |
| 42 |
// that is generated by the FiniteElementProblem class. |
| 43 |
virtual Epetra_CrsMatrix& getJacobian() = 0; |
| 44 |
|
| 45 |
// Set a bifurcation parameter in the application physics |
| 46 |
virtual bool setParameter(std::string label, double value) = 0; |
| 47 |
|
| 48 |
}; |
| 49 |
#endif |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|