1#ifndef included_AMP_MatrixParameters
2#define included_AMP_MatrixParameters
4#include "AMP/discretization/DOF_Manager.h"
5#include "AMP/matrices/MatrixParametersBase.h"
6#include "AMP/utils/AMP_MPI.h"
7#include "AMP/vectors/Vector.h"
29 std::shared_ptr<AMP::Discretization::DOFManager> dofRight,
31 const std::function<std::vector<size_t>(
size_t )> getRow = {} );
43 std::shared_ptr<AMP::Discretization::DOFManager> dofRight,
46 const std::function<std::vector<size_t>(
size_t )> getRow = {} );
60 std::shared_ptr<AMP::Discretization::DOFManager> dofRight,
62 std::shared_ptr<Variable> varLeft,
63 std::shared_ptr<Variable> varRight,
64 const std::function<std::vector<size_t>(
size_t )> getRow = {} );
78 std::shared_ptr<AMP::Discretization::DOFManager> dofRight,
80 std::shared_ptr<Variable> varLeft,
81 std::shared_ptr<Variable> varRight,
83 const std::function<std::vector<size_t>(
size_t )> getRow = {} );
96 std::shared_ptr<AMP::Discretization::DOFManager> dofRight,
98 std::shared_ptr<CommunicationList> commListLeft,
99 std::shared_ptr<CommunicationList> commListRight,
100 const std::function<std::vector<size_t>(
size_t )> getRow = {} );
114 std::shared_ptr<AMP::Discretization::DOFManager> dofRight,
116 std::shared_ptr<CommunicationList> commListLeft,
117 std::shared_ptr<CommunicationList> commListRight,
119 const std::function<std::vector<size_t>(
size_t )> getRow = {} );
134 std::shared_ptr<AMP::Discretization::DOFManager> dofRight,
136 std::shared_ptr<Variable> varLeft,
137 std::shared_ptr<Variable> varRight,
138 std::shared_ptr<CommunicationList> commListLeft,
139 std::shared_ptr<CommunicationList> commListRight,
140 const std::function<std::vector<size_t>(
size_t )> getRow = {} );
156 std::shared_ptr<AMP::Discretization::DOFManager> dofRight,
158 std::shared_ptr<Variable> varLeft,
159 std::shared_ptr<Variable> varRight,
160 std::shared_ptr<CommunicationList> commListLeft,
161 std::shared_ptr<CommunicationList> commListRight,
163 const std::function<std::vector<size_t>(
size_t )> getRow = {} );
197 std::string
type()
const override {
return "MatrixParameters"; }
240 std::function<std::vector<size_t>(
size_t )>
d_getRow;
Provides C++ wrapper around MPI routines.
Class to manage reading/writing restart data.
A class used to hold basic parameters for a matrix.
A class used to hold basic parameters for a matrix.
size_t getLocalNumberOfRows() const
Return the local number of rows.
size_t getGlobalNumberOfRows() const
Return the global number of rows.
MatrixParameters(std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< Variable > varLeft, std::shared_ptr< Variable > varRight, AMP::Utilities::Backend backend, const std::function< std::vector< size_t >(size_t)> getRow={})
Constructor.
std::shared_ptr< CommunicationList > getRightCommList()
Get the communication list for the right vector.
MatrixParameters()=delete
MatrixParameters(std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, AMP::Utilities::Backend backend, const std::function< std::vector< size_t >(size_t)> getRow={})
Constructor.
std::function< std::vector< size_t >(size_t)> d_getRow
Function that generates column ids for each row of the matrix.
std::shared_ptr< CommunicationList > d_CommListLeft
MatrixParameters(std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< Variable > varLeft, std::shared_ptr< Variable > varRight, std::shared_ptr< CommunicationList > commListLeft, std::shared_ptr< CommunicationList > commListRight, const std::function< std::vector< size_t >(size_t)> getRow={})
Constructor.
std::shared_ptr< AMP::Discretization::DOFManager > d_DOFManagerRight
size_t getGlobalNumberOfColumns() const
Return the global number of columns.
MatrixParameters(std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< CommunicationList > commListLeft, std::shared_ptr< CommunicationList > commListRight, AMP::Utilities::Backend backend, const std::function< std::vector< size_t >(size_t)> getRow={})
Constructor.
std::shared_ptr< AMP::Discretization::DOFManager > d_DOFManagerLeft
size_t getLocalNumberOfColumns() const
Return the local number of columns.
MatrixParameters(std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< Variable > varLeft, std::shared_ptr< Variable > varRight, const std::function< std::vector< size_t >(size_t)> getRow={})
Constructor.
MatrixParameters(int64_t fid, AMP::IO::RestartManager *manager)
Read restart data from file.
void writeRestart(int64_t fid) const override
Write restart data to file.
std::shared_ptr< AMP::Discretization::DOFManager > getRightDOFManager()
std::string type() const override
type of this object
virtual ~MatrixParameters()=default
Destructor.
const std::function< std::vector< size_t >(size_t)> & getRowFunction() const
Get the bound function that generates column IDs for each row.
MatrixParameters(std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< Variable > varLeft, std::shared_ptr< Variable > varRight, std::shared_ptr< CommunicationList > commListLeft, std::shared_ptr< CommunicationList > commListRight, AMP::Utilities::Backend backend, const std::function< std::vector< size_t >(size_t)> getRow={})
Constructor.
MatrixParameters(std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, const std::function< std::vector< size_t >(size_t)> getRow={})
Constructor.
std::shared_ptr< AMP::Discretization::DOFManager > getLeftDOFManager()
std::shared_ptr< CommunicationList > d_CommListRight
std::shared_ptr< CommunicationList > getLeftCommList()
Get the communication list for the left vector.
void registerChildObjects(AMP::IO::RestartManager *manager) const override
Register any child objects.
MatrixParameters(std::shared_ptr< AMP::Discretization::DOFManager > dofLeft, std::shared_ptr< AMP::Discretization::DOFManager > dofRight, const AMP_MPI &comm, std::shared_ptr< CommunicationList > commListLeft, std::shared_ptr< CommunicationList > commListRight, const std::function< std::vector< size_t >(size_t)> getRow={})
Constructor.
Backend
Enum to store the backend used for gpu acceleration.