Advanced Multi-Physics (AMP)
On-Line Documentation
CladToSubchannelMap.h
Go to the documentation of this file.
1// #ifndef included_AMP_CladToSubchannelMap
2#define included_AMP_CladToSubchannelMap
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 CladToSubchannelMap( std::shared_ptr<const AMP::Operator::OperatorParameters> params );
37
40
42 std::string type() const override { return "CladToSubchannelMap"; }
43
49
55
61
62protected:
63private:
64 // The grid of the subchannel mesh
65 void fillSubchannelGrid( std::shared_ptr<AMP::Mesh::Mesh> ); // Function to fill the subchannel
66 // data for all processors
67 size_t N_subchannels; // The total number of subchannels
68 std::vector<double> d_x, d_y, d_z; // The x, y, z grid for the subchannel
69 std::vector<bool>
70 d_ownSubChannel; // Which subchannels do I own (multple procs my own a subchannel)
71 std::vector<std::vector<int>>
72 d_subchannelRanks; // The processors that need each x-y point to fill the result vec
73 std::vector<std::vector<int>>
74 d_subchannelSend; // The processors that are sending data to fill each subchannel
75
76 // Iterators over the mesh elemens of interest
77 static AMP::Mesh::MeshIterator getSubchannelIterator( std::shared_ptr<AMP::Mesh::Mesh> );
80
81 // The list of local MeshElements in each subchannel
82 std::vector<std::vector<AMP::Mesh::MeshElementID>> d_elem;
83
84 // Buffers to send/recv the data
85 std::vector<AMP_MPI::Request> d_currRequests;
86 std::vector<double *> d_sendBuffer;
88
89 int getSubchannelIndex( double x, double y );
90};
91
92
93} // namespace AMP::Operator
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 ...
A class used to map temperature from the clad meshes to the subchannel mesh.
int getSubchannelIndex(double x, double y)
void applyStart(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr r) override
Start a communicative apply operation.
std::vector< std::vector< int > > d_subchannelSend
std::vector< std::vector< AMP::Mesh::MeshElementID > > d_elem
virtual ~CladToSubchannelMap()
Destructor.
std::vector< std::vector< int > > d_subchannelRanks
void fillSubchannelGrid(std::shared_ptr< AMP::Mesh::Mesh >)
CladToSubchannelMap(std::shared_ptr< const AMP::Operator::OperatorParameters > params)
Standard constructor.
static bool validMapType(const std::string &s)
Returns true if MapType = "CladToSubchannelMapParameters".
std::string type() const override
Return the name of the operator.
void setVector(AMP::LinearAlgebra::Vector::shared_ptr result) override
Set a frozen vector for results of the apply operation.
static AMP::Mesh::MeshIterator getSubchannelIterator(std::shared_ptr< AMP::Mesh::Mesh >)
std::vector< AMP_MPI::Request > d_currRequests
CladToSubchannelMapParameters Parameters
Typedef to identify the parameters class of this operator.
void applyFinish(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr r) override
Finish a communicative apply operation.
std::shared_ptr< AMP::Operator::Operator > shared_ptr
Definition Operator.h:29
AsyncMapOperatorParameters CladToSubchannelMapParameters



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