Commit graph

9 commits

Author SHA1 Message Date
Henry Weller
983b3e2ca4 VectorSpaces, MatrixSpaces: Allow automatic conversion from zero 2016-03-22 10:35:57 +00:00
Henry Weller
c55d554050 VectorSpaces and MatrixSpaces: Added construction from and assignment to zero 2016-03-22 08:25:50 +00:00
Henry Weller
3ba1d17660 MatrixSpace: 2D (i-j) specialization of VectorSpace
Provides '(i, j)' element access and general forms of inner and outer
products, transpose etc. for square and rectangular VectorSpaces.

VectorSpaces default to be column-vectors as before whereas row-vectors
may be represented as 1xn MatrixSpaces.  In the future it may be
preferable to create a specializations of VectorSpace for column- and
maybe row-vectors but it would add complexity to MatrixSpace to handle
all the type combinations.

Tensor is now a 3x3 specialization of MatrixSpace.

Sub-block const and non-const access is provided via the
'.block<SubTensor, RowStart, ColStart>()' member functions.  Consistent
sub-block access is also provide for VectorSpace so that columns of
MatrixSpaces may be accessed and substituted.

These new classes will be used to create a more extensive set of
primitive vector and tensor types over the next few weeks.

Henry G. Weller
CFD Direct
2016-03-12 10:41:18 +00:00
Henry Weller
f2b111e203 src/OpenFOAM: changed template rank type from int to Foam::direction
Foam::direction is an unsigned type which makes it easier for the
compiler to pickup and report errors in the instantiation of
VectorSpaces and associated types.
2016-03-09 10:10:28 +00:00
Henry Weller
45d092f2e0 src/OpenFOAM/primitives: Moved the standard static data members for vector and tensor types into VectorSpace
This simplifies the code easing maintenance and the addition of other
VectorSpace types.
2016-03-08 10:57:41 +00:00
Henry Weller
4db6b030e2 Tensor: Added inv() member function 2016-03-07 15:25:27 +00:00
Henry Weller
6f188f9ed2 Tensor: Added operator&= 2016-03-06 19:05:14 +00:00
Henry Weller
94c05a1e6c Update code to use the simpler C++11 template syntax removing spaces between closing ">"s 2016-01-10 22:41:16 +00:00
Henry
446e5777f0 Add the OpenFOAM source tree 2014-12-10 22:40:10 +00:00