https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
14
20{
21public:
23
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
31private:
34};
35
36template <typename Derived>
39{
40 return {0, _functor->value(_t, datum.faceCentroid())};
41}
42
43template <typename Derived>
46{
47 const auto distance = datum.faceDCFMag();
48 return {-1 / distance, _functor->value(_t, datum.faceCentroid()) / distance};
49}
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Provides Dirichlet boundary value and normal-gradient relations for Kokkos linear finite volume kerne...
KokkosLinearFVFunctorDirichletBC(const InputParameters &parameters)
KOKKOS_FUNCTION BoundaryRelation computeBoundaryNormalGradient(const FVDatum &datum) const
KOKKOS_FUNCTION BoundaryRelation computeBoundaryValue(const FVDatum &datum) const
static InputParameters validParams()
const Moose::Kokkos::ReferenceWrapper< const KokkosParsedFunction > _functor
The functor providing the Dirichlet value on the boundary.
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 Real3 faceCentroid() const
Get the centroid of the current element side.
KOKKOS_FUNCTION Real faceDCFMag() const
Get the distance from the current element centroid to the current side centroid.
Base class for Kokkos linear finite volume boundary conditions.
Scalar< Real > _t
TODO: Move to TransientInterface.
The Kokkos object that can hold the reference of a variable.
Affine boundary relation used by Kokkos linear FV kernels: boundary_quantity = coefficient * cell_unk...
Real distance(const Point &p)