mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improvements, modernization of matrix containers (#1220)
- add iterators, begin/end, empty() methods for STL behaviour.
Use standard algorithms where possible
* std::fill, std::copy
* std::min_element, std::max_element
- access methods consistent with other OpenFOAM containers:
* data(), cdata(), uniform()
- Use ListPolicy to impose output line breaks
- Can recover matrix storage for re-use elsewhere.
For example, to populate values with 2D i-j addressing and later
release it as flat linear storage.
- construct/assign moveable
- added minMax() function for Matrix
- additional inplace +=, -=, *=, /= operations
- add named methods at() and rowData() to Matrix.
Allows a better distinction between linear and row-based addressing
- low-level matrix solve on List/UList instead of Field
This commit is contained in:
committed by
Andrew Heather
parent
f8a70115fd
commit
061eb53fb5
@ -77,27 +77,30 @@ public:
|
||||
inline RectangularMatrix(const MatrixBlock<MatrixType>&);
|
||||
|
||||
//- Construct with given number of rows and columns
|
||||
// initializing all elements to zero
|
||||
//- initializing all elements to zero
|
||||
inline RectangularMatrix(const label m, const label n, const zero);
|
||||
|
||||
//- Construct with given number of rows and columns
|
||||
// and value for all elements.
|
||||
inline RectangularMatrix(const label m, const label n, const Type&);
|
||||
//- and value for all elements.
|
||||
inline RectangularMatrix(const label m, const label n, const Type& val);
|
||||
|
||||
//- Construct as copy of a square matrix
|
||||
inline RectangularMatrix(const SquareMatrix<Type>&);
|
||||
inline RectangularMatrix(const SquareMatrix<Type>& mat);
|
||||
|
||||
//- Construct from Istream.
|
||||
inline RectangularMatrix(Istream&);
|
||||
inline RectangularMatrix(Istream& is);
|
||||
|
||||
//- Clone
|
||||
inline autoPtr<RectangularMatrix<Type>> clone() const;
|
||||
|
||||
|
||||
// Member operators
|
||||
// Member Operators
|
||||
|
||||
//- Assignment of all elements to zero
|
||||
void operator=(const zero);
|
||||
|
||||
//- Assignment of all elements to the given value
|
||||
void operator=(const Type& val);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user