Advanced Multi-Physics (AMP)
On-Line Documentation
Map3Dto1D.h
Go to the documentation of this file.
1#ifndef included_AMP_Map3Dto1D
2#define included_AMP_Map3Dto1D
3
4
5#include "AMP/discretization/createLibmeshElements.h"
6#include "AMP/operators/Operator.h"
7#include "AMP/operators/OperatorParameters.h"
8#include "AMP/operators/map/MapOperator.h"
9#include "AMP/operators/map/MapOperatorParameters.h"
10#include "AMP/vectors/Variable.h"
11#include "AMP/vectors/Vector.h"
12#include <memory>
13
14#include <string>
15
16namespace AMP::Operator {
17
23class Map3Dto1D : public MapOperator
24{
25public:
27 explicit Map3Dto1D( std::shared_ptr<const OperatorParameters> params );
28
30 virtual ~Map3Dto1D() {}
31
33 std::string type() const override { return "Map3Dto1D"; }
34
39 void reset( std::shared_ptr<const OperatorParameters> ) override;
40
43
46
49
50 std::shared_ptr<AMP::LinearAlgebra::Variable> createInputVariable( const std::string &name,
51 int = -1 ) override
52 {
53 return d_inpVariable->clone( name );
54 }
55
56 std::shared_ptr<AMP::LinearAlgebra::Variable> createOutputVariable( const std::string &name,
57 int = -1 ) override
58 {
59 return d_outVariable->clone( name );
60 }
61
62 std::shared_ptr<AMP::LinearAlgebra::Variable> getInputVariable() const override
63 {
64 return d_inpVariable;
65 }
66
67 std::shared_ptr<AMP::LinearAlgebra::Variable> getOutputVariable() const override
68 {
69 return d_outVariable;
70 }
71
75 void setZLocations( const std::vector<double> &zloc ) { d_zLocations = zloc; }
76
78
80 {
81 outputVec = vec->subsetVectorForVariable( d_outVariable );
82 }
83
84protected:
85 std::shared_ptr<AMP::LinearAlgebra::Vector> outputVec = nullptr;
86
87 std::shared_ptr<AMP::LinearAlgebra::Variable> d_inpVariable = nullptr;
88
89 std::shared_ptr<AMP::LinearAlgebra::Variable> d_outVariable = nullptr;
90
91 std::vector<double> d_zLocations;
93 bool d_useGaussVec = false;
94
95private:
97};
98} // namespace AMP::Operator
99
100#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::LinearAlgebra::Variable > getOutputVariable() const override
Return the output variable.
Definition Map3Dto1D.h:67
std::shared_ptr< AMP::LinearAlgebra::Variable > createInputVariable(const std::string &name, int=-1) override
Definition Map3Dto1D.h:50
std::shared_ptr< AMP::LinearAlgebra::Variable > d_inpVariable
Definition Map3Dto1D.h:87
std::shared_ptr< AMP::LinearAlgebra::Variable > createOutputVariable(const std::string &name, int=-1) override
Definition Map3Dto1D.h:56
std::shared_ptr< AMP::LinearAlgebra::Variable > getInputVariable() const override
Return the input variable.
Definition Map3Dto1D.h:62
void apply_Gauss(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr f)
std::shared_ptr< AMP::LinearAlgebra::Vector > outputVec
Definition Map3Dto1D.h:85
void apply_Nodal(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr f)
std::vector< double > d_zLocations
Definition Map3Dto1D.h:91
void reset(std::shared_ptr< const OperatorParameters >) override
virtual ~Map3Dto1D()
Destructor.
Definition Map3Dto1D.h:30
void setVector(AMP::LinearAlgebra::Vector::shared_ptr vec)
Definition Map3Dto1D.h:79
void setZLocations(const std::vector< double > &zloc)
Definition Map3Dto1D.h:75
Discretization::createLibmeshElements libmeshElements
Definition Map3Dto1D.h:96
std::string type() const override
Return the name of the operator.
Definition Map3Dto1D.h:33
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr f) override
std::shared_ptr< AMP::LinearAlgebra::Variable > d_outVariable
Definition Map3Dto1D.h:89
Map3Dto1D(std::shared_ptr< const OperatorParameters > params)
Constructor.
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