mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-12 20:27:06 +01:00
No compile make tests fix
This commit is contained in:
@ -156,11 +156,18 @@ class iScalar {
|
||||
|
||||
// convert from a something to a scalar via constructor of something arg
|
||||
template <class T, typename std::enable_if<!isGridTensor<T>::value, T>::type * = nullptr>
|
||||
strong_inline iScalar<vtype> operator=(T arg) {
|
||||
strong_inline iScalar<vtype> operator=(T arg) {
|
||||
_internal = arg;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Convert elements
|
||||
template <class ttype>
|
||||
strong_inline iScalar<vtype> operator=(iScalar<ttype> &&arg) {
|
||||
_internal = arg._internal;
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend std::ostream &operator<<(std::ostream &stream,const iScalar<vtype> &o) {
|
||||
stream << "S {" << o._internal << "}";
|
||||
return stream;
|
||||
|
@ -80,8 +80,11 @@ template<class vtype, int N> inline iVector<vtype, N> Exponentiate(const iVector
|
||||
mat iQ2 = arg*arg*alpha*alpha;
|
||||
mat iQ3 = arg*iQ2*alpha;
|
||||
// sign in c0 from the conventions on the Ta
|
||||
c0 = -imag( trace(iQ3) ) * one_over_three;
|
||||
c1 = -real( trace(iQ2) ) * one_over_two;
|
||||
scalar imQ3, reQ2;
|
||||
imQ3 = imag( trace(iQ3) );
|
||||
reQ2 = real( trace(iQ2) );
|
||||
c0 = -imQ3 * one_over_three;
|
||||
c1 = -reQ2 * one_over_two;
|
||||
|
||||
// Cayley Hamilton checks to machine precision, tested
|
||||
tmp = c1 * one_over_three;
|
||||
|
Reference in New Issue
Block a user