Advanced Multi-Physics (AMP)
On-Line Documentation
ColumnOperator.h
Go to the documentation of this file.
1
2#ifndef included_AMP_ColumnOperator
3#define included_AMP_ColumnOperator
4
5#include "AMP/operators/ColumnOperatorParameters.h"
6#include "AMP/operators/Operator.h"
7
8#include <vector>
9
10namespace AMP::Operator {
11
18{
19
20public:
22 explicit ColumnOperator();
23
25 explicit ColumnOperator( std::shared_ptr<const OperatorParameters> params );
26
28 virtual ~ColumnOperator() {}
29
31 std::string type() const override { return "ColumnOperator"; }
32
36
46
47 void reset( std::shared_ptr<const OperatorParameters> params ) override;
48
58 std::shared_ptr<OperatorParameters>
59 getParameters( const std::string &type,
61 std::shared_ptr<OperatorParameters> params = nullptr ) override;
62
67 virtual void append( std::shared_ptr<Operator> op );
68
74 std::shared_ptr<AMP::LinearAlgebra::Variable> getOutputVariable() const override;
75
76 std::shared_ptr<AMP::LinearAlgebra::Variable> getInputVariable() const override;
77
78 bool isValidVector( std::shared_ptr<const AMP::LinearAlgebra::Vector> u ) override;
79
80 size_t getNumberOfOperators() { return d_operators.size(); }
81
82 std::shared_ptr<Operator> getOperator( size_t i ) { return d_operators[i]; }
83
84 inline const auto &getOperators() { return d_operators; }
85
87 inline auto begin() { return d_operators.begin(); }
88
90 inline auto end() { return d_operators.end(); }
91
93 std::vector<std::shared_ptr<Operator>> find( const std::string &name );
94
95protected:
96 std::vector<std::shared_ptr<Operator>> d_operators;
97
98private:
99};
100} // namespace AMP::Operator
101
102#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
void residual(AMP::LinearAlgebra::Vector::const_shared_ptr f, AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr r) override
virtual void append(std::shared_ptr< Operator > op)
ColumnOperator()
Empty constructor;.
std::shared_ptr< AMP::LinearAlgebra::Variable > getOutputVariable() const override
ColumnOperator(std::shared_ptr< const OperatorParameters > params)
Default constructor;.
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr r) override
The apply routine for the column operator calls apply on each of the component operators.
std::shared_ptr< Operator > getOperator(size_t i)
bool isValidVector(std::shared_ptr< const AMP::LinearAlgebra::Vector > u) override
given a vector return whether it is valid or not
virtual ~ColumnOperator()
Destructor.
auto begin()
Return an iterator to the beginning of the operators.
std::vector< std::shared_ptr< Operator > > d_operators
std::shared_ptr< AMP::LinearAlgebra::Variable > getInputVariable() const override
Return the input variable.
auto end()
Return an iterator to the end of the operators.
std::shared_ptr< OperatorParameters > getParameters(const std::string &type, AMP::LinearAlgebra::Vector::const_shared_ptr u, std::shared_ptr< OperatorParameters > params=nullptr) override
std::vector< std::shared_ptr< Operator > > find(const std::string &name)
Return the operator(s) with the given name/type.
void reset(std::shared_ptr< const OperatorParameters > params) override
std::string type() const override
Return the name of the operator.
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