24 #ifndef SHEAF_DLL_SPEC_H 25 #include "SheafSystem/sheaf_dll_spec.h" 28 #ifndef ASSERT_CONTRACT_H 29 #include "SheafSystem/assert_contract.h" 33 #include "SheafSystem/vd.h" 54 static const std::string result(
"vd_row_dofs_type");
58 ensure(!result.empty());
76 T& result =
reinterpret_cast<T*
>(
this)[xindex];
96 const T& result =
reinterpret_cast<const T*
>(
this)[xindex];
105 template <
typename T>
142 template <
typename T>
143 T*
add(
const T& x0,
const T& x1)
147 require(precondition_of(x0.clone()));
148 require(precondition_of(
add(x0, x1, *result)));
152 T* result = x0.clone();
154 add(x0, x1, *result);
159 ensure(postcondition_of(x0.clone()));
160 ensure(postcondition_of(
add(x0, x1, *result)));
167 template <
typename T>
172 require(precondition_of(
add(xresult, xother, xresult)));
176 add(xresult, xother, xresult);
180 ensure(postcondition_of(
add(xresult, xother, xresult)));
187 #ifndef DOXYGEN_SKIP_IMPLEMENTATIONS 189 template <
typename T>
194 require(precondition_of(result =
add(x0, x1)));
198 T* result =
add(x0, x1);
202 ensure(postcondition_of(result =
add(x0, x1)));
209 template <
typename T>
214 require(precondition_of(
add_equal(xresult, xother)));
222 ensure(postcondition_of(
add_equal(xresult, xother)));
229 #endif // ifndef DOXYGEN_SKIP_IMPLEMENTATIONS 237 template <
typename T>
242 require(precondition_of(x0.clone()));
243 require(precondition_of(
subtract(x0, x1, *result)));
247 T* result = x0.clone();
254 ensure(postcondition_of(x0.clone()));
255 ensure(postcondition_of(
subtract(x0, x1, *result)));
262 template <
typename T>
267 require(precondition_of(
subtract(xresult, xother, xresult)));
275 ensure(postcondition_of(
subtract(xresult, xother, xresult)));
282 #ifndef DOXYGEN_SKIP_IMPLEMENTATIONS 284 template <
typename T>
289 require(precondition_of(result =
subtract(x0, x1)));
297 ensure(postcondition_of(result =
subtract(x0, x1)));
304 template <
typename T>
324 #endif // ifndef DOXYGEN_SKIP_IMPLEMENTATIONS 334 #ifndef DOXYGEN_SKIP_IMPLEMENTATIONS 336 template <
typename T>
341 require(precondition_of(
multiply(x0, x1, result)));
345 T* result = x0.clone();
351 ensure(postcondition_of(
multiply(x0, x1, *result)));
358 template <
typename T>
363 require(precondition_of(
multiply(xresult, x1, xresult)));
371 ensure(postcondition_of(
multiply(xresult, x1, xresult)));
378 template <
typename T>
394 template <
typename T>
410 #endif // ifndef DOXYGEN_SKIP_IMPLEMENTATIONS 417 template <
typename T>
422 require(precondition_of(
divide(x0, x1, result)));
426 T* result = x0.clone();
432 ensure(postcondition_of(
divide(x0, x1, *result)));
439 template <
typename T>
444 require(precondition_of(
divide(xresult, x1, xresult)));
448 divide(xresult, x1, xresult);
452 ensure(postcondition_of(
divide(xresult, x1, xresult)));
459 template <
typename T>
466 T* result =
divide(x0, x1);
475 template <
typename T>
495 #endif // ifndef VD_IMPL_H T & operator*=(T &xresult, const vd_value_type &x1)
Vector x0 *= scalar x1 (self-allocated for volatile types); synonym for multiply_equal(x0, x1).
SHEAF_DLL_SPEC void add(const e3_lite &x0, const e3_lite &x1, vd_value_type xt, e3_lite &xresult)
Weighted sum x0*(1-xt) + x1*xt (pre-allocated version for volatile types).
row_dofs_type * clone() const
Creates a new instance of the same type as this.
T & operator-=(T &xresult, const T &xother)
x0 -= x1 (self-allocated for volatile types); synonym for subtract_equal(x0, x1). ...
static const std::string & static_class_name()
The name of this class.
T * operator/(const T &x0, const vd_value_type &x1)
Vector x0 / scalar x1 (auto-allocated for volatile types); synonym for divide(x0, x1)...
T & operator+=(T &xresult, const T &xother)
x0 += x1 (self-allocated for volatile types); synonym for add_equal(x0, x1).
SHEAF_DLL_SPEC void subtract(const vd &x0, const vd &x1, vd &xresult, bool xauto_access)
x0 subtract x1 (pre-allocated version for persistent types).
SHEAF_DLL_SPEC void divide_equal(vd &xresult, const vd_value_type &xother, bool xauto_access)
Vector x0 divided by scalar x1 (self-allocated version for persistent types); synonym for divide(xres...
T * operator+(const T &x0, const T &x1)
x0 + x1 (auto-allocated for volatile types); synonym for add(x0, x1).
T & operator/=(T &xresult, const vd_value_type &x1)
Vector x0 /= scalar x1 (self-allocated for volatile types); synonym for divide_equal(x0, x1).
SHEAF_DLL_SPEC void multiply_equal(vd &xresult, const vd_value_type &xother, bool xauto_access)
Vector x0 multiplied by scalar x1 (self-allocated version for persistent types); synonym for multiply...
SHEAF_DLL_SPEC void divide(const vd &x0, const vd_value_type &x1, vd &xresult, bool xauto_access)
Vector x0 divided by scalar x1 (pre-allocated version for persistent types).
T * operator-(const T &x0, const T &x1)
x0 - x1 (auto-allocated for volatile types); synonym for subtract(x0, x1).
T * operator*(const T &x0, const vd_value_type &x1)
Vector x0 * scalar x1 (auto-allocated for volatile types); synonym for multiply(x0, x1).
T & operator[](int xindex)
Value of xindex-th component (row dof) (non const version).
SHEAF_DLL_SPEC void add_equal(vd &xresult, const vd &xother, bool xauto_access)
x0 add x1 (self-allocated version for persistent types); synonym for add(xresult, xother...
SHEAF_DLL_SPEC void multiply(const vd &x0, const vd_value_type &x1, vd &xresult, bool xauto_access)
Vector x0 multiplied by scalar x1 (pre-allocated version for persistent types).
SHEAF_DLL_SPEC void subtract_equal(vd &xresult, const vd &xother, bool xauto_access)
x0 subtract_equal x1 (self-allocated version for persistent types); synonym for subtract(xresult, xother, xresult, xauto_access).
Namespace for the fiber_bundles component of the sheaf system.
Row dofs type for class vd.
double vd_value_type
The type of component in the fiber; the scalar type in the fiber vector space.