Advanced Multi-Physics (AMP)
On-Line Documentation
MemorySpaceMigrationLinearOperator.h
Go to the documentation of this file.
1#ifndef included_MemorySpaceMigrationLinearOperator_H_
2#define included_MemorySpaceMigrationLinearOperator_H_
3
4#include "AMP/operators/LinearOperator.h"
5
6namespace AMP::Operator {
14{
15
16public:
19
21 explicit MemorySpaceMigrationLinearOperator( std::shared_ptr<const OperatorParameters> params );
22
25
27 std::string type() const override { return "MemorySpaceMigrationLinearOperator"; };
28
34 void reset( std::shared_ptr<const OperatorParameters> params ) override;
35
43 void apply( std::shared_ptr<const AMP::LinearAlgebra::Vector> u,
44 std::shared_ptr<AMP::LinearAlgebra::Vector> f ) override;
45
52 void residual( std::shared_ptr<const AMP::LinearAlgebra::Vector> f,
53 std::shared_ptr<const AMP::LinearAlgebra::Vector> u,
54 std::shared_ptr<AMP::LinearAlgebra::Vector> r ) override;
55
70 std::shared_ptr<OperatorParameters>
71 getParameters( const std::string &type,
72 std::shared_ptr<const AMP::LinearAlgebra::Vector> u,
73 std::shared_ptr<OperatorParameters> params = nullptr ) override;
74
81 void setDebugPrintInfoLevel( int level ) override;
82
84 std::shared_ptr<AMP::LinearAlgebra::Variable> getOutputVariable() const override;
85
87 std::shared_ptr<AMP::LinearAlgebra::Variable> getInputVariable() const override;
88
92 std::shared_ptr<AMP::LinearAlgebra::Vector> createInputVector() const override;
93
98 std::shared_ptr<AMP::LinearAlgebra::Vector> createOutputVector() const override;
99
101 std::shared_ptr<AMP::LinearAlgebra::VectorSelector> selectOutputVector() const override;
102
104 std::shared_ptr<AMP::LinearAlgebra::VectorSelector> selectInputVector() const override;
105
107 // default behavior is to return true;
108 bool isValidVector( std::shared_ptr<const AMP::LinearAlgebra::Vector> ) override;
109
117 void makeConsistent( std::shared_ptr<AMP::LinearAlgebra::Vector> vec ) override;
118
123 void reInitializeVector( std::shared_ptr<AMP::LinearAlgebra::Vector> ) override;
124
128 std::shared_ptr<AMP::LinearAlgebra::Matrix> getMatrix() override;
129
130private:
132
134 std::shared_ptr<AMP::LinearAlgebra::Vector> d_inputVec;
136 std::shared_ptr<AMP::LinearAlgebra::Vector> d_outputVec;
138 std::shared_ptr<AMP::LinearAlgebra::Vector> d_resVec;
139
141 std::shared_ptr<Operator> d_pOperator;
142};
143
144} // namespace AMP::Operator
145#endif
std::shared_ptr< AMP::LinearAlgebra::Variable > getInputVariable() const override
Return the input variable.
void reset(std::shared_ptr< const OperatorParameters > params) override
std::shared_ptr< AMP::LinearAlgebra::Variable > getOutputVariable() const override
Return the output variable.
std::shared_ptr< Operator > d_pOperator
Operator being adapted for memory operations.
MemorySpaceMigrationLinearOperator(void)
Default constructor.
std::shared_ptr< AMP::LinearAlgebra::VectorSelector > selectOutputVector() const override
Return the selector for output vectors.
void makeConsistent(std::shared_ptr< AMP::LinearAlgebra::Vector > vec) override
void residual(std::shared_ptr< const AMP::LinearAlgebra::Vector > f, std::shared_ptr< const AMP::LinearAlgebra::Vector > u, std::shared_ptr< AMP::LinearAlgebra::Vector > r) override
std::shared_ptr< AMP::LinearAlgebra::Vector > d_inputVec
scratch space for input vectors
std::shared_ptr< OperatorParameters > getParameters(const std::string &type, std::shared_ptr< const AMP::LinearAlgebra::Vector > u, std::shared_ptr< OperatorParameters > params=nullptr) override
bool isValidVector(std::shared_ptr< const AMP::LinearAlgebra::Vector >) override
given a vector return whether it is valid or not
std::string type() const override
Return the name of the operator.
std::shared_ptr< AMP::LinearAlgebra::Vector > d_outputVec
scratch space for output vectors
void apply(std::shared_ptr< const AMP::LinearAlgebra::Vector > u, std::shared_ptr< AMP::LinearAlgebra::Vector > f) override
std::shared_ptr< AMP::LinearAlgebra::Vector > createInputVector() const override
Get a input vector ( For , is a input vector )
std::shared_ptr< AMP::LinearAlgebra::Vector > d_resVec
scratch space for residuals
std::shared_ptr< AMP::LinearAlgebra::Vector > createOutputVector() const override
Get an output vector ( For , is an output vector )
std::shared_ptr< AMP::LinearAlgebra::VectorSelector > selectInputVector() const override
Return the selector for input vectors.
std::shared_ptr< AMP::LinearAlgebra::Matrix > getMatrix() override
MemorySpaceMigrationLinearOperator(std::shared_ptr< const OperatorParameters > params)
Constructor.
void reInitializeVector(std::shared_ptr< AMP::LinearAlgebra::Vector >) override
std::shared_ptr< AMP::Operator::Operator > shared_ptr
Definition Operator.h:29



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