Advanced Multi-Physics (AMP)
On-Line Documentation
ContactResidualCorrection.h
Go to the documentation of this file.
1
2#ifndef included_AMP_ContactResidualCorrection
3#define included_AMP_ContactResidualCorrection
4
5#include "AMP/mesh/MeshID.h"
6#include "AMP/operators/Operator.h"
7#include "AMP/vectors/MultiVariable.h"
8
9namespace AMP::Operator {
10
12
14{
15public:
17 std::shared_ptr<const ContactResidualCorrectionParameters> params )
18 : Operator( params )
19 {
20 }
21
23
24 std::string type() const override { return "ContactResidualCorrection"; }
25
28
29 void setMasterVariable( const std::shared_ptr<AMP::LinearAlgebra::Variable> &var )
30 {
32 }
33
34 void setSlaveVariable( const std::shared_ptr<AMP::LinearAlgebra::Variable> &var )
35 {
37 }
38
39 void setMasterMesh( const std::shared_ptr<AMP::Mesh::Mesh> &mesh ) { d_Mesh = mesh; }
40
41 void setSlaveMesh( const std::shared_ptr<AMP::Mesh::Mesh> &mesh ) { d_slaveMesh = mesh; }
42
43 void setMasterNodes( const std::vector<AMP::Mesh::MeshElementID> &vec ) { d_masterNodes = vec; }
44
45 void setSlaveNodes( const std::vector<AMP::Mesh::MeshElementID> &vec ) { d_slaveNodes = vec; }
46
47 void setDofs( const std::vector<std::vector<unsigned int>> &vec ) { d_dofs = vec; }
48
49 std::shared_ptr<AMP::LinearAlgebra::Variable> getOutputVariable() const override
50 {
51 std::shared_ptr<AMP::LinearAlgebra::MultiVariable> retVariable(
52 new AMP::LinearAlgebra::MultiVariable( "ContactVariable" ) );
55 return retVariable;
56 }
57
58 std::shared_ptr<AMP::LinearAlgebra::Variable> getInputVariable() const override
59 {
60 std::shared_ptr<AMP::LinearAlgebra::MultiVariable> retVariable(
61 new AMP::LinearAlgebra::MultiVariable( "ContactVariable" ) );
64 return retVariable;
65 }
66
67 std::shared_ptr<AMP::LinearAlgebra::Variable> getMasterVariable() { return d_masterVariable; }
68
69 std::shared_ptr<AMP::LinearAlgebra::Variable> getSlaveVariable() { return d_slaveVariable; }
70
71 const auto &getMasterNodes() { return d_masterNodes; }
72
73 const auto &getSlaveNodes() { return d_slaveNodes; }
74
75 const auto &getDofs() { return d_dofs; }
76
77private:
78 std::shared_ptr<AMP::LinearAlgebra::Variable> d_masterVariable;
79 std::shared_ptr<AMP::LinearAlgebra::Variable> d_slaveVariable;
80
81 std::vector<AMP::Mesh::MeshElementID> d_masterNodes;
82 std::vector<AMP::Mesh::MeshElementID> d_slaveNodes;
83
84 std::vector<std::vector<unsigned int>> d_dofs;
85
86 std::shared_ptr<AMP::Mesh::Mesh> d_slaveMesh;
87};
88} // namespace AMP::Operator
89
90#endif
A class for combining variables.
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::Mesh::Mesh > d_slaveMesh
std::shared_ptr< AMP::LinearAlgebra::Variable > d_slaveVariable
std::shared_ptr< AMP::LinearAlgebra::Variable > getInputVariable() const override
Return the input variable.
std::shared_ptr< AMP::LinearAlgebra::Variable > getSlaveVariable()
ContactResidualCorrection(std::shared_ptr< const ContactResidualCorrectionParameters > params)
std::shared_ptr< AMP::LinearAlgebra::Variable > getOutputVariable() const override
Return the output variable.
void setMasterVariable(const std::shared_ptr< AMP::LinearAlgebra::Variable > &var)
std::vector< AMP::Mesh::MeshElementID > d_masterNodes
std::vector< std::vector< unsigned int > > d_dofs
std::shared_ptr< AMP::LinearAlgebra::Variable > d_masterVariable
void setSlaveVariable(const std::shared_ptr< AMP::LinearAlgebra::Variable > &var)
void setMasterMesh(const std::shared_ptr< AMP::Mesh::Mesh > &mesh)
std::string type() const override
Return the name of the operator.
std::vector< AMP::Mesh::MeshElementID > d_slaveNodes
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr f) override
void setMasterNodes(const std::vector< AMP::Mesh::MeshElementID > &vec)
std::shared_ptr< AMP::LinearAlgebra::Variable > getMasterVariable()
void setSlaveMesh(const std::shared_ptr< AMP::Mesh::Mesh > &mesh)
void setDofs(const std::vector< std::vector< unsigned int > > &vec)
void setSlaveNodes(const std::vector< AMP::Mesh::MeshElementID > &vec)
std::shared_ptr< AMP::Mesh::Mesh > d_Mesh
Definition Operator.h:193
std::shared_ptr< AMP::Operator::Operator > shared_ptr
Definition Operator.h:29
OperatorParameters ContactResidualCorrectionParameters



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