Advanced Multi-Physics (AMP)
On-Line Documentation
GradientOperator.h
Go to the documentation of this file.
1#ifndef included_AMP_GradientOperator
2#define included_AMP_GradientOperator
3
4
5#include "AMP/discretization/createLibmeshElements.h"
6#include "AMP/operators/Operator.h"
7
8
9namespace AMP::Operator {
10
11
16{
17public:
20
22 explicit GradientOperator( std::shared_ptr<const OperatorParameters> params );
23
25 virtual ~GradientOperator() {}
26
28 std::string type() const override { return "GradientOperator"; }
29
35 void reset( std::shared_ptr<const OperatorParameters> params ) override;
36
46
47
49 std::shared_ptr<AMP::LinearAlgebra::Variable> getOutputVariable() const override
50 {
51 return d_outputVar;
52 }
53
55 std::shared_ptr<AMP::LinearAlgebra::Variable> getInputVariable() const override
56 {
57 return d_inputVar;
58 }
59
60private:
61 std::shared_ptr<AMP::Database> d_db;
62 std::shared_ptr<AMP::LinearAlgebra::Variable> d_inputVar, d_outputVar;
64 std::vector<AMP::Mesh::MeshElementID> d_nodes;
65 std::vector<int> d_elementsPerNode;
66};
67
68
69} // namespace AMP::Operator
70
71#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::shared_ptr< AMP::Database > d_db
std::shared_ptr< AMP::LinearAlgebra::Variable > getInputVariable() const override
Return the input variable.
std::shared_ptr< AMP::LinearAlgebra::Variable > d_outputVar
std::vector< AMP::Mesh::MeshElementID > d_nodes
void reset(std::shared_ptr< const OperatorParameters > params) override
std::shared_ptr< AMP::LinearAlgebra::Variable > d_inputVar
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr f) override
GradientOperator(void)
Default constructor.
std::string type() const override
Return the name of the operator.
std::shared_ptr< AMP::LinearAlgebra::Variable > getOutputVariable() const override
Return the output variable.
GradientOperator(std::shared_ptr< const OperatorParameters > params)
Constructor.
virtual ~GradientOperator()
Destructor.
AMP::Discretization::createLibmeshElements d_elem
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