https://mooseframework.inl.gov
Public Member Functions | Public Attributes | List of all members
Moose::Kokkos::Real3 Struct Reference

#include <KokkosTypes.h>

Public Member Functions

KOKKOS_INLINE_FUNCTION Real3 ()
 
KOKKOS_INLINE_FUNCTION Real3 (const Real &scalar)
 
KOKKOS_INLINE_FUNCTION Real3 (const Real3 &vector)
 
KOKKOS_INLINE_FUNCTION Real3 (const Real &x, const Real &y, const Real &z)
 
 Real3 (const libMesh::TypeVector< Real > &vector)
 
KOKKOS_INLINE_FUNCTION Realoperator() (unsigned int i)
 
KOKKOS_INLINE_FUNCTION Real operator() (unsigned int i) const
 
KOKKOS_INLINE_FUNCTION Real3operator= (const Real3 &vector)
 
KOKKOS_INLINE_FUNCTION Real3operator= (const Real scalar)
 
Real3operator= (const libMesh::TypeVector< Real > &vector)
 
KOKKOS_INLINE_FUNCTION void operator+= (const Real scalar)
 
KOKKOS_INLINE_FUNCTION void operator+= (const Real3 vector)
 
KOKKOS_INLINE_FUNCTION void operator-= (const Real scalar)
 
KOKKOS_INLINE_FUNCTION void operator-= (const Real3 vector)
 
KOKKOS_INLINE_FUNCTION void operator*= (const Real scalar)
 
KOKKOS_INLINE_FUNCTION Real norm ()
 
KOKKOS_INLINE_FUNCTION Real dot_product (const Real3 vector)
 
KOKKOS_INLINE_FUNCTION Real3 cross_product (const Real3 vector)
 
KOKKOS_INLINE_FUNCTION Real33 cartesian_product (const Real3 vector)
 

Public Attributes

Real v [3]
 

Detailed Description

Definition at line 119 of file KokkosTypes.h.

Constructor & Destructor Documentation

◆ Real3() [1/5]

KOKKOS_INLINE_FUNCTION Moose::Kokkos::Real3::Real3 ( )
inline

Definition at line 124 of file KokkosTypes.h.

125  {
126  v[0] = 0;
127  v[1] = 0;
128  v[2] = 0;
129  }

◆ Real3() [2/5]

KOKKOS_INLINE_FUNCTION Moose::Kokkos::Real3::Real3 ( const Real scalar)
inline

Definition at line 130 of file KokkosTypes.h.

131  {
132  v[0] = scalar;
133  v[1] = scalar;
134  v[2] = scalar;
135  }

◆ Real3() [3/5]

KOKKOS_INLINE_FUNCTION Moose::Kokkos::Real3::Real3 ( const Real3 vector)
inline

Definition at line 136 of file KokkosTypes.h.

137  {
138  v[0] = vector.v[0];
139  v[1] = vector.v[1];
140  v[2] = vector.v[2];
141  }

◆ Real3() [4/5]

KOKKOS_INLINE_FUNCTION Moose::Kokkos::Real3::Real3 ( const Real x,
const Real y,
const Real z 
)
inline

Definition at line 142 of file KokkosTypes.h.

143  {
144  v[0] = x;
145  v[1] = y;
146  v[2] = z;
147  }

◆ Real3() [5/5]

Moose::Kokkos::Real3::Real3 ( const libMesh::TypeVector< Real > &  vector)
inline

Definition at line 148 of file KokkosTypes.h.

149  {
150  v[0] = vector(0);
151  v[1] = vector(1);
152  v[2] = vector(2);
153  }

Member Function Documentation

◆ cartesian_product()

KOKKOS_INLINE_FUNCTION Real33 Moose::Kokkos::Real3::cartesian_product ( const Real3  vector)
inline

Definition at line 227 of file KokkosTypes.h.

228  {
229  Real33 tensor;
230 
231  for (unsigned int i = 0; i < 3; ++i)
232  for (unsigned int j = 0; j < 3; ++j)
233  tensor(i, j) = v[i] * vector.v[j];
234 
235  return tensor;
236  }

◆ cross_product()

KOKKOS_INLINE_FUNCTION Real3 Moose::Kokkos::Real3::cross_product ( const Real3  vector)
inline

Definition at line 217 of file KokkosTypes.h.

