Advanced Multi-Physics (AMP)
On-Line Documentation
SubchannelToCladMap.h
Go to the documentation of this file.
1#ifndef included_AMP_SubchannelToCladMap
2#define included_AMP_SubchannelToCladMap
3
4#include "AMP/operators/map/ScalarZAxisMap.h"
5
6namespace AMP::Operator {
7
8
10
11
21{
22public:
27 static bool validMapType( const std::string &s );
28
32
36 explicit SubchannelToCladMap( std::shared_ptr<const AMP::Operator::OperatorParameters> params );
37
40
42 std::string type() const override { return "SubchannelToCladMap"; }
43
49
55
61
62protected:
63 // Return the list of local MeshElements in each subchannel
64 virtual std::vector<std::vector<AMP::Mesh::MeshElementID>>
65 getElementsInSubchannel( const std::vector<double> &x,
66 const std::vector<double> &y,
67 AMP::Mesh::MeshIterator iterator );
68
69 // For a given subchannel, fill the elements of interest using the coordinates
71 double range[4],
72 std::shared_ptr<AMP::Mesh::Mesh> mesh,
73 const std::vector<AMP::Mesh::MeshElementID> &ids,
74 const std::vector<double> &z,
75 const std::vector<double> &f );
76
77 // Iterators over the mesh elemens of interest
80
81private:
82 // Function to fill the subchannel data for all processors
83 void fillSubchannelGrid( std::shared_ptr<AMP::Mesh::Mesh> );
84 // The total number of subchannels
86 // The x, y, z grid for the subchannel
87 std::vector<double> d_x, d_y, d_z;
88 // Which subchannels do I own (multple procs my own a subchannel)
89 std::vector<bool> d_ownSubChannel;
90 // The processors that own each x-y point in the subchannel
91 std::vector<std::vector<int>> d_subchannelRanks;
92 // The processors that are recieving data from each subchannel
93 std::vector<std::vector<int>> d_subchannelRecv;
94
95 // Function to get the iterator for the subchannel mesh
96 static AMP::Mesh::MeshIterator getSubchannelIterator( std::shared_ptr<AMP::Mesh::Mesh> );
97
98 // The list of local MeshElements in each subchannel
99 std::vector<std::vector<AMP::Mesh::MeshElementID>> d_elem;
100
101 // Buffers to send/recv the data
102 std::vector<AMP_MPI::Request> d_currRequests;
103 std::vector<std::vector<double>> d_sendBuffer;
104
105 int getSubchannelIndex( double x, double y );
106};
107
108
109} // namespace AMP::Operator
110
111#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
A class used to iterate over elements in a Mesh.
A base class for asynchronous map operations between meshes. A map operation involves two meshes and ...
std::shared_ptr< AMP::Operator::Operator > shared_ptr
Definition Operator.h:29
A class used to map temperature from the clad meshes to the subchannel mesh.
virtual ~SubchannelToCladMap()
Destructor.
void applyFinish(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr f) override
Finish a communicative apply operation.
void setVector(AMP::LinearAlgebra::Vector::shared_ptr result) override
Set a frozen vector for results of the apply operation.
virtual std::vector< std::vector< AMP::Mesh::MeshElementID > > getElementsInSubchannel(const std::vector< double > &x, const std::vector< double > &y, AMP::Mesh::MeshIterator iterator)
void applyStart(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr f) override
Start a communicative apply operation.
static bool validMapType(const std::string &s)
Returns true if MapType = "SubchannelToCladMapParameters".
std::vector< std::vector< int > > d_subchannelRecv
std::vector< std::vector< int > > d_subchannelRanks
SubchannelToCladMapParameters Parameters
Typedef to identify the parameters class of this operator.
void fillSubchannelGrid(std::shared_ptr< AMP::Mesh::Mesh >)
std::vector< AMP_MPI::Request > d_currRequests
int getSubchannelIndex(double x, double y)
SubchannelToCladMap(std::shared_ptr< const AMP::Operator::OperatorParameters > params)
Standard constructor.
std::vector< std::vector< AMP::Mesh::MeshElementID > > d_elem
static AMP::Mesh::MeshIterator getSubchannelIterator(std::shared_ptr< AMP::Mesh::Mesh >)
virtual void fillReturnVector(AMP::LinearAlgebra::Vector::shared_ptr vec, double range[4], std::shared_ptr< AMP::Mesh::Mesh > mesh, const std::vector< AMP::Mesh::MeshElementID > &ids, const std::vector< double > &z, const std::vector< double > &f)
std::string type() const override
Return the name of the operator.
std::vector< std::vector< double > > d_sendBuffer
AsyncMapOperatorParameters SubchannelToCladMapParameters



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