Advanced Multi-Physics (AMP)
On-Line Documentation
TrilinosMatrixShellOperator.h
Go to the documentation of this file.
1#ifndef included_AMP_TrilinosMatrixShellOperator
2#define included_AMP_TrilinosMatrixShellOperator
3
4#include "AMP/operators/LinearOperator.h"
5
7#include "ml_include.h"
9
10#include <functional>
11
12
13namespace AMP::Operator {
14
15
17{
18public:
19 explicit TrilinosMatrixShellOperator( std::shared_ptr<const OperatorParameters> params );
20
22
23 void setOperator( std::shared_ptr<Operator> op );
24
25 void setNodalDofMap( std::shared_ptr<AMP::Discretization::DOFManager> dofMap );
26
38
39 void reset( std::shared_ptr<const OperatorParameters> params ) override;
40
41 std::shared_ptr<AMP::LinearAlgebra::Variable> getOutputVariable() const override;
42
43 std::shared_ptr<AMP::LinearAlgebra::Variable> getInputVariable() const override;
44
45 static int
46 matVec( ML_Operator *data, int in_length, double in[], int out_length, double out[] );
47
48 static int getRow( ML_Operator *data,
50 int requested_rows[],
52 int columns[],
53 double values[],
54 int row_lengths[] );
55
57 std::function<void(
58 void *object, int row, std::vector<size_t> &cols, std::vector<double> &values )> );
59
60 void getColumn( int column, std::vector<size_t> &rows, std::vector<double> &values );
61
62 size_t getMatrixSize();
63
64private:
65 std::shared_ptr<AMP::Discretization::DOFManager> d_nodalDofMap;
66
67 std::shared_ptr<Operator> d_operator;
68
69 std::function<void( void *, int, std::vector<size_t> &, std::vector<double> & )> d_getRow;
70};
71} // namespace AMP::Operator
72
73#endif
std::shared_ptr< Vector > shared_ptr
Shorthand for shared pointer to Vector.
Definition Vector.h:60
std::shared_ptr< const Vector > const_shared_ptr
Definition Vector.h:65
std::shared_ptr< AMP::Operator::Operator > shared_ptr
Definition Operator.h:29
virtual void residual(AMP::LinearAlgebra::Vector::const_shared_ptr f, AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr r) override
void reset(std::shared_ptr< const OperatorParameters > params) override
void setOperator(std::shared_ptr< Operator > op)
void getColumn(int column, std::vector< size_t > &rows, std::vector< double > &values)
std::function< void(void *, int, std::vector< size_t > &, std::vector< double > &)> d_getRow
void setGetRow(std::function< void(void *object, int row, std::vector< size_t > &cols, std::vector< double > &values)>)
static int getRow(ML_Operator *data, int N_requested_rows, int requested_rows[], int allocated_space, int columns[], double values[], int row_lengths[])
std::shared_ptr< AMP::LinearAlgebra::Variable > getOutputVariable() const override
Return the output variable.
std::shared_ptr< AMP::Discretization::DOFManager > d_nodalDofMap
static int matVec(ML_Operator *data, int in_length, double in[], int out_length, double out[])
void setNodalDofMap(std::shared_ptr< AMP::Discretization::DOFManager > dofMap)
TrilinosMatrixShellOperator(std::shared_ptr< const OperatorParameters > params)
std::shared_ptr< AMP::LinearAlgebra::Variable > getInputVariable() const override
Return the input variable.
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr f) override
#define DISABLE_WARNINGS
Re-enable warnings.
#define ENABLE_WARNINGS
Suppress all warnings.



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page