1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-14 22:07:05 +01:00

Conjugate residual algorithm; some more unary functions

This commit is contained in:
Peter Boyle
2015-06-08 12:04:59 +01:00
parent 0cf2037ae1
commit d6f1ddf99c
38 changed files with 1116 additions and 79 deletions

View File

@ -123,6 +123,13 @@ public:
typedef iScalar<tensor_reduced_v> tensor_reduced;
typedef iVector<recurse_scalar_object,N> scalar_object;
template<class T,typename std::enable_if<!isGridTensor<T>::value, T>::type* = nullptr > strong_inline auto operator = (T arg) -> iVector<vtype,N>
{
zeroit(*this);
for(int i=0;i<N;i++)
_internal[i] = arg;
return *this;
}
enum { TensorLevel = GridTypeMapper<vtype>::TensorLevel + 1};
iVector(const Zero &z){ *this = zero; };