Skip to content

Commit 08b9660

Browse files
committed
Remove Epetra_Operator from FSIMatrixFree
1 parent 3ca1ebd commit 08b9660

File tree

2 files changed

+2
-137
lines changed

2 files changed

+2
-137
lines changed

src/fsi/src/partitioned/nonlinear_solver/4C_fsi_nox_jacobian.cpp

Lines changed: 1 addition & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ NOX::FSI::FSIMatrixFree::FSIMatrixFree(Teuchos::ParameterList& printParams,
5252
}
5353
}
5454

55-
Epetra_Operator& NOX::FSI::FSIMatrixFree::epetra_operator() { return *this; }
55+
Epetra_Operator& NOX::FSI::FSIMatrixFree::epetra_operator() { FOUR_C_THROW("Not implemented"); }
5656

5757
void NOX::FSI::FSIMatrixFree::zero() { FOUR_C_THROW("Not implemented"); }
5858

@@ -133,7 +133,6 @@ void NOX::FSI::FSIMatrixFree::multiply(bool TransA, const Core::LinAlg::MultiVec
133133
<< "ERROR: FSIMatrixFree::multiply() - Transpose is unavailable in Matrix-Free mode!"
134134
<< std::endl;
135135
throw "NOX Error";
136-
return;
137136
}
138137

139138
// Calculate the matrix-vector product:
@@ -193,77 +192,6 @@ void NOX::FSI::FSIMatrixFree::multiply(bool TransA, const Core::LinAlg::MultiVec
193192
// scale back
194193
// nevY.update(xscale, perturbY, 0.0);
195194
nevY.update(1., perturbY, 0.0);
196-
197-
return;
198-
}
199-
200-
int NOX::FSI::FSIMatrixFree::SetUseTranspose(bool UseTranspose)
201-
{
202-
FOUR_C_THROW("Not implemented");
203-
return -1;
204-
}
205-
206-
207-
int NOX::FSI::FSIMatrixFree::Apply(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const
208-
{
209-
FOUR_C_THROW("Not implemented");
210-
return -1;
211-
}
212-
213-
214-
int NOX::FSI::FSIMatrixFree::ApplyInverse(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const
215-
{
216-
FOUR_C_THROW("Not implemented");
217-
return -1;
218-
}
219-
220-
221-
double NOX::FSI::FSIMatrixFree::NormInf() const
222-
{
223-
FOUR_C_THROW("Not implemented");
224-
return 1.0;
225-
}
226-
227-
228-
const char* NOX::FSI::FSIMatrixFree::Label() const
229-
{
230-
FOUR_C_THROW("Not implemented");
231-
return label.c_str();
232-
}
233-
234-
235-
bool NOX::FSI::FSIMatrixFree::UseTranspose() const
236-
{
237-
FOUR_C_THROW("Not implemented");
238-
return false;
239-
}
240-
241-
242-
bool NOX::FSI::FSIMatrixFree::HasNormInf() const
243-
{
244-
FOUR_C_THROW("Not implemented");
245-
return false;
246-
}
247-
248-
249-
const Epetra_Comm& NOX::FSI::FSIMatrixFree::Comm() const
250-
{
251-
FOUR_C_THROW("Not implemented");
252-
return Core::Communication::as_epetra_comm(currentX.get_linalg_vector().get_map().get_comm());
253-
}
254-
255-
256-
const Epetra_Map& NOX::FSI::FSIMatrixFree::OperatorDomainMap() const
257-
{
258-
FOUR_C_THROW("Not implemented");
259-
return *epetraMap;
260-
}
261-
262-
263-
const Epetra_Map& NOX::FSI::FSIMatrixFree::OperatorRangeMap() const
264-
{
265-
FOUR_C_THROW("Not implemented");
266-
return *epetraMap;
267195
}
268196

269197

src/fsi/src/partitioned/nonlinear_solver/4C_fsi_nox_jacobian.hpp

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121

2222
#include <memory>
2323

24-
// Forward Declarations
25-
class Map;
26-
2724
FOUR_C_NAMESPACE_OPEN
2825

2926
namespace NOX
@@ -37,8 +34,7 @@ namespace NOX
3734
{
3835
/// Matrix Free Newton Krylov based on an approximation of the residuum derivatives
3936
class FSIMatrixFree : public Core::LinAlg::SparseOperator,
40-
public virtual NOX::Nln::Interface::JacobianBase,
41-
public Epetra_Operator
37+
public virtual NOX::Nln::Interface::JacobianBase
4238
{
4339
public:
4440
/*! \brief Constructor
@@ -93,65 +89,6 @@ namespace NOX
9389
void multiply(bool TransA, const Core::LinAlg::MultiVector<double>& X,
9490
Core::LinAlg::MultiVector<double>& Y) const override;
9591

96-
97-
// Methods of Epetra_Operator interface
98-
//! If set true, transpose of this operator will be applied.
99-
/*! This flag allows the transpose of the given operator to be used implicitly. Setting this
100-
flag affects only the Apply() and ApplyInverse() methods. If the implementation of this
101-
interface does not support transpose use, this method should return a value of -1. \param
102-
UseTranspose -If true, multiply by the transpose of operator, otherwise just use operator.
103-
104-
\return Integer error code, set to 0 if successful. Set to -1 if this implementation does
105-
not support transpose.
106-
*/
107-
int SetUseTranspose(bool UseTranspose) override;
108-
109-
//! Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.
110-
/*!
111-
\param X - A Epetra_MultiVector of dimension NumVectors to multiply with matrix.
112-
\param Y - A Epetra_MultiVector of dimension NumVectors containing result.
113-
114-
\return Integer error code, set to 0 if successful.
115-
*/
116-
int Apply(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const override;
117-
118-
//! Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y.
119-
/*!
120-
\param X - A Epetra_MultiVector of dimension NumVectors to solve for.
121-
\param Y -A Epetra_MultiVector of dimension NumVectors containing result.
122-
123-
\return Integer error code, set to 0 if successful.
124-
125-
\warning In order to work with an iterative solver, any implementation of this method must
126-
support the case where X and Y are the same object.
127-
*/
128-
int ApplyInverse(const Epetra_MultiVector& X, Epetra_MultiVector& Y) const override;
129-
130-
//! Returns the infinity norm of the global matrix.
131-
/* Returns the quantity \f$ \| A \|_\infty\f$ such that
132-
\f[\| A \|_\infty = \max_{1\lei\lem} \sum_{j=1}^n |a_{ij}| \f].
133-
134-
\warning This method must not be called unless HasNormInf() returns true. */
135-
double NormInf() const override;
136-
137-
//! Returns a character string describing the operator
138-
const char* Label() const override;
139-
140-
//! Returns the current UseTranspose setting.
141-
bool UseTranspose() const override;
142-
143-
//! Returns true if the \e this object can provide an approximate Inf-norm, false otherwise.
144-
bool HasNormInf() const override;
145-
146-
//! Returns a reference to the Epetra_Comm communicator associated with this operator.
147-
const Epetra_Comm& Comm() const override;
148-
149-
//! Returns the Core::LinAlg::Map object associated with the domain of this matrix operator.
150-
const Epetra_Map& OperatorDomainMap() const override;
151-
152-
//! Returns the Core::LinAlg::Map object associated with the range of this matrix operator.
153-
const Epetra_Map& OperatorRangeMap() const override;
154-
15592
//! Compute Jacobian given the specified input vector, x. Returns true if computation was
15693
//! successful.
15794
bool compute_jacobian(

0 commit comments

Comments
 (0)