Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Kokkos version of [CopyValueAux](CopyValueAux.md). See the original

## Example Syntax

!listing test/tests/kokkos/auxkernels/copy_value_aux/kokkos_copy_old_aux.i start=[T_older] end=[] include-end=true
!listing test/tests/kokkos/auxkernels/copy_value_aux/kokkos_copy_old_aux.i block=AuxKernels

!syntax parameters /AuxKernels/KokkosCopyValueAux

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This is the Kokkos version of [BodyForce](BodyForce.md). See the original document for details.

!alert note
The original version supports functions, but the Kokkos version does not support functions yet.
Kokkos-MOOSE does not fully support functions yet. Therefore, [!param](/Kernels/BodyForce/function) is not available.

## Example Syntax

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosElementAverageMaterialProperty

!if! function=hasCapability('kokkos')

This is the Kokkos version of [ElementAverageMaterialProperty](ElementAverageMaterialProperty.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/element_integral_material_property/kokkos_element_average_material_property.i start=[prop_average] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosElementAverageMaterialProperty

!syntax inputs /Postprocessors/KokkosElementAverageMaterialProperty

!syntax children /Postprocessors/KokkosElementAverageMaterialProperty

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosElementAverageValue

!if! function=hasCapability('kokkos')

This is the Kokkos version of [ElementAverageValue](ElementAverageValue.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/element_integral/kokkos_element_block_average_test.i block=Postprocessors

!syntax parameters /Postprocessors/KokkosElementAverageValue

!syntax inputs /Postprocessors/KokkosElementAverageValue

!syntax children /Postprocessors/KokkosElementAverageValue

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosElementExtremeValue

!if! function=hasCapability('kokkos')

This is the Kokkos version of [ElementExtremeValue](ElementExtremeValue.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/element_extreme_value/kokkos_element_extreme_value.i block=Postprocessors

!syntax parameters /Postprocessors/KokkosElementExtremeValue

!syntax inputs /Postprocessors/KokkosElementExtremeValue

!syntax children /Postprocessors/KokkosElementExtremeValue

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosElementIntegralMaterialProperty

!if! function=hasCapability('kokkos')

This is the Kokkos version of [ElementIntegralMaterialProperty](ElementIntegralMaterialProperty.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/element_integral_material_property/kokkos_element_integral_material_property.i start=[prop_integral] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosElementIntegralMaterialProperty

!syntax inputs /Postprocessors/KokkosElementIntegralMaterialProperty

!syntax children /Postprocessors/KokkosElementIntegralMaterialProperty

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosElementIntegralVariablePostprocessor

!if! function=hasCapability('kokkos')

This is the Kokkos version of [ElementIntegralVariablePostprocessor](ElementIntegralVariablePostprocessor.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/element_integral/kokkos_element_integral_test.i start=[integral] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosElementIntegralVariablePostprocessor

!syntax inputs /Postprocessors/KokkosElementIntegralVariablePostprocessor

!syntax children /Postprocessors/KokkosElementIntegralVariablePostprocessor

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosElementL2Norm

!if! function=hasCapability('kokkos')

This is the Kokkos version of [ElementL2Norm](ElementL2Norm.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/element_l2_norm/kokkos_element_l2_norm.i start=[L2_norm] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosElementL2Norm

!syntax inputs /Postprocessors/KokkosElementL2Norm

!syntax children /Postprocessors/KokkosElementL2Norm

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosNodalExtremeValue

!if! function=hasCapability('kokkos')

This is the Kokkos version of [NodalExtremeValue](NodalExtremeValue.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/nodal_extreme_value/kokkos_nodal_max_value_test.i start=[max_nodal_val] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosNodalExtremeValue

!syntax inputs /Postprocessors/KokkosNodalExtremeValue

!syntax children /Postprocessors/KokkosNodalExtremeValue

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosNodalL2Norm

!if! function=hasCapability('kokkos')

This is the Kokkos version of [NodalL2Norm](NodalL2Norm.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/nodal_l2_norm/kokkos_nodal_l2_norm.i start=[nodal_L2_norm] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosNodalL2Norm

!syntax inputs /Postprocessors/KokkosNodalL2Norm

!syntax children /Postprocessors/KokkosNodalL2Norm

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosNodalMaxValueId

!if! function=hasCapability('kokkos')

This is the Kokkos version of [NodalMaxValueId](NodalMaxValueId.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/nodal_extreme_value/kokkos_nodal_extreme_pps_test.i start=[max_node_id] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosNodalMaxValueId

!syntax inputs /Postprocessors/KokkosNodalMaxValueId

!syntax children /Postprocessors/KokkosNodalMaxValueId

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosNodalSum

!if! function=hasCapability('kokkos')

This is the Kokkos version of [NodalSum](NodalSum.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/nodal_sum/kokkos_nodal_sum.i start=[nodal_sum] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosNodalSum

!syntax inputs /Postprocessors/KokkosNodalSum

!syntax children /Postprocessors/KokkosNodalSum

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# KokkosSideAverageMaterialProperty

!if! function=hasCapability('kokkos')

This is the Kokkos version of [SideAverageMaterialProperty](SideAverageMaterialProperty.md). See the original document for details.

!alert note
`KokkosSideAverageMaterialProperty` only supports scalar material properties.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/side_integral/kokkos_side_average_value_test.i start=[average] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosSideAverageMaterialProperty

!syntax inputs /Postprocessors/KokkosSideAverageMaterialProperty

!syntax children /Postprocessors/KokkosSideAverageMaterialProperty

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosSideAverageValue

!if! function=hasCapability('kokkos')

This is the Kokkos version of [SideAverageValue](SideAverageValue.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/side_integral/kokkos_side_average_value_test.i start=[average] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosSideAverageValue

!syntax inputs /Postprocessors/KokkosSideAverageValue

!syntax children /Postprocessors/KokkosSideAverageValue

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosSideExtremeValue

!if! function=hasCapability('kokkos')

This is the Kokkos version of [SideExtremeValue](SideExtremeValue.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/side_extreme_value/kokkos_nonlinear_variable.i start=[Postprocessors] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosSideExtremeValue

!syntax inputs /Postprocessors/KokkosSideExtremeValue

!syntax children /Postprocessors/KokkosSideExtremeValue

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# KokkosSideIntegralMaterialProperty

!if! function=hasCapability('kokkos')

This is the Kokkos version of [SideIntegralMaterialProperty](SideIntegralMaterialProperty.md). See the original document for details.

!alert note
`KokkosSideIntegralMaterialProperty` only supports scalar material properties.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/side_integral/kokkos_side_integral_material_property.i start=[integral] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosSideIntegralMaterialProperty

!syntax inputs /Postprocessors/KokkosSideIntegralMaterialProperty

!syntax children /Postprocessors/KokkosSideIntegralMaterialProperty

!if-end!

!else
!include kokkos/kokkos_warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# KokkosSideIntegralVariablePostprocessor

!if! function=hasCapability('kokkos')

This is the Kokkos version of [SideIntegralVariablePostprocessor](SideIntegralVariablePostprocessor.md). See the original document for details.

## Example Input Syntax

!listing test/tests/kokkos/postprocessors/side_integral/kokkos_side_integral_value_test.i start=[integral] end=[] include-end=true

!syntax parameters /Postprocessors/KokkosSideIntegralVariablePostprocessor

!syntax inputs /Postprocessors/KokkosSideIntegralVariablePostprocessor

!syntax children /Postprocessors/KokkosSideIntegralVariablePostprocessor

!if-end!

!else
!include kokkos/kokkos_warning.md
4 changes: 3 additions & 1 deletion framework/doc/content/syntax/Kokkos/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ The Kokkos-MOOSE base classes are carefully designed to avoid the CRTP by levera
Namely, the base classes themselves are not template classes, which alleviates the burden of users in dealing with templates.
However, any polymorphic pattern implemented on GPU in the derived class level will likely require the CRTP.

#### Alternative Way to Implement Static Polymorphism
#### Alternative Way to Implement Static Polymorphism id=kokkos_shim

While the CRTP is a generic design pattern for implementing static polymorphism, the use of class templates can complicate class designs.
In Kokkos-MOOSE objects, there is an alternative way to implement static polymorphism by defining shims instead of hook methods.
Expand Down Expand Up @@ -472,6 +472,8 @@ The following objects are currently available in Kokkos-MOOSE:
- [Materials](syntax/KokkosMaterials/index.md)
- [AuxKernels](syntax/KokkosAuxKernels/index.md)
- [Functions](syntax/KokkosFunctions/index.md)
- [UserObjects](syntax/KokkosUserObjects/index.md)
- [Postprocessors](syntax/KokkosPostprocessors/index.md)

!if-end!

Expand Down
2 changes: 1 addition & 1 deletion framework/doc/content/syntax/KokkosBCs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Before reading this documentation, consider reading the following materials firs
Kokkos-MOOSE boundary conditions do not support automatic differention yet.

The basic design pattern of Kokkos-MOOSE kernels described in [Kokkos Kernels System](syntax/Kokkos/index.md) applies to the boundary conditions as well.
You can create your own integrated and nodal boundary conditions by subclassing `Moose::Kokkos::IntegratedBC` and `Moose::Kokkos::NodalBC`, respectively, and following the same pattern with kernels including registering your boundary conditions with `registerKokkosResidualObject()`.
You can create your own integrated and nodal boundary conditions by subclassing `Moose::Kokkos::IntegratedBC` and `Moose::Kokkos::NodalBC`, respectively, and following the same pattern with kernels including registering your boundary conditions with either `registerKokkosBoundaryCondition()` or `registerKokkosResidualObject()`.
Especially, integrated boundary conditions have identical interfaces with kernels, so they will not be explained here in detail.
See the following source codes of `KokkosCoupledVarNeumannBC` for an example of an integrated boundary condition:

Expand Down
2 changes: 1 addition & 1 deletion framework/doc/content/syntax/KokkosFunctions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This is the limitation of the current Kokkos-MOOSE function implementation which
It is recommended to store the acquired function in a `ReferenceWrapper` instance.
Otherwise, it should be stored as a copy, and it becomes your responsibility to maintain synchronization between the original function and the copy.
## Use of Dynamic Polymorphism
## Use of Dynamic Polymorphism id=kokkos_rdc
Unlike most of other Kokkos-MOOSE objects, functions are pluggable objects that are to be used in other objects.
Therefore, it is desired to use functions type-agnostically in your object so that any type of function can be plugged in.
Expand Down
2 changes: 1 addition & 1 deletion framework/doc/content/syntax/KokkosKernels/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Kokkos-MOOSE kernels do not support coupling with scalar variables and automatic
The Kokkos-MOOSE kernels are designed to resemble the original MOOSE kernels as much as possible for easier porting and adaptation.
However, some differences still exist due to the fundamentally different programming paradigm between CPU and GPU.
You can create your own kernel by subclassing `Moose::Kokkos::Kernel` as is done in the original MOOSE by inheriting `Kernel`.
However, your kernel should now be registered with `registerKokkosResidualObject()` instead of `registerMooseObject()`.
However, your kernel should now be registered with either `registerKokkosKernel()` or `registerKokkosResidualObject()` instead of `registerMooseObject()`.
Also, the signatures of hook methods are different.
In the original MOOSE, the following virtual functions should or optionally have been overriden:

Expand Down
2 changes: 1 addition & 1 deletion framework/doc/content/syntax/KokkosNodalKernels/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Before reading this documentation, consider reading the following materials firs
- [Kokkos Kernels System](syntax/KokkosKernels/index.md) to understand the common design pattern of objects in Kokkos-MOOSE,
- [Kokkos BCs System](syntax/KokkosBCs/index.md) to understand the design pattern of nodal boundary conditions in Kokkos-MOOSE.

You can create your own nodal kernels by inheriting `Moose::Kokkos::NodalKernel` and following the same pattern with kernels and boundary conditions including registering with `registerKokkosResidualObject()`.
You can create your own nodal kernels by inheriting `Moose::Kokkos::NodalKernel` and following the same pattern with kernels and boundary conditions including registering with either `registerKokkosNodalKernel()` or `registerKokkosResidualObject()`.
The interfaces of nodal kernels are identical to the nodal boundary conditions described in [Kokkos BCs System](syntax/KokkosBCs/index.md), so they will not be explained here in detail.
See the following source codes of `KokkosCoupledForceNodalKernel` for an example of a nodal kernel:

Expand Down
Loading