218  {
219  Real3 cross;
220 
221  cross.v[0] = v[1] * vector.v[2] - v[2] * vector.v[1];
222  cross.v[1] = v[2] * vector.v[0] - v[0] * vector.v[2];
223  cross.v[2] = v[0] * vector.v[1] - v[1] * vector.v[0];
224 
225  return cross;
226  }
KOKKOS_INLINE_FUNCTION Real3()
Definition: KokkosTypes.h:124

◆ dot_product()

KOKKOS_INLINE_FUNCTION Real Moose::Kokkos::Real3::dot_product ( const Real3  vector)
inline

Definition at line 213 of file KokkosTypes.h.

214  {
215  return v[0] * vector.v[0] + v[1] * vector.v[1] + v[2] * vector.v[2];
216  }

◆ norm()

KOKKOS_INLINE_FUNCTION Real Moose::Kokkos::Real3::norm ( )
inline

Definition at line 212 of file KokkosTypes.h.

212 { return std::sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); }
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh

◆ operator()() [1/2]

KOKKOS_INLINE_FUNCTION Real& Moose::Kokkos::Real3::operator() ( unsigned int  i)
inline

Definition at line 155 of file KokkosTypes.h.

155 { return v[i]; }

◆ operator()() [2/2]

KOKKOS_INLINE_FUNCTION Real Moose::Kokkos::Real3::operator() ( unsigned int  i) const
inline

Definition at line 156 of file KokkosTypes.h.

156 { return v[i]; }

◆ operator*=()

KOKKOS_INLINE_FUNCTION void Moose::Kokkos::Real3::operator*= ( const Real  scalar)
inline

Definition at line 206 of file KokkosTypes.h.

207  {
208  v[0] *= scalar;
209  v[1] *= scalar;
210  v[2] *= scalar;
211  }

◆ operator+=() [1/2]

KOKKOS_INLINE_FUNCTION void Moose::Kokkos::Real3::operator+= ( const Real  scalar)
inline

Definition at line 182 of file KokkosTypes.h.

183  {
184  v[0] += scalar;
185  v[1] += scalar;
186  v[2] += scalar;
187  }

◆ operator+=() [2/2]

KOKKOS_INLINE_FUNCTION void Moose::Kokkos::Real3::operator+= ( const Real3  vector)
inline

Definition at line 188 of file KokkosTypes.h.

189  {
190  v[0] += vector.v[0];
191  v[1] += vector.v[1];
192  v[2] += vector.v[2];
193  }

◆ operator-=() [1/2]

KOKKOS_INLINE_FUNCTION void Moose::Kokkos::Real3::operator-= ( const Real  scalar)
inline

Definition at line 194 of file KokkosTypes.h.

195  {
196  v[0] -= scalar;
197  v[1] -= scalar;
198  v[2] -= scalar;
199  }

◆ operator-=() [2/2]

KOKKOS_INLINE_FUNCTION void Moose::Kokkos::Real3::operator-= ( const Real3  vector)
inline

Definition at line 200 of file KokkosTypes.h.

201  {
202  v[0] -= vector.v[0];
203  v[1] -= vector.v[1];
204  v[2] -= vector.v[2];
205  }

◆ operator=() [1/3]

KOKKOS_INLINE_FUNCTION Real3& Moose::Kokkos::Real3::operator= ( const Real3 vector)
inline

Definition at line 158 of file KokkosTypes.h.

159  {
160  v[0] = vector.v[0];
161  v[1] = vector.v[1];
162  v[2] = vector.v[2];
163 
164  return *this;
165  }

◆ operator=() [2/3]

KOKKOS_INLINE_FUNCTION Real3& Moose::Kokkos::Real3::operator= ( const Real  scalar)
inline

Definition at line 166 of file KokkosTypes.h.

167  {
168  v[0] = scalar;
169  v[1] = scalar;
170  v[2] = scalar;
171 
172  return *this;
173  }

◆ operator=() [3/3]

Real3& Moose::Kokkos::Real3::operator= ( const libMesh::TypeVector< Real > &  vector)
inline

Definition at line 174 of file KokkosTypes.h.

175  {
176  v[0] = vector(0);
177  v[1] = vector(1);
178  v[2] = vector(2);
179 
180  return *this;
181  }

Member Data Documentation

◆ v

Real Moose::Kokkos::Real3::v[3]

The documentation for this struct was generated from the following file: