The Kokkos wrapper classes for MOOSE-like variable value access.
More...
#include <KokkosVariableValue.h>
The Kokkos wrapper classes for MOOSE-like variable value access.
Definition at line 120 of file KokkosVariableValue.h.
◆ VariableValue() [1/2]
Moose::Kokkos::VariableValue::VariableValue |
( |
Variable |
var, |
|
|
bool |
nodal = false |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
var | The Kokkos variable |
nodal | Whether to get nodal values |
Definition at line 128 of file KokkosVariableValue.h.
130 if (nodal && !var.nodal())
131 mooseError(
"Cannot get nodal values of a non-nodal variable.");
Variable _var
Coupled Kokkos variable.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
const bool _nodal
Flag whether nodal values are requested.
◆ VariableValue() [2/2]
Constructor.
- Parameters
-
var | The MOOSE variable |
tag | The vector tag name |
nodal | Whether to get nodal values |
Definition at line 139 of file KokkosVariableValue.h.
145 mooseError(
"Cannot get nodal values of a non-nodal variable.");
virtual bool isNodal() const
Is this variable nodal.
Variable _var
Coupled Kokkos variable.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
const bool _nodal
Flag whether nodal values are requested.
◆ operator bool()
KOKKOS_FUNCTION Moose::Kokkos::VariableValue::operator bool |
( |
| ) |
const |
|
inline |
Get whether the variable was coupled.
- Returns
- Whether the variable was coupled
Definition at line 152 of file KokkosVariableValue.h.
Variable _var
Coupled Kokkos variable.
KOKKOS_FUNCTION bool coupled() const
Get whether the variable is coupled.
◆ operator()()
KOKKOS_FUNCTION Real Moose::Kokkos::VariableValue::operator() |
( |
Datum & |
datum, |
|
|
unsigned int |
qp, |
|
|
unsigned int |
comp = 0 |
|
) |
| const |
|
inline |
Get the current variable value.
- Parameters
-
datum | The Datum object of the current thread |
qp | The local quadrature point index |
comp | The variable component |
- Returns
- The variable value
Definition at line 161 of file KokkosVariableValue.h.
167 KOKKOS_ASSERT(datum.
isNodal());
169 auto node = datum.
node();
176 KOKKOS_ASSERT(!datum.
isNodal());
178 auto & elem = datum.
elem();
179 auto side = datum.
side();
184 .getVectorQpValue(elem, qp_offset + qp,
_var.
var(comp),
_var.
tag())
186 .getVectorQpValueFace(elem, side, qp,
_var.
var(comp),
_var.
tag());
KOKKOS_FUNCTION TagID tag() const
Get the vector tag ID.
Variable _var
Coupled Kokkos variable.
KOKKOS_FUNCTION unsigned int sys(unsigned int comp=0) const
Get the system number of a component.
const unsigned int invalid_uint
const bool _nodal
Flag whether nodal values are requested.
KOKKOS_FUNCTION bool coupled() const
Get whether the variable is coupled.
KOKKOS_FUNCTION unsigned int side() const
Get the side index.
KOKKOS_FUNCTION ContiguousNodeID node() const
Get the contiguous node ID.
KOKKOS_FUNCTION Real value(unsigned int comp=0) const
Get the default value of a component.
KOKKOS_FUNCTION bool isNodal() const
Get whether the current datum is on a node.
KOKKOS_FUNCTION const ElementInfo & elem() const
Get the element information object.
KOKKOS_FUNCTION unsigned int var(unsigned int comp=0) const
Get the variable number of a component.
KOKKOS_FUNCTION const System & system(unsigned int sys) const
Get the Kokkos system.
KOKKOS_FUNCTION dof_id_type qpOffset() const
Get the starting offset into the global quadrature point index.
◆ _nodal
const bool Moose::Kokkos::VariableValue::_nodal |
|
private |
◆ _var
Variable Moose::Kokkos::VariableValue::_var |
|
private |
The documentation for this class was generated from the following file: