https://mooseframework.inl.gov
Loading...
Searching...
No Matches
KokkosLinearFVSource.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
14
35
36template <typename Derived>
37KOKKOS_FUNCTION inline Real
39{
40 const auto centroid = datum.elementCentroid();
41 return _scale->value(_t, centroid) * _source_density->value(_t, centroid) * datum.elementVolume();
42}
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Kokkos linear finite volume elemental kernel that adds a scaled volumetric source to the right-hand s...
KOKKOS_FUNCTION Real computeRightHandSideContribution(const FVDatum &datum) const
const Moose::Kokkos::ReferenceWrapper< const KokkosParsedFunction > _source_density
The source density.
const Moose::Kokkos::ReferenceWrapper< const KokkosParsedFunction > _scale
Coefficient for multiplying the surface density.
static InputParameters validParams()
KokkosLinearFVSource(const InputParameters &parameters)
KOKKOS_FUNCTION Real value(Real t, Real3 p) const
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Device-side geometric context for finite volume kernels and boundary conditions.
KOKKOS_FUNCTION Real elementVolume() const
Get the coordinate-weighted current element volume.
KOKKOS_FUNCTION Real3 elementCentroid() const
Get the current element centroid.
Base class for Kokkos linear finite volume kernels that contribute on elements (volumetric terms)
Scalar< Real > _t
TODO: Move to TransientInterface.
The Kokkos object that can hold the reference of a variable.