24 #ifndef SHEAF_DLL_SPEC_H 25 #include "SheafSystem/sheaf_dll_spec.h" 29 #include "SheafSystem/tp.h" 42 template <
typename T0>
43 typename tensor_traits<T0::P, typename T0::vector_space_type>::atp_type*
48 require(precondition_of(
alt(x0, *result)));
52 typedef typename T0::vector_space_type VST;
56 reinterpret_cast<return_type*
>(x0.atp_prototype(x0.p()).clone());
64 ensure(postcondition_of(
alt(x0, *result)));
71 template <
typename T0>
77 require(precondition_of(
sym(x0, *result)));
81 typedef typename T0::vector_space_type VST;
85 reinterpret_cast<return_type*
>(x0.stp_prototype(x0.p()).clone());
92 ensure(postcondition_of(
sym(x0, *result)));
100 template <
typename T0>
102 alt(
const T0& x0,
bool xauto_access)
106 require(precondition_of(
alt(x0, *result, xauto_access)));
110 typedef typename T0::vector_space_type VST;
113 return_type* result =
114 reinterpret_cast<return_type*
>(x0.new_atp(x0.p(xauto_access), xauto_access));
116 alt(x0, *result, xauto_access);
121 ensure(postcondition_of(
alt(x0, *result, xauto_access)));
129 template <
typename T0>
131 sym(
const T0& x0,
bool xauto_access)
135 require(precondition_of(
sym(x0, *result, xauto_access)));
139 typedef typename T0::vector_space_type VST;
142 return_type* result =
143 reinterpret_cast<return_type*
>(x0.new_stp(x0.p(xauto_access), xauto_access));
145 sym(x0, *result, xauto_access);
150 ensure(postcondition_of(
sym(x0, *result, xauto_access)));
157 template <
typename T0,
typename T1>
163 require(precondition_of(
tensor(x0, x1, *result)));
167 typedef typename T0::vector_space_type VST;
170 return_type* result =
171 reinterpret_cast<return_type*
>(x0.tp_prototype(x0.p() + x1.p()).clone());
178 ensure(postcondition_of(
tensor(x0, x1, *result)));
185 template <
typename T0,
typename T1>
187 tensor(
const T0& x0,
const T1& x1,
bool xauto_access)
191 require(precondition_of(
tensor(x0, x1, *result, xauto_access)));
195 typedef typename T0::vector_space_type VST;
198 return_type* result =
199 reinterpret_cast<return_type*
>(x0.new_tp(x0.p(xauto_access) + x1.p(xauto_access),
202 tensor(x0, x1, *result, xauto_access);
207 ensure(postcondition_of(
tensor(x0, x1, *result, xauto_access)));
218 #endif // ifndef TP_IMPL_H SHEAF_DLL_SPEC void alt(const t2_lite &x0, at2_lite &xresult)
The alternating (antisymmetric) part of tensor x0 (pre-allocated version for volatile types)...
SHEAF_DLL_SPEC void sym(const t2_lite &x0, st2_lite &xresult)
The symmetric part of tensor x0 (pre-allocated version for volatile types).
Tensor types of degree P over VECTOR_TYPE. No generic implementation defined, must be specialized for...
SHEAF_DLL_SPEC void tensor(const at1_lite &x0, const at1_lite &x1, t2_lite &xresult)
Tensor product (pre-allocated version for volatile types).
Namespace for the fiber_bundles component of the sheaf system.