Advanced Multi-Physics (AMP)
On-Line Documentation
CoupledOperator.h
Go to the documentation of this file.
1#ifndef included_AMP_CoupledOperator
2#define included_AMP_CoupledOperator
3
4#include "AMP/operators/ColumnOperator.h"
5#include "AMP/operators/CoupledOperatorParameters.h"
6#include "AMP/vectors/Vector.h"
7
8#include <vector>
9
10
11namespace AMP::Operator {
12
13
19{
20public:
21 explicit CoupledOperator( std::shared_ptr<const OperatorParameters> params );
22
25
27 std::string type() const override { return "CoupledOperator"; }
28
38
39
40 std::shared_ptr<AMP::Operator::Operator> getMapOperator() { return d_operators[2]; }
41
42 void setMapOperator( std::shared_ptr<AMP::Operator::Operator> op ) { d_operators[2] = op; }
43
44 std::shared_ptr<AMP::Operator::Operator> getBVPOperator() { return d_operators[3]; }
45
46 void setBVPOperator( std::shared_ptr<AMP::Operator::Operator> op ) { d_operators[3] = op; }
47
48 std::shared_ptr<AMP::LinearAlgebra::Variable> getOutputVariable() const override
49 {
50 return d_operators[3]->getOutputVariable();
51 }
52
53 void append( std::shared_ptr<Operator> op ) override
54 {
55 AMP_ASSERT( d_operators.size() < 4 );
56 AMP_ASSERT( op );
57 d_operators.push_back( op );
58 }
59
60 bool isValidVector( std::shared_ptr<const AMP::LinearAlgebra::Vector> u ) override
61 {
62 return d_operators[3]->isValidVector( u );
63 }
64
69
70 std::shared_ptr<OperatorParameters>
71 getParameters( const std::string &type,
73 std::shared_ptr<OperatorParameters> params = nullptr ) override
74 {
75 return d_operators[3]->getParameters( type, u, params );
76 }
77
78 virtual ~CoupledOperator() {}
79
80protected:
82};
83} // namespace AMP::Operator
84
85#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::vector< std::shared_ptr< Operator > > d_operators
std::shared_ptr< AMP::LinearAlgebra::Variable > getOutputVariable() const override
void setFrozenGaussPointVector(AMP::LinearAlgebra::Vector::shared_ptr u)
std::shared_ptr< OperatorParameters > getParameters(const std::string &type, AMP::LinearAlgebra::Vector::const_shared_ptr u, std::shared_ptr< OperatorParameters > params=nullptr) override
void setMapOperator(std::shared_ptr< AMP::Operator::Operator > op)
bool isValidVector(std::shared_ptr< const AMP::LinearAlgebra::Vector > u) override
given a vector return whether it is valid or not
CoupledOperator(std::shared_ptr< const OperatorParameters > params)
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr f) override
void setBVPOperator(std::shared_ptr< AMP::Operator::Operator > op)
void residual(AMP::LinearAlgebra::Vector::const_shared_ptr f, AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr r) override
std::shared_ptr< AMP::Operator::Operator > getBVPOperator()
std::string type() const override
Return the name of the operator.
AMP::LinearAlgebra::Vector::shared_ptr d_frozenGaussPointVector
void append(std::shared_ptr< Operator > op) override
std::shared_ptr< AMP::Operator::Operator > getMapOperator()
std::shared_ptr< AMP::Operator::Operator > shared_ptr
Definition Operator.h:29
#define AMP_ASSERT(EXP)
Assert error.



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