https://mooseframework.inl.gov
include
kokkos
linearfvbcs
KokkosLinearFVFunctorDirichletBC.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 "
KokkosLinearFVBoundaryCondition.h
"
13
#include "
KokkosParsedFunction.h
"
14
19
class
KokkosLinearFVFunctorDirichletBC
:
public
Moose::Kokkos::LinearFVBoundaryCondition
20
{
21
public
:
22
static
InputParameters
validParams
();
23
24
KokkosLinearFVFunctorDirichletBC
(
const
InputParameters
&
parameters
);
25
26
template
<
typename
Derived>
27
KOKKOS_FUNCTION
BoundaryRelation
computeBoundaryValue
(
const
FVDatum
& datum)
const
;
28
template
<
typename
Derived>
29
KOKKOS_FUNCTION
BoundaryRelation
computeBoundaryNormalGradient
(
const
FVDatum
& datum)
const
;
30
31
private
:
33
const
Moose::Kokkos::ReferenceWrapper<const KokkosParsedFunction>
_functor
;
34
};
35
36
template
<
typename
Derived>
37
KOKKOS_FUNCTION
KokkosLinearFVFunctorDirichletBC::BoundaryRelation
38
KokkosLinearFVFunctorDirichletBC::computeBoundaryValue
(
const
FVDatum
& datum)
const
39
{
40
return
{0,
_functor
->
value
(
_t
, datum.
faceCentroid
())};
41
}
42
43
template
<
typename
Derived>
44
KOKKOS_FUNCTION
KokkosLinearFVFunctorDirichletBC::BoundaryRelation
45
KokkosLinearFVFunctorDirichletBC::computeBoundaryNormalGradient
(
const
FVDatum
& datum)
const
46
{
47
const
auto
distance
= datum.
faceDCFMag
();
48
return
{-1 /
distance
,
_functor
->
value
(
_t
, datum.
faceCentroid
()) /
distance
};
49
}
Moose::Kokkos::LinearFVBoundaryCondition::BoundaryRelation
Affine boundary relation used by Kokkos linear FV kernels: boundary_quantity = coefficient * cell_unk...
Definition:
KokkosLinearFVBoundaryCondition.h:72
Moose::Kokkos::ReferenceWrapper< const KokkosParsedFunction >
Moose::Kokkos::LinearFVBoundaryCondition::_t
Scalar< Real > _t
TODO: Move to TransientInterface.
Definition:
KokkosLinearFVBoundaryCondition.h:203
MooseBase::parameters
const InputParameters & parameters() const
Get the parameters of the object.
Definition:
MooseBase.h:131
Moose::Kokkos::LinearFVBoundaryCondition
Base class for Kokkos linear finite volume boundary conditions.
Definition:
KokkosLinearFVBoundaryCondition.h:40
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Definition:
InputParameters.h:67
distance
Real distance(const Point &p)
KokkosLinearFVFunctorDirichletBC::_functor
const Moose::Kokkos::ReferenceWrapper< const KokkosParsedFunction > _functor
The functor providing the Dirichlet value on the boundary.
Definition:
KokkosLinearFVFunctorDirichletBC.h:33
KokkosLinearFVFunctorDirichletBC::computeBoundaryNormalGradient
KOKKOS_FUNCTION BoundaryRelation computeBoundaryNormalGradient(const FVDatum &datum) const
Definition:
KokkosLinearFVFunctorDirichletBC.h:45
KokkosLinearFVBoundaryCondition.h
KokkosLinearFVFunctorDirichletBC::KokkosLinearFVFunctorDirichletBC
KokkosLinearFVFunctorDirichletBC(const InputParameters ¶meters)
KokkosLinearFVFunctorDirichletBC::computeBoundaryValue
KOKKOS_FUNCTION BoundaryRelation computeBoundaryValue(const FVDatum &datum) const
Definition:
KokkosLinearFVFunctorDirichletBC.h:38
KokkosParsedFunction::value
KOKKOS_FUNCTION Real value(Real t, Real3 p) const
Definition:
KokkosParsedFunction.h:29
Moose::Kokkos::FVDatum::faceDCFMag
KOKKOS_FUNCTION Real faceDCFMag() const
Get the distance from the current element centroid to the current side centroid.
Definition:
KokkosDatum.h:208
KokkosParsedFunction.h
KokkosLinearFVFunctorDirichletBC
Provides Dirichlet boundary value and normal-gradient relations for Kokkos linear finite volume kerne...
Definition:
KokkosLinearFVFunctorDirichletBC.h:19
Moose::Kokkos::FVDatum
Device-side geometric context for finite volume kernels and boundary conditions.
Definition:
KokkosDatum.h:167
Moose::Kokkos::FVDatum::faceCentroid
KOKKOS_FUNCTION Real3 faceCentroid() const
Get the centroid of the current element side.
Definition:
KokkosDatum.h:184
KokkosLinearFVFunctorDirichletBC::validParams
static InputParameters validParams()
Generated on Sat Jul 25 2026 18:46:41 for https://mooseframework.inl.gov by
1.8.14