43 template<
class MatrixType>
54 template<
class MatrixType>
84 <<
"Attempt to construct a square matrix "
85 << m <<
" x " <<
n <<
nl
102 this->operator()(i, i) = Type(
I);
119 template<
class InputIterator>
135 std::initializer_list<Type> lst
152 std::initializer_list<std::initializer_list<Type>> lstLst
157 if (this->m() != this->
n())
160 <<
"Attempt to construct a square matrix from a rectangular matrix "
161 << this->m() <<
" x " << this->
n() <<
nl
175 if (this->
m() != this->
n())
178 <<
"Attempt to construct a square matrix from a rectangular matrix "
179 << this->
m() <<
" x " << this->
n() <<
nl
229 for (
label i=0; i<this->
n(); i++)
231 this->operator()(i, i) = Type(
I);
252 for (
label i=0; i<f1f2T.
m(); i++)
254 for (
label j=0; j<f1f2T.
n(); j++)
256 f1f2T(i, j) = f1[i]*f2[j];
Pre-declare SubField and related Field type.
Templated identity and dual space identity tensors derived from SphericalTensor.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void size(const label)
Override size to be inconsistent with allocated storage.
A templated block of an (m x n) matrix of type <MatrixType>.
A templated (m x n) matrix of objects of <T>.
label n() const
Return the number of columns.
label m() const
Return the number of rows.
A templated 2D rectangular m x n matrix of objects of <Type>.
A templated 2D square matrix of objects of <T>, where the n x n matrix dimension is known and used fo...
SquareMatrix()
Null constructor.
autoPtr< SquareMatrix< Type > > clone() const
Clone.
void setSize(const label m)
Resize the matrix preserving the elements.
void shallowResize(const label m)
Resize the matrix without reallocating storage (unsafe)
void operator=(const zero)
Assignment of all elements to zero.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
static const Identity< scalar > I
labelList first(const UList< labelPair > &p)
Foam::SquareMatrix< Type > symmOuter(const Field< Type > &f1, const Field< Type > &f2)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
points setSize(newPointi)