| 1 |
// @HEADER |
| 2 |
// ***************************************************************************** |
| 3 |
// Trilinos: An Object-Oriented Solver Framework |
| 4 |
// |
| 5 |
// Copyright 2001-2024 NTESS and the Trilinos contributors. |
| 6 |
// SPDX-License-Identifier: BSD-3-Clause |
| 7 |
// ***************************************************************************** |
| 8 |
// @HEADER |
| 9 |
|
| 10 |
/* ******************************************************************** */ |
| 11 |
/* See the file COPYRIGHT for a complete copyright notice, contact */ |
| 12 |
/* person and disclaimer. */ |
| 13 |
/* ******************************************************************** */ |
| 14 |
/*! |
| 15 |
* \file nlnml_prepostoperator.H |
| 16 |
* |
| 17 |
* \class NLNML_PrePostOperator |
| 18 |
* |
| 19 |
* \brief class NLNML_PrePostOperator used by the nonlinear preconditioner |
| 20 |
* |
| 21 |
* \date Last update do Doxygen: 31-Mar-05 |
| 22 |
* |
| 23 |
*/ |
| 24 |
#include "ml_common.h" |
| 25 |
#include "ml_include.h" |
| 26 |
#include "TrilinosCouplings_config.h" |
| 27 |
|
| 28 |
#if defined(HAVE_ML_NOX) && defined(HAVE_ML_EPETRA) && defined(HAVE_ML_AZTECOO) && defined(HAVE_ML_TEUCHOS) && defined(HAVE_ML_IFPACK) && defined(HAVE_ML_AMESOS) && defined(HAVE_ML_EPETRAEXT) |
| 29 |
#ifndef NLNML_PREPOSTOPERATOR_H |
| 30 |
#define NLNML_PREPOSTOPERATOR_H |
| 31 |
|
| 32 |
#include <iostream> |
| 33 |
|
| 34 |
// Epetra headers |
| 35 |
#include "Epetra_Vector.h" |
| 36 |
#include "Epetra_Operator.h" |
| 37 |
#include "Epetra_RowMatrix.h" |
| 38 |
#include "Epetra_CrsMatrix.h" |
| 39 |
#include "Epetra_CrsGraph.h" |
| 40 |
#include "Epetra_Comm.h" |
| 41 |
#include "Epetra_SerialComm.h" |
| 42 |
#ifdef ML_MPI |
| 43 |
#include "Epetra_MpiComm.h" |
| 44 |
#endif |
| 45 |
#include "Epetra_Map.h" |
| 46 |
#include "Epetra_Export.h" |
| 47 |
#include "Epetra_Import.h" |
| 48 |
|
| 49 |
// NOX headers |
| 50 |
#include "NOX_Abstract_PrePostOperator.H" |
| 51 |
#include "NOX_Epetra_Group.H" |
| 52 |
#include "NOX_Solver_Generic.H" |
| 53 |
|
| 54 |
// own headers |
| 55 |
#include "nlnml_finelevelnoxinterface.H" |
| 56 |
#include "nlnml_coarselevelnoxinterface.H" |
| 57 |
|
| 58 |
// forward declarations |
| 59 |
class Epetra_CrsMatrix; |
| 60 |
|
| 61 |
using namespace Teuchos; |
| 62 |
namespace NLNML |
| 63 |
{ |
| 64 |
|
| 65 |
|
| 66 |
class NLNML_PrePostOperator : public virtual NOX::Abstract::PrePostOperator |
| 67 |
{ |
| 68 |
public: |
| 69 |
|
| 70 |
NLNML_PrePostOperator( |
| 71 |
RefCountPtr<NLNML::NLNML_CoarseLevelNoxInterface> coarseinterface, |
| 72 |
RefCountPtr<NLNML::NLNML_FineLevelNoxInterface> finterface); |
| 73 |
|
| 74 |
NLNML_PrePostOperator(NLNML_PrePostOperator& old); |
| 75 |
NLNML_PrePostOperator(const NLNML::NLNML_PrePostOperator& old); |
| 76 |
|
| 77 |
virtual ~NLNML_PrePostOperator(); |
| 78 |
|
| 79 |
void runPreSolve(const NOX::Solver::Generic& solver); |
| 80 |
|
| 81 |
const std::string& getType() const { return type_; } |
| 82 |
|
| 83 |
private: |
| 84 |
|
| 85 |
NLNML_PrePostOperator operator = (const NLNML_PrePostOperator& old); |
| 86 |
|
| 87 |
protected: |
| 88 |
|
| 89 |
std::string type_; |
| 90 |
RefCountPtr<NLNML::NLNML_FineLevelNoxInterface> fineinterface_; |
| 91 |
RefCountPtr<NLNML::NLNML_CoarseLevelNoxInterface> coarseinterface_; |
| 92 |
|
| 93 |
}; // class NLNML_PREPOSTOPERATOR_H |
| 94 |
} // namespace NLNML |
| 95 |
#endif |
| 96 |
#endif |