Advanced Multi-Physics (AMP)
On-Line Documentation
DirichletMatrixCorrection.h
Go to the documentation of this file.
1
2#ifndef included_AMP_DirichletMatrixCorrection
3#define included_AMP_DirichletMatrixCorrection
4
5#include "AMP/operators/boundary/BoundaryOperator.h"
6#include "AMP/operators/boundary/DirichletMatrixCorrectionParameters.h"
7#include "AMP/operators/boundary/DirichletVectorCorrection.h"
8#include "AMP/vectors/Variable.h"
9
10namespace AMP::Operator {
11
21{
22public:
24 explicit DirichletMatrixCorrection( std::shared_ptr<const OperatorParameters> params );
25
28
30 std::string type() const override { return "DirichletMatrixCorrection"; }
31
33 void setVariable( const std::shared_ptr<AMP::LinearAlgebra::Variable> &var )
34 {
36 }
37
38 std::shared_ptr<AMP::LinearAlgebra::Variable> getOutputVariable() const override
39 {
40 return d_variable;
41 }
42
43 std::shared_ptr<AMP::LinearAlgebra::Variable> getInputVariable() const override
44 {
45 return d_variable;
46 }
47
50 {
51 // Do Nothing
52 }
53
59 void reset( std::shared_ptr<const OperatorParameters> ) override;
60
67
73
74 const auto &getBoundaryIds() { return d_boundaryIds; }
75
76 const auto &getDofIds() { return d_dofIds; }
77
78
79protected:
80 void parseParams( std::shared_ptr<const DirichletMatrixCorrectionParameters> );
81
82
83protected:
84 // This must be a simple variable not a dual or multivariable
85 std::shared_ptr<AMP::LinearAlgebra::Variable> d_variable;
86
87 std::vector<short int> d_boundaryIds;
88
89 std::vector<std::vector<double>> d_dirichletValues;
90
91 std::vector<std::vector<unsigned int>> d_dofIds;
92
94
96
97 std::shared_ptr<DirichletVectorCorrection> d_rhsCorrectionSet;
98
100
102
104
106
108
109 bool d_initialized = false;
110
112
114
116
118
119 std::shared_ptr<AMP::LinearAlgebra::Matrix> d_inputMatrix;
120
121private:
122};
123} // namespace AMP::Operator
124
125#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
virtual void apply(AMP::LinearAlgebra::Vector::const_shared_ptr, AMP::LinearAlgebra::Vector::shared_ptr) override
void setRHScorrection(AMP::LinearAlgebra::Vector::shared_ptr rhs) override
void initRhsCorrectionAdd(AMP::LinearAlgebra::Vector::shared_ptr rhs)
AMP::LinearAlgebra::Vector::shared_ptr d_dispVals
DirichletMatrixCorrection(std::shared_ptr< const OperatorParameters > params)
Constructor.
void reset(std::shared_ptr< const OperatorParameters >) override
void parseParams(std::shared_ptr< const DirichletMatrixCorrectionParameters >)
std::vector< std::vector< double > > d_dirichletValues
void setVariable(const std::shared_ptr< AMP::LinearAlgebra::Variable > &var)
Set the variable for the vector that will used with this operator.
std::shared_ptr< AMP::LinearAlgebra::Variable > getInputVariable() const override
Return the input variable.
std::shared_ptr< AMP::LinearAlgebra::Variable > getOutputVariable() const override
Return the output variable.
AMP::LinearAlgebra::Vector::shared_ptr d_rhsCorrectionAdd
std::shared_ptr< DirichletVectorCorrection > d_rhsCorrectionSet
void addRHScorrection(AMP::LinearAlgebra::Vector::shared_ptr rhs) override
std::shared_ptr< AMP::LinearAlgebra::Variable > d_variable
std::string type() const override
Return the name of the operator.
std::shared_ptr< AMP::LinearAlgebra::Matrix > d_inputMatrix
std::vector< std::vector< unsigned int > > d_dofIds
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