mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
MatrixSpace::Block: Added "dereference" operator for conversion to sub-tensor
This commit is contained in:
@ -117,6 +117,9 @@ public:
|
||||
//- Construct for the given matrix
|
||||
inline ConstBlock(const msType& matrix);
|
||||
|
||||
//- Construct and return the sub-ensor corresponding to this block
|
||||
inline SubTensor operator()() const;
|
||||
|
||||
//- (i, j) const element access operator
|
||||
inline const Cmpt& operator()
|
||||
(
|
||||
@ -178,6 +181,9 @@ public:
|
||||
const VectorSpace<VSForm, Cmpt, SubTensor::nRows>& v
|
||||
);
|
||||
|
||||
//- Construct and return the sub-ensor corresponding to this block
|
||||
inline SubTensor operator()() const;
|
||||
|
||||
//- (i, j) const element access operator
|
||||
inline const Cmpt& operator()
|
||||
(
|
||||
|
||||
@ -359,6 +359,17 @@ inline Cmpt& Foam::MatrixSpace<Form, Cmpt, Nrows, Ncols>::operator()
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, Foam::direction Nrows, Foam::direction Ncols>
|
||||
template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
|
||||
inline SubTensor
|
||||
Foam::MatrixSpace<Form, Cmpt, Nrows, Ncols>::
|
||||
ConstBlock<SubTensor, BRowStart, BColStart>::
|
||||
operator()() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, Foam::direction Nrows, Foam::direction Ncols>
|
||||
template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
|
||||
inline const Cmpt&
|
||||
@ -370,6 +381,17 @@ operator()(const direction i, const direction j) const
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, Foam::direction Nrows, Foam::direction Ncols>
|
||||
template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
|
||||
inline SubTensor
|
||||
Foam::MatrixSpace<Form, Cmpt, Nrows, Ncols>::
|
||||
Block<SubTensor, BRowStart, BColStart>::
|
||||
operator()() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
template<class Form, class Cmpt, Foam::direction Nrows, Foam::direction Ncols>
|
||||
template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
|
||||
inline const Cmpt&
|
||||
|
||||
Reference in New Issue
Block a user