Advanced Multi-Physics (AMP)
On-Line Documentation
ConstraintsEliminationOperator.h
Go to the documentation of this file.
1
2#ifndef included_AMP_ConstraintsEliminationOperator
3#define included_AMP_ConstraintsEliminationOperator
4
5#include "AMP/operators/Operator.h"
6#include "AMP/vectors/Variable.h"
7#include "AMP/vectors/Vector.h"
8#include <vector>
9
10namespace AMP::Operator {
11
16{
17
18public:
23 explicit ConstraintsEliminationOperator( std::shared_ptr<const OperatorParameters> params )
24 : Operator( params )
25 {
26 AMP_INSIST( params->d_db->keyExists( "InputVariable" ), "key not found" );
27 std::string inpVarName = params->d_db->getString( "InputVariable" );
29
30 AMP_INSIST( params->d_db->keyExists( "OutputVariable" ), "key not found" );
31 std::string outVarName = params->d_db->getString( "OutputVariable" );
33 }
34
39
41 std::string type() const override { return "ConstraintsEliminationOperator"; }
42
56
60 std::shared_ptr<AMP::LinearAlgebra::Variable> getInputVariable() const override;
61
65 std::shared_ptr<AMP::LinearAlgebra::Variable> getOutputVariable() const override;
66
83
84protected:
85 std::vector<size_t> d_SlaveIndices;
86 std::vector<double> d_SlaveShift;
87
88private:
89 std::shared_ptr<AMP::LinearAlgebra::Variable> d_InputVariable;
90 std::shared_ptr<AMP::LinearAlgebra::Variable> d_OutputVariable;
91};
92} // namespace AMP::Operator
93
94#endif
A description of the data in the vector.
Definition Variable.h:46
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::LinearAlgebra::Variable > d_OutputVariable
std::shared_ptr< AMP::LinearAlgebra::Variable > d_InputVariable
std::shared_ptr< AMP::LinearAlgebra::Variable > getOutputVariable() const override
virtual void copyMasterToSlave(AMP::LinearAlgebra::Vector::shared_ptr u)=0
std::string type() const override
Return the name of the operator.
virtual void addSlaveToMaster(AMP::LinearAlgebra::Vector::shared_ptr u)=0
std::shared_ptr< AMP::LinearAlgebra::Variable > getInputVariable() const override
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr f) override
virtual void setSlaveToZero(AMP::LinearAlgebra::Vector::shared_ptr u)
virtual void addShiftToSlave(AMP::LinearAlgebra::Vector::shared_ptr u)
ConstraintsEliminationOperator(std::shared_ptr< const OperatorParameters > params)
std::shared_ptr< AMP::Operator::Operator > shared_ptr
Definition Operator.h:29
#define AMP_INSIST(EXP, MSG)
Insist 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