general quaternion math, not limited to unit quaternions More...
Data Types | |
interface | abs |
interface | aimag |
interface | assignment(=) |
interface | conjg |
interface | dot_product |
interface | exp |
interface | log |
interface | quaternion |
interface | real |
Functions/Subroutines | |
subroutine, public | quaternions_init |
do self test More... | |
type(quaternion) pure function | init__ (array) |
construct a quaternion from a 4-vector More... | |
elemental pure subroutine | assign_quat__ (self, other) |
assign a quaternion More... | |
pure subroutine | assign_vec__ (self, other) |
assign a 4-vector More... | |
type(quaternion) elemental pure function | add__ (self, other) |
add a quaternion More... | |
type(quaternion) elemental pure function | pos__ (self) |
return (unary positive operator) More... | |
type(quaternion) elemental pure function | sub__ (self, other) |
subtract a quaternion More... | |
type(quaternion) elemental pure function | neg__ (self) |
negate (unary negative operator) More... | |
type(quaternion) elemental pure function | mul_quat__ (self, other) |
multiply with a quaternion More... | |
type(quaternion) elemental pure function | mul_scal__ (self, scal) |
multiply with a scalar More... | |
type(quaternion) elemental pure function | div_quat__ (self, other) |
divide by a quaternion More... | |
type(quaternion) elemental pure function | div_scal__ (self, scal) |
divide by a scalar More... | |
logical elemental pure function | eq__ (self, other) |
test equality More... | |
logical elemental pure function | neq__ (self, other) |
test inequality More... | |
type(quaternion) elemental pure function | pow_quat__ (self, expon) |
raise to the power of a quaternion More... | |
type(quaternion) elemental pure function | pow_scal__ (self, expon) |
raise to the power of a scalar More... | |
type(quaternion) elemental pure function | exp__ (a) |
take exponential More... | |
type(quaternion) elemental pure function | log__ (a) |
take logarithm More... | |
real(preal) elemental pure function | abs__ (self) |
return norm More... | |
real(preal) elemental pure function | dot_product__ (a, b) |
calculate dot product More... | |
type(quaternion) elemental pure function | conjg__ (self) |
take conjugate complex More... | |
type(quaternion) elemental pure function | homomorphed (self) |
homomorph More... | |
pure real(preal) function, dimension(4) | asarray (self) |
return as plain array More... | |
pure real(preal) function | real__ (self) |
real part (scalar) More... | |
pure real(preal) function, dimension(3) | aimag__ (self) |
imaginary part (3-vector) More... | |
type(quaternion) elemental pure function | inverse (self) |
inverse More... | |
subroutine | unittest |
check correctness of some quaternions functions More... | |
Variables | |
real(preal), parameter, public | p = -1.0_pReal |
parameter for orientation conversion. More... | |
general quaternion math, not limited to unit quaternions
w is the real part, (x, y, z) are the imaginary parts.
|
private |
return norm
Definition at line 4180 of file DAMASK_marc.f90.
|
private |
add a quaternion
Definition at line 3986 of file DAMASK_marc.f90.
Referenced by quaternions::quaternion::operator().
|
private |
imaginary part (3-vector)
Definition at line 4254 of file DAMASK_marc.f90.
|
private |
return as plain array
Definition at line 4228 of file DAMASK_marc.f90.
|
private |
assign a quaternion
Definition at line 3957 of file DAMASK_marc.f90.
|
private |
assign a 4-vector
Definition at line 3970 of file DAMASK_marc.f90.
|
private |
take conjugate complex
Definition at line 4204 of file DAMASK_marc.f90.
|
private |
divide by a quaternion
Definition at line 4064 of file DAMASK_marc.f90.
Referenced by quaternions::quaternion::operator().
|
private |
divide by a scalar
Definition at line 4076 of file DAMASK_marc.f90.
Referenced by quaternions::quaternion::operator().
|
private |
calculate dot product
Definition at line 4192 of file DAMASK_marc.f90.
|
private |
test equality
Definition at line 4089 of file DAMASK_marc.f90.
Referenced by quaternions::quaternion::operator().
|
private |
take exponential
Definition at line 4140 of file DAMASK_marc.f90.
|
private |
homomorph
Definition at line 4216 of file DAMASK_marc.f90.
|
private |
construct a quaternion from a 4-vector
Definition at line 3942 of file DAMASK_marc.f90.
|
private |
inverse
Definition at line 4267 of file DAMASK_marc.f90.
Referenced by unittest().
|
private |
take logarithm
Definition at line 4160 of file DAMASK_marc.f90.
|
private |
multiply with a quaternion
Definition at line 4036 of file DAMASK_marc.f90.
References p.
Referenced by quaternions::quaternion::operator().
|
private |
multiply with a scalar
Definition at line 4051 of file DAMASK_marc.f90.
Referenced by quaternions::quaternion::operator().
|
private |
negate (unary negative operator)
Definition at line 4024 of file DAMASK_marc.f90.
Referenced by quaternions::quaternion::operator().
|
private |
test inequality
Definition at line 4102 of file DAMASK_marc.f90.
Referenced by quaternions::quaternion::operator().
|
private |
return (unary positive operator)
Definition at line 3999 of file DAMASK_marc.f90.
Referenced by quaternions::quaternion::operator().
|
private |
raise to the power of a quaternion
Definition at line 4114 of file DAMASK_marc.f90.
Referenced by quaternions::quaternion::operator().
|
private |
raise to the power of a scalar
Definition at line 4127 of file DAMASK_marc.f90.
Referenced by quaternions::quaternion::operator().
subroutine, public quaternions::quaternions_init |
do self test
Definition at line 3931 of file DAMASK_marc.f90.
References prec::unittest().
Referenced by rotations::rotations_init().
|
private |
real part (scalar)
Definition at line 4241 of file DAMASK_marc.f90.
|
private |
subtract a quaternion
Definition at line 4011 of file DAMASK_marc.f90.
Referenced by quaternions::quaternion::operator().
|
private |
check correctness of some quaternions functions
Definition at line 4279 of file DAMASK_marc.f90.
References inverse().
real(preal), parameter, public quaternions::p = -1.0_pReal |
parameter for orientation conversion.
Definition at line 3833 of file DAMASK_marc.f90.
Referenced by rotations::ax2om(), rotations::ax2ro(), rotations::eu2ax(), rotations::eu2qu(), rotations::eu2ro(), mul_quat__(), rotations::om2ax(), rotations::qu2eu(), rotations::qu2om(), rotations::qu2ro(), and rotations::rottensor4().