https://mooseframework.inl.gov
Loading...
Searching...
No Matches
include
kokkos
materials
KokkosMaterialPropertyValue.h
Go to the documentation of this file.
1
//* This file is part of the MOOSE framework
2
//* https://www.mooseframework.org
3
//*
4
//* All rights reserved, see COPYRIGHT for full restrictions
5
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6
//*
7
//* Licensed under LGPL 2.1, please see LICENSE for details
8
//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10
#pragma once
11
12
#include "
KokkosMaterialPropertyValueDecl.h
"
13
#include "
KokkosMaterialPropertyDecl.h
"
14
#include "
KokkosDatum.h
"
15
16
namespace
Moose::Kokkos
17
{
18
19
template
<
typename
T,
unsigned
int
dimension>
20
KOKKOS_FUNCTION
21
MaterialPropertyValueBase<T, dimension>::MaterialPropertyValueBase
(
22
const
MaterialProperty<T, dimension>
& property,
const
Datum
& datum,
const
unsigned
int
qp)
23
: _idx(property._default ?
libMesh
::invalid_uint
24
: datum.propertyIdx(property._constant_option[datum.subdomain()], qp)),
25
_data(property._default ? nullptr : &property._data[datum.subdomain()]),
26
_value(property._value)
27
{
28
}
29
30
template
<
typename
T,
unsigned
int
dimension>
31
KOKKOS_FUNCTION
32
MaterialPropertyValue<T, dimension>::MaterialPropertyValue
(
33
const
MaterialProperty<T, dimension>
& property,
const
Datum
& datum,
const
unsigned
int
qp)
34
:
MaterialPropertyValueBase
<T, dimension>(property, datum, qp)
35
{
36
}
37
38
template
<
typename
T>
39
KOKKOS_FUNCTION
40
MaterialPropertyValue<T, 0>::MaterialPropertyValue
(
const
MaterialProperty<T, 0>
& property,
41
const
Datum
& datum,
42
const
unsigned
int
qp)
43
:
MaterialPropertyValueBase
<T, 0>(property, datum, qp)
44
{
45
}
46
47
template
<
typename
T>
48
KOKKOS_FUNCTION
auto
&
49
MaterialPropertyValue<T, 0>::operator=
(
const
T & value)
50
{
51
(*_data)(_idx) = value;
52
53
return
*
this
;
54
}
55
56
template
<
typename
T>
57
KOKKOS_FUNCTION
auto
&
58
MaterialPropertyValue<T, 0>::operator=
(
const
MaterialPropertyValue<T, 0>
& value)
59
{
60
(*_data)(_idx) =
static_cast<
T
>
(value);
61
62
return
*
this
;
63
}
64
65
}
// namespace Moose::Kokkos
KokkosDatum.h
KokkosMaterialPropertyDecl.h
KokkosMaterialPropertyValueDecl.h
Moose::Kokkos::Datum
The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object.
Definition
KokkosDatum.h:246
Moose::Kokkos::MaterialPropertyValueBase
The Kokkos wrapper class for accessing the material property values of a single quadrature point.
Definition
KokkosMaterialPropertyValueDecl.h:35
Moose::Kokkos::MaterialPropertyValueBase::MaterialPropertyValueBase
KOKKOS_FUNCTION MaterialPropertyValueBase(const MaterialProperty< T, dimension > &property, const Datum &datum, const unsigned int qp)
Constructor.
Definition
KokkosMaterialPropertyValue.h:21
Moose::Kokkos::MaterialPropertyValue
Definition
KokkosMaterialPropertyValueDecl.h:71
Moose::Kokkos::MaterialProperty
The Kokkos material property class.
Definition
KokkosMaterialPropertyDecl.h:240
Moose::Kokkos
Definition
Assembly.h:69
libMesh
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Generated on Mon Aug 24 2026 19:02:03 for https://mooseframework.inl.gov by
1.9.8