SheafSystem  0.0.0.0
fiber_bundle::sec_ed_algebra Namespace Reference

Namespace containing the algrebra functions for a a section of a fiber bundle with a fiber type ed. More...

Functions

SHEAF_DLL_SPEC void dot (const sec_ed &x0, const sec_ed &x1, sec_at0 &xresult, bool xauto_access)
 The Euclidean "dot" product of x0 with x2. More...
 
SHEAF_DLL_SPEC void length (const sec_ed &x0, sec_at0 &xresult, bool xauto_access)
 The Euclidean length (magnitude) of x0. More...
 
SHEAF_DLL_SPEC void put_length (sec_ed &x0, const vd_value_type &xlength, bool xauto_access)
 Set the Euclidean length (magnitude) of x0 to xlength. More...
 
SHEAF_DLL_SPEC void normalize (const sec_ed &x0, sec_ed &xresult, bool xauto_access)
 Normalize x0 (convert to a unit vector). More...
 
SHEAF_DLL_SPEC void normalize (sec_ed &x0, bool xauto_access)
 Normalize x0 (convert to a unit vector) in place; synonym for normalize(x0, x0, xauto_access). More...
 

Detailed Description

Namespace containing the algrebra functions for a a section of a fiber bundle with a fiber type ed.

Function Documentation

◆ dot()

void fiber_bundle::sec_ed_algebra::dot ( const sec_ed x0,
const sec_ed x1,
sec_at0 xresult,
bool  xauto_access 
)

The Euclidean "dot" product of x0 with x2.

Precondition
  • x0.state_is_auto_read_accessible(xauto_access)
  • x1.state_is_auto_read_accessible(xauto_access)
  • xresult.state_is_auto_read_write_accessible(xauto_access)
  • x0.is_same_type(&x1)
  • x0.is_p_form(xauto_access) == x1.is_p_form(xauto_access)

Definition at line 688 of file sec_ed.cc.

References fiber_bundle::sec_vd_algebra::binary_op(), fiber_bundle::sec_atp::is_p_form(), sheaf::any::is_same_type(), length(), sheaf::read_write_monitor_handle::state_is_auto_read_accessible(), and sheaf::read_write_monitor_handle::state_is_auto_read_write_accessible().

Referenced by fields::field_ed_algebra::dot(), and fiber_bundle::sec_ed::invariant().

◆ length()

void fiber_bundle::sec_ed_algebra::length ( const sec_ed x0,
sec_at0 xresult,
bool  xauto_access 
)

The Euclidean length (magnitude) of x0.

Precondition
  • x0.state_is_auto_read_accessible(xauto_access)
  • xresult.state_is_auto_read_write_accessible(xauto_access)

Definition at line 712 of file sec_ed.cc.

References put_length(), sheaf::read_write_monitor_handle::state_is_auto_read_accessible(), sheaf::read_write_monitor_handle::state_is_auto_read_write_accessible(), and fiber_bundle::sec_vd_algebra::unary_op().

Referenced by dot(), and fields::field_ed_algebra::length().

◆ normalize() [1/2]

void fiber_bundle::sec_ed_algebra::normalize ( const sec_ed x0,
sec_ed xresult,
bool  xauto_access 
)

Normalize x0 (convert to a unit vector).

Todo:
: Implement. Need a new unary_op?
Precondition
  • x0.state_is_auto_read_accessible(xauto_access)
  • xresult.state_is_auto_read_write_accessible(xauto_access)
  • x0.is_same_type(&xresult)
  • x0.is_p_form(xauto_access) == xresult.is_p_form(xauto_access)
Postcondition
  • xresult.is_p_form(xauto_access) == x0.is_p_form(xauto_access)
  • -unexecutable( "length(xresult, xauto_access) == 1.0" )

Definition at line 778 of file sec_ed.cc.

References fiber_bundle::sec_atp::is_p_form(), sheaf::any::is_same_type(), sheaf::read_write_monitor_handle::state_is_auto_read_accessible(), sheaf::read_write_monitor_handle::state_is_auto_read_write_accessible(), and fiber_bundle::sec_vd_algebra::unary_op().

Referenced by fields::field_ed_algebra::normalize(), and put_length().

◆ normalize() [2/2]

void fiber_bundle::sec_ed_algebra::normalize ( sec_ed x0,
bool  xauto_access 
)

Normalize x0 (convert to a unit vector) in place; synonym for normalize(x0, x0, xauto_access).

Precondition
  • precondition_of(normalize(x0, x0, xauto_access))
Postcondition
  • postcondition_of(normalize(x0, x0, xauto_access))

Definition at line 803 of file sec_ed.cc.

References fiber_bundle::ed_algebra::normalize().

◆ put_length()

void fiber_bundle::sec_ed_algebra::put_length ( sec_ed x0,
const vd_value_type xlength,
bool  xauto_access 
)

Set the Euclidean length (magnitude) of x0 to xlength.

Precondition
  • x0.state_is_auto_read_accessible(xauto_access)
  • xlength >= 0.0
Postcondition
  • -unexecutable( "length(x0, xauto_access) == xlength" )

Definition at line 733 of file sec_ed.cc.

References normalize(), sheaf::read_write_monitor_handle::state_is_auto_read_accessible(), and fiber_bundle::sec_vd_algebra::unary_op().

Referenced by length(), and fields::field_ed_algebra::put_length().