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