Go to the documentation of this file.
21 #ifndef __symArray_hpp__
22 #define __symArray_hpp__
46 template<
typename Type>
48 void SWAP(Type &x, Type& y)
55 template<
typename T,
typename MemorySpace=
void>
94 return memory_space::name();
135 "error in creating symArray " << name <<
endl;
160 Kokkos::deep_copy(
view_, val);
184 "size of input vector do not match a symetric array "<< nElem<<
endl;
199 Kokkos::deep_copy(
view_, temp);
211 if( !vecFromFile.
read(is) )
return false;
213 this->
assign(vecFromFile);
227 Kokkos::deep_copy(mirror,dVec);
229 return vecToFile.
write(os);
242 real nr = 0.5*(
sqrt(8.0*nElem+1)-1);
244 if(
equal(nr-
static_cast<real>(
n) , 0.0) )
return true;
252 template<
typename T,
typename MemorySpace>
263 template<
typename T,
typename MemorySpace>
267 if( !oArr.
write(os) )
278 #endif //__symArray_hpp__
const INLINE_FUNCTION_HD T & operator()(uint32 i, uint32 j) const
nonLinearProperties & reference
nonLinearProperties * iterator
INLINE_FUNCTION_H symArray()
INLINE_FUNCTION_H symArray(word name, uint32 n)
INLINE_FUNCTION_H symArray & operator=(const symArray &)=default
FUNCTION_H bool read(iIstream &is)
INLINE_FUNCTION_H symArray(uint32 n)
constexpr static const char * memoerySpaceName()
typename ViewType::device_type deviceType
typename ViewType::execution_space execution_space
iOstream & endl(iOstream &os)
static bool getN(uint32 nElem, uint32 &n)
INLINE_FUNCTION_HD T & operator()(uint32 i, uint32 j)
nonLinearProperties * pointer
INLINE_FUNCTION_HD void SWAP(Type &x, Type &y)
bool assign(const Vector< T > src)
INLINE_FUNCTION_H symArray(word name, Vector< T > src)
INLINE_FUNCTION_H symArray(word name, uint32 n, const T &val)
#define fatalErrorInFunction
INLINE_FUNCTION_H void realloc(ViewType1D< Type, Properties... > &view, int32 len)
const nonLinearProperties & constReference
INLINE_FUNCTION iIstream & operator>>(iIstream &str, AB3History &ab3)
typename ViewType::memory_space memory_space
FUNCTION_H bool write(iOstream &os) const
#define INLINE_FUNCTION_H
INLINE_FUNCTION iOstream & operator<<(iOstream &str, const AB3History &ab3)
const nonLinearProperties * constPointer
virtual const word & name() const
const nonLinearProperties * constIterator
TypeInfoTemplateNV2("symArray", T, memoerySpaceName())
Kokkos::View< T *, Kokkos::HostSpace > hostViewType1D
bool write(iOstream &os) const
ViewType1D< nonLinearProperties, void > ViewType
static INLINE_FUNCTION_HD uint32 numElem(uint32 n)
INLINE_FUNCTION_H ~symArray()=default
#define ioErrorInFile(fileName, lineNumber)
Kokkos::View< T *, properties... > ViewType1D
INLINE_FUNCTION_HD real sqrt(real x)
#define INLINE_FUNCTION_HD
nonLinearProperties valueType
INLINE_FUNCTION_HD bool equal(const real &s1, const real &s2)
Kokkos::pair< T1, T2 > kPair