The Kokkos variable object that carries the coupled variable and tag information. More...
#include <KokkosVariable.h>
Public Types | |
using | CoupleableKey = ::Moose::PassKey<::Coupleable > |
Public Member Functions | |
Variable ()=default | |
Default constructor. More... | |
Variable (const MooseVariableBase &variable, const TagID tag) | |
Constructor Initialize the variable with a MOOSE variable and vector tag ID. More... | |
Variable (const MooseVariableBase &variable, const TagName &tag_name=Moose::SOLUTION_TAG) | |
Constructor Initialize the variable with a MOOSE variable and vector tag name. More... | |
void | init (const MooseVariableBase &variable, const TagID tag) |
Initialize the variable with a MOOSE variable and vector tag ID. More... | |
void | init (const MooseVariableBase &variable, const TagName &tag_name=Moose::SOLUTION_TAG) |
Initialize the variable with a MOOSE variable and vector tag name. More... | |
void | init (const std::vector< const MooseVariableBase *> &variables, const TagID tag, CoupleableKey) |
Initialize the variable with coupled MOOSE variables. More... | |
void | init (const std::vector< Real > &values, CoupleableKey) |
Initialize the variable with coupled default values. More... | |
KOKKOS_FUNCTION bool | coupled () const |
Get whether the variable is coupled. More... | |
KOKKOS_FUNCTION unsigned int | components () |
Get the number of components. More... | |
KOKKOS_FUNCTION TagID | tag () const |
Get the vector tag ID. More... | |
KOKKOS_FUNCTION unsigned int | var (unsigned int comp=0) const |
Get the variable number of a component. More... | |
KOKKOS_FUNCTION unsigned int | sys (unsigned int comp=0) const |
Get the system number of a component. More... | |
KOKKOS_FUNCTION Real | value (unsigned int comp=0) const |
Get the default value of a component. More... | |
Private Attributes | |
bool | _coupled = false |
Whether the variable is coupled. More... | |
unsigned int | _components = 1 |
Number of components. More... | |
TagID | _tag = Moose::INVALID_TAG_ID |
Vector tag ID. More... | |
Array< unsigned int > | _var |
Variable number of each component. More... | |
Array< unsigned int > | _sys |
System number of each component. More... | |
Array< Real > | _default_value |
Default value of each component when the variable is not coupled. More... | |
The Kokkos variable object that carries the coupled variable and tag information.
Definition at line 28 of file KokkosVariable.h.
Definition at line 31 of file KokkosVariable.h.
|
default |
Default constructor.
|
inline |
Constructor Initialize the variable with a MOOSE variable and vector tag ID.
variable | The MOOSE variable |
tag | The vector tag ID |
Definition at line 43 of file KokkosVariable.h.
|
inline |
Constructor Initialize the variable with a MOOSE variable and vector tag name.
variable | The MOOSE variable |
tag_name | The vector tag name |
Definition at line 50 of file KokkosVariable.h.
|
inline |
Get the number of components.
Definition at line 88 of file KokkosVariable.h.
|
inline |
Get whether the variable is coupled.
Definition at line 83 of file KokkosVariable.h.
Referenced by Moose::Kokkos::VariableValue::operator bool(), Moose::Kokkos::VariableNodalValue::operator bool(), Moose::Kokkos::VariableGradient::operator bool(), Moose::Kokkos::VariableValue::operator()(), Moose::Kokkos::VariableNodalValue::operator()(), and Moose::Kokkos::VariableGradient::operator()().
void Moose::Kokkos::Variable::init | ( | const MooseVariableBase & | variable, |
const TagID | tag | ||
) |
Initialize the variable with a MOOSE variable and vector tag ID.
variable | The MOOSE variable |
tag | The vector tag ID |
Referenced by Variable().
void Moose::Kokkos::Variable::init | ( | const MooseVariableBase & | variable, |
const TagName & | tag_name = Moose::SOLUTION_TAG |
||
) |
Initialize the variable with a MOOSE variable and vector tag name.
variable | The MOOSE variable |
tag_name | The vector tag name |
void Moose::Kokkos::Variable::init | ( | const std::vector< const MooseVariableBase *> & | variables, |
const TagID | tag, | ||
CoupleableKey | |||
) |
Initialize the variable with coupled MOOSE variables.
variables | The coupled MOOSE variables |
tag | The vector tag ID |
void Moose::Kokkos::Variable::init | ( | const std::vector< Real > & | values, |
CoupleableKey | |||
) |
Initialize the variable with coupled default values.
values | The default coupled values |
Get the system number of a component.
comp | The variable component |
Definition at line 105 of file KokkosVariable.h.
Referenced by Moose::Kokkos::ResidualObject::accumulateTaggedElementalMatrix(), Moose::Kokkos::ResidualObject::accumulateTaggedElementalResidual(), Moose::Kokkos::ResidualObject::accumulateTaggedNodalMatrix(), Moose::Kokkos::ResidualObject::accumulateTaggedNodalResidual(), Moose::Kokkos::VariableValue::operator()(), Moose::Kokkos::VariableNodalValue::operator()(), and Moose::Kokkos::VariableGradient::operator()().
|
inline |
Get the vector tag ID.
Definition at line 93 of file KokkosVariable.h.
Referenced by Moose::Kokkos::VariableValue::operator()(), Moose::Kokkos::VariableNodalValue::operator()(), Moose::Kokkos::VariableGradient::operator()(), and Variable().
Get the default value of a component.
comp | The variable component |
Definition at line 111 of file KokkosVariable.h.
Referenced by Moose::Kokkos::VariableValue::operator()(), and Moose::Kokkos::VariableNodalValue::operator()().
Get the variable number of a component.
comp | The variable component |
Definition at line 99 of file KokkosVariable.h.
Referenced by Moose::Kokkos::ResidualObject::accumulateTaggedElementalMatrix(), Moose::Kokkos::ResidualObject::accumulateTaggedElementalResidual(), Moose::Kokkos::ResidualObject::accumulateTaggedNodalMatrix(), Moose::Kokkos::ResidualObject::accumulateTaggedNodalResidual(), Moose::Kokkos::VariableValue::operator()(), Moose::Kokkos::VariableNodalValue::operator()(), and Moose::Kokkos::VariableGradient::operator()().
|
private |
|
private |
Whether the variable is coupled.
Definition at line 122 of file KokkosVariable.h.
Default value of each component when the variable is not coupled.
Definition at line 142 of file KokkosVariable.h.
Referenced by value().
System number of each component.
Definition at line 138 of file KokkosVariable.h.
Referenced by sys().
|
private |
Variable number of each component.
Definition at line 134 of file KokkosVariable.h.
Referenced by var().