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