@@ -27,7 +27,9 @@ For example:
27
27
yyyy::Float64
28
28
end
29
29
30
- Do note that `FieldArray` and its derivatives are column major.
30
+ Note that you must define the fields of any `FieldArray` subtype in column major order. If you
31
+ want to use an alternative ordering you will need to pay special attention in providing your
32
+ own definitions of `getindex`, `setindex!` and tuple conversion.
31
33
"""
32
34
abstract type FieldArray{N, T, D} <: StaticArray{N, T, D} end
33
35
@@ -53,7 +55,8 @@ For example:
53
55
zz::Float64
54
56
end
55
57
56
- Do note that `FieldMatrix` and its derivatives are column major. Constructing Stress like this
58
+ Note that the fields of any subtype of `FieldMatrix` must be defined in column major order.
59
+ This means that formatting of constructors for literal `FieldMatrix` can be confusing. For example
57
60
58
61
sigma = Stress(1.0, 2.0, 3.0,
59
62
4.0, 5.0, 6.0,
@@ -65,7 +68,12 @@ Do note that `FieldMatrix` and its derivatives are column major. Constructing St
65
68
3.0 6.0 9.0
66
69
67
70
68
- will give you the transpose of what the multi-argument formatting suggests.
71
+ will give you the transpose of what the multi-argument formatting suggests. For clarity,
72
+ you may consider using the alternative
73
+
74
+ sigma = Stress(@SArray[1.0 2.0 3.0;
75
+ 4.0 5.0 6.0;
76
+ 7.0 8.0 9.0])
69
77
"""
70
78
abstract type FieldMatrix{N1, N2, T} <: FieldArray{Tuple{N1, N2}, T, 2} end
71
79
0 commit comments