This class wraps su2activematrix for the python wrapper matrix interface. It is generaly used to wrap access to solver variables defined for the entire volume.
More...
#include <CPyWrapperMatrixView.hpp>
|
| | CPyWrapperMatrixView ()=default |
| |
| | CPyWrapperMatrixView (su2activematrix &mat, const std::string &name, bool read_only) |
| | Construct the view of the matrix.
|
| |
| std::pair< unsigned long, unsigned long > | Shape () const |
| | Returns the shape of the matrix.
|
| |
| bool | IsReadOnly () const |
| | Returns whether the data is read-only [true] or if it can be modified [false].
|
| |
| passivedouble | operator() (unsigned long row, unsigned long col) const |
| | Gets the value for a (row, column) pair.
|
| |
| std::vector< passivedouble > | operator() (unsigned long row) const |
| | Gets the values for a row of the matrix.
|
| |
| passivedouble | Get (unsigned long row, unsigned long col) const |
| | Gets the value for a (row, column) pair.
|
| |
| std::vector< passivedouble > | Get (unsigned long row) const |
| | Gets the values for a row of the matrix.
|
| |
| void | Set (unsigned long row, unsigned long col, passivedouble val) |
| | Sets the value for a (row, column) pair. This clears derivative information.
|
| |
| void | Set (unsigned long row, std::vector< passivedouble > vals) |
| | Sets the values for a row of the matrix.
|
| |
This class wraps su2activematrix for the python wrapper matrix interface. It is generaly used to wrap access to solver variables defined for the entire volume.
◆ CPyWrapperMatrixView() [1/2]
| CPyWrapperMatrixView::CPyWrapperMatrixView |
( |
| ) |
|
|
default |
◆ CPyWrapperMatrixView() [2/2]
| CPyWrapperMatrixView::CPyWrapperMatrixView |
( |
su2activematrix & |
mat, |
|
|
const std::string & |
name, |
|
|
bool |
read_only |
|
) |
| |
|
inline |
Construct the view of the matrix.
- Note
- "name" should be set to the variable name being returned to give better information to users.
-
"read_only" can be set to true to prevent the data from being modified.
◆ Access() [1/2]
| su2double & CPyWrapperMatrixView::Access |
( |
unsigned long |
row, |
|
|
unsigned long |
col |
|
) |
| |
|
inlineprotected |
◆ Access() [2/2]
| const su2double & CPyWrapperMatrixView::Access |
( |
unsigned long |
row, |
|
|
unsigned long |
col |
|
) |
| const |
|
inlineprotected |
◆ Get() [1/2]
| std::vector< passivedouble > CPyWrapperMatrixView::Get |
( |
unsigned long |
row | ) |
const |
|
inline |
Gets the values for a row of the matrix.
◆ Get() [2/2]
| passivedouble CPyWrapperMatrixView::Get |
( |
unsigned long |
row, |
|
|
unsigned long |
col |
|
) |
| const |
|
inline |
Gets the value for a (row, column) pair.
◆ IsReadOnly()
| bool CPyWrapperMatrixView::IsReadOnly |
( |
| ) |
const |
|
inline |
Returns whether the data is read-only [true] or if it can be modified [false].
◆ operator()() [1/2]
| std::vector< passivedouble > CPyWrapperMatrixView::operator() |
( |
unsigned long |
row | ) |
const |
|
inline |
Gets the values for a row of the matrix.
◆ operator()() [2/2]
| passivedouble CPyWrapperMatrixView::operator() |
( |
unsigned long |
row, |
|
|
unsigned long |
col |
|
) |
| const |
|
inline |
Gets the value for a (row, column) pair.
◆ Set() [1/2]
| void CPyWrapperMatrixView::Set |
( |
unsigned long |
row, |
|
|
std::vector< passivedouble > |
vals |
|
) |
| |
|
inline |
Sets the values for a row of the matrix.
◆ Set() [2/2]
| void CPyWrapperMatrixView::Set |
( |
unsigned long |
row, |
|
|
unsigned long |
col, |
|
|
passivedouble |
val |
|
) |
| |
|
inline |
Sets the value for a (row, column) pair. This clears derivative information.
◆ Shape()
| std::pair< unsigned long, unsigned long > CPyWrapperMatrixView::Shape |
( |
| ) |
const |
|
inline |
Returns the shape of the matrix.
◆ cols_
| unsigned long CPyWrapperMatrixView::cols_ = 0 |
|
protected |
◆ data_
| su2double* CPyWrapperMatrixView::data_ = nullptr |
|
protected |
◆ name_
| std::string CPyWrapperMatrixView::name_ |
|
protected |
◆ read_only_
| bool CPyWrapperMatrixView::read_only_ = false |
|
protected |
◆ rows_
| unsigned long CPyWrapperMatrixView::rows_ = 0 |
|
protected |
The documentation for this class was generated from the following file: