Advanced Multi-Physics (AMP)
On-Line Documentation
DirichletVectorCorrection.h
Go to the documentation of this file.
1#ifndef included_AMP_DirichletVectorCorrection
2#define included_AMP_DirichletVectorCorrection
3
4#include "AMP/operators/boundary/BoundaryOperator.h"
5#include "AMP/operators/boundary/DirichletVectorCorrectionParameters.h"
6
7namespace AMP::Operator {
8
21{
22public:
26 explicit DirichletVectorCorrection( std::shared_ptr<const OperatorParameters> params );
27
32
34 std::string type() const override { return "DirichletVectorCorrection"; }
35
39 void setVariable( const std::shared_ptr<AMP::LinearAlgebra::Variable> &var )
40 {
42 }
43
51
59
61
63
66
70 void reset( std::shared_ptr<const OperatorParameters> params ) override;
71
76
78 {
79 if ( !d_setResidual ) {
80 this->applyNonZeroValues( sol );
81 }
82 }
83
84 const auto &getBoundaryIds() const { return d_boundaryIds; }
85
86 const auto &getDofIds() const { return d_dofIds; }
87
88protected:
91 std::shared_ptr<AMP::LinearAlgebra::Variable> var );
92
95 std::shared_ptr<AMP::LinearAlgebra::Variable> var );
96
101 std::shared_ptr<OperatorParameters>
103
104 std::vector<short int> d_boundaryIds;
105
106 std::vector<std::vector<size_t>> d_dofIds;
107
108 std::vector<std::vector<double>> d_dirichletValues1;
109
111
112 // This must be a simple variable not a dual or multivariable
113 std::shared_ptr<AMP::LinearAlgebra::Variable> d_variable;
114
116
117 bool d_setResidual = false;
118
119 bool d_skipParams = false;
120
122
123 double d_scalingFactor = 0;
124
125private:
126};
127} // namespace AMP::Operator
128
129#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 apply(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr r) override
void applyZeroValues(AMP::LinearAlgebra::Vector::shared_ptr r)
AMP::LinearAlgebra::Vector::shared_ptr mySubsetVector(AMP::LinearAlgebra::Vector::shared_ptr vec, std::shared_ptr< AMP::LinearAlgebra::Variable > var)
void modifyInitialSolutionVector(AMP::LinearAlgebra::Vector::shared_ptr sol) override
void setVariable(const std::shared_ptr< AMP::LinearAlgebra::Variable > &var)
void setDirichletValues(AMP::LinearAlgebra::Vector::shared_ptr vals)
DirichletVectorCorrection(std::shared_ptr< const OperatorParameters > params)
AMP::LinearAlgebra::Vector::shared_ptr d_dirichletValues2
std::vector< std::vector< double > > d_dirichletValues1
void applyNonZeroValues(AMP::LinearAlgebra::Vector::shared_ptr r)
void reset(std::shared_ptr< const OperatorParameters > params) override
std::shared_ptr< OperatorParameters > getJacobianParameters(AMP::LinearAlgebra::Vector::const_shared_ptr) override
std::vector< std::vector< size_t > > d_dofIds
std::string type() const override
Return the name of the operator.
void setRHScorrection(AMP::LinearAlgebra::Vector::shared_ptr rhs) override
void applyResidual(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr r)
std::shared_ptr< AMP::LinearAlgebra::Variable > d_variable
AMP::LinearAlgebra::Vector::const_shared_ptr mySubsetVector(AMP::LinearAlgebra::Vector::const_shared_ptr vec, std::shared_ptr< AMP::LinearAlgebra::Variable > var)
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