30 template<
class MatrixType>
36 <<
"Number of columns " << nCols_ <<
" != 1" 44 f[i] = operator()(i, 0);
51 template<
class MatrixType>
57 <<
"Number of columns " << nCols_ <<
" != 1" 65 f[i] = operator()(i, 0);
74 template<
class MatrixType>
81 if (mRows_ != Mb.m() || nCols_ != Mb.n())
84 <<
"Attempt to assign blocks of different sizes: " 85 << mRows_ <<
"x" << nCols_ <<
" != " 86 << Mb.m() <<
"x" << Mb.n()
90 for (
label i=0; i<mRows_; i++)
92 for (
label j=0; j<nCols_; j++)
94 (*this)(i, j) = Mb(i, j);
100 template<
class MatrixType>
108 if (mRows_ != Mb.m() || nCols_ != Mb.n())
111 <<
"Attempt to assign blocks of different sizes: " 112 << mRows_ <<
"x" << nCols_ <<
" != " 113 << Mb.m() <<
"x" << Mb.n()
117 for (
label i=0; i<mRows_; i++)
119 for (
label j=0; j<nCols_; j++)
121 (*this)(i, j) = Mb(i, j);
128 template<
class MatrixType>
136 if (mRows_ != Mb.m() || nCols_ != Mb.n())
139 <<
"Attempt to assign blocks of different sizes: " 140 << mRows_ <<
"x" << nCols_ <<
" != " 141 << Mb.m() <<
"x" << Mb.n()
145 for (
label i=0; i<mRows_; i++)
147 for (
label j=0; j<nCols_; j++)
149 (*this)(i, j) = Mb(i, j);
156 template<
class MatrixType>
157 template<
class MatrixType2>
165 if (mRows_ != Mb.m() || nCols_ != Mb.n())
168 <<
"Attempt to assign blocks of different sizes: " 169 << mRows_ <<
"x" << nCols_ <<
" != " 170 << Mb.m() <<
"x" << Mb.n()
174 for (
label i=0; i<mRows_; i++)
176 for (
label j=0; j<nCols_; j++)
178 (*this)(i, j) = Mb(i, j);
185 template<
class MatrixType>
186 template<
class MatrixType2>
194 if (mRows_ != Mb.m() || nCols_ != Mb.n())
197 <<
"Attempt to assign blocks of different sizes: " 198 << mRows_ <<
"x" << nCols_ <<
" != " 199 << Mb.m() <<
"x" << Mb.n()
203 for (
label i=0; i<mRows_; i++)
205 for (
label j=0; j<nCols_; j++)
207 (*this)(i, j) = Mb(i, j);
214 template<
class MatrixType>
217 template<
class, Foam::direction, Foam::direction>
class MSBlock,
224 const MSBlock<SubTensor, BRowStart, BColStart>& Mb
227 if (mRows_ != Mb.mRows || nCols_ != Mb.nCols)
230 <<
"Attempt to assign blocks of different sizes: " 231 << mRows_ <<
"x" << nCols_ <<
" != " 232 << Mb.mRows <<
"x" << Mb.nCols
240 operator()(i, j) = Mb(i, j);
246 template<
class MatrixType>
249 template<
class, Foam::direction>
class VSBlock,
255 const VSBlock<SubVector, BStart>& Mb
258 if (mRows_ != Mb.nComponents || nCols_ != 1)
261 <<
"Attempt to assign blocks of different sizes: " 262 << mRows_ <<
"x" << nCols_ <<
" != " 263 << Mb.nComponents <<
"x" << 1
269 operator()(i, 0) = Mb[i];
274 template<
class MatrixType>
275 template<
class MSForm, Foam::direction Nrows, Foam::direction Ncols>
281 if (mRows_ != Nrows || nCols_ != Ncols)
284 <<
"Attempt to assign blocks of different sizes: " 285 << mRows_ <<
"x" << nCols_ <<
" != " 286 << Nrows <<
"x" << Ncols
290 for (
label i=0; i<mRows_; i++)
292 for (
label j=0; j<nCols_; j++)
294 (*this)(i, j) = ms(i, j);
300 template<
class MatrixType>
301 template<
class VSForm, Foam::direction Ncmpts>
307 if (mRows_ != Ncmpts || nCols_ != 1)
310 <<
"Attempt to assign blocks of different sizes: " 311 << mRows_ <<
"x" << nCols_ <<
" != " 312 << Ncmpts <<
"x" << 1
318 operator()(i, 0) = ms[i];
323 template<
class MatrixType>
326 if (mRows_ != f.
size() || nCols_ != 1)
329 <<
"Error: cannot assign blocks of different size (left is " 330 << mRows_ <<
"x" << nCols_ <<
" != " 331 << f.
size() <<
"x" << 1
337 operator()(i, 0) = f[i];
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
void operator=(const Matrix< Form, cmptType > &)
Assignment to a compatible matrix.
A templated block of an (m x n) matrix of type <MatrixType>.
Pre-declare SubField and related Field type.
errorManip< error > abort(error &err)
A templated (m x n) matrix of objects of <T>.