Advanced Multi-Physics (AMP)
On-Line Documentation
RawCSRMatrixParameters.h
Go to the documentation of this file.
1#ifndef included_AMP_RawCSRMatrixParameters
2#define included_AMP_RawCSRMatrixParameters
3
4#include "AMP/matrices/MatrixParametersBase.h"
5
6namespace AMP::LinearAlgebra {
7
8
12template<typename Config>
14{
15public:
16 using gidx_t = typename Config::gidx_t;
17 using lidx_t = typename Config::lidx_t;
18 using scalar_t = typename Config::scalar_t;
19
20 // modify ctors
21 //
22 // The diagonal and off-diagonal blocks need all the same parameters
23 // Like in CSRMatrixData use a nested class to pack all this away
25 lidx_t *d_row_starts = nullptr;
26 gidx_t *d_cols = nullptr;
27 scalar_t *d_coeffs = nullptr;
28 };
29
31
41 explicit RawCSRMatrixParameters( gidx_t first_row,
42 gidx_t last_row,
43 gidx_t first_col,
44 gidx_t last_col,
46 const RawCSRLocalMatrixParameters &off_diag,
47 const AMP_MPI &comm )
48 : MatrixParametersBase( comm ),
49 d_first_row( first_row ),
50 d_last_row( last_row ),
51 d_first_col( first_col ),
52 d_last_col( last_col ),
53 d_diag( diag ),
54 d_off_diag( off_diag )
55 {
56 }
57
68 explicit RawCSRMatrixParameters( gidx_t first_row,
69 gidx_t last_row,
70 gidx_t first_col,
71 gidx_t last_col,
73 const RawCSRLocalMatrixParameters &off_diag,
74 const AMP_MPI &comm,
76 : MatrixParametersBase( comm, backend ),
77 d_first_row( first_row ),
78 d_last_row( last_row ),
79 d_first_col( first_col ),
80 d_last_col( last_col ),
81 d_diag( diag ),
82 d_off_diag( off_diag )
83 {
84 }
85
97 explicit RawCSRMatrixParameters( gidx_t first_row,
98 gidx_t last_row,
99 gidx_t first_col,
100 gidx_t last_col,
101 const RawCSRLocalMatrixParameters &diag,
102 const RawCSRLocalMatrixParameters &off_diag,
103 const AMP_MPI &comm,
104 std::shared_ptr<Variable> var_left,
105 std::shared_ptr<Variable> var_right )
106 : MatrixParametersBase( comm, var_left, var_right ),
107 d_first_row( first_row ),
108 d_last_row( last_row ),
109 d_first_col( first_col ),
110 d_last_col( last_col ),
111 d_diag( diag ),
112 d_off_diag( off_diag )
113 {
114 }
115
128 explicit RawCSRMatrixParameters( gidx_t first_row,
129 gidx_t last_row,
130 gidx_t first_col,
131 gidx_t last_col,
132 const RawCSRLocalMatrixParameters &diag,
133 const RawCSRLocalMatrixParameters &off_diag,
134 const AMP_MPI &comm,
135 std::shared_ptr<Variable> var_left,
136 std::shared_ptr<Variable> var_right,
138 : MatrixParametersBase( comm, var_left, var_right, backend ),
139 d_first_row( first_row ),
140 d_last_row( last_row ),
141 d_first_col( first_col ),
142 d_last_col( last_col ),
143 d_diag( diag ),
144 d_off_diag( off_diag )
145 {
146 }
147
149 virtual ~RawCSRMatrixParameters() = default;
150
151 std::string type() const override { return "RawCSRMatrixParameters"; }
152
153public: // Write/read restart data
159 void registerChildObjects( AMP::IO::RestartManager *manager ) const override;
160
166 void writeRestart( int64_t fid ) const override;
167
174
175public:
176 // Bulk information
181 // Blockwise information
183};
184} // namespace AMP::LinearAlgebra
185
186#endif
Provides C++ wrapper around MPI routines.
Definition AMP_MPI.h:63
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.
std::string type() const override
type of this object
virtual ~RawCSRMatrixParameters()=default
Destructor.
void registerChildObjects(AMP::IO::RestartManager *manager) const override
Register any child objects.
RawCSRMatrixParameters(gidx_t first_row, gidx_t last_row, gidx_t first_col, gidx_t last_col, const RawCSRLocalMatrixParameters &diag, const RawCSRLocalMatrixParameters &off_diag, const AMP_MPI &comm)
Constructor.
RawCSRMatrixParameters(gidx_t first_row, gidx_t last_row, gidx_t first_col, gidx_t last_col, const RawCSRLocalMatrixParameters &diag, const RawCSRLocalMatrixParameters &off_diag, const AMP_MPI &comm, AMP::Utilities::Backend backend)
Constructor.
RawCSRMatrixParameters(gidx_t first_row, gidx_t last_row, gidx_t first_col, gidx_t last_col, const RawCSRLocalMatrixParameters &diag, const RawCSRLocalMatrixParameters &off_diag, const AMP_MPI &comm, std::shared_ptr< Variable > var_left, std::shared_ptr< Variable > var_right, AMP::Utilities::Backend backend)
Constructor.
void writeRestart(int64_t fid) const override
Write restart data to file.
RawCSRMatrixParameters(int64_t fid, AMP::IO::RestartManager *manager)
Read restart data from file.
RawCSRMatrixParameters(gidx_t first_row, gidx_t last_row, gidx_t first_col, gidx_t last_col, const RawCSRLocalMatrixParameters &diag, const RawCSRLocalMatrixParameters &off_diag, const AMP_MPI &comm, std::shared_ptr< Variable > var_left, std::shared_ptr< Variable > var_right)
Constructor.
Backend
Enum to store the backend used for gpu acceleration.
Definition Backend.h:21



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:40.
Comments on this page