https://mooseframework.inl.gov
KokkosLinearFVFunctorNeumannBC.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 
19 {
20 public:
22 
24 
25  template <typename Derived>
26  KOKKOS_FUNCTION BoundaryRelation computeBoundaryValue(const FVDatum & datum) const;
27  template <typename Derived>
28  KOKKOS_FUNCTION BoundaryRelation computeBoundaryNormalGradient(const FVDatum & datum) const;
29 
30 private:
33 };
34 
35 template <typename Derived>
38 {
39  return {1, _normal_gradient_functor->value(_t, datum.faceCentroid()) * datum.faceDCFMag()};
40 }
41 
42 template <typename Derived>
45 {
46  return {0, _normal_gradient_functor->value(_t, datum.faceCentroid())};
47 }
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...
KokkosLinearFVFunctorNeumannBC(const InputParameters &parameters)
KOKKOS_FUNCTION BoundaryRelation computeBoundaryValue(const FVDatum &datum) const
Provides prescribed outward normal gradient relations for Kokkos linear finite volume kernels...
KOKKOS_FUNCTION BoundaryRelation computeBoundaryNormalGradient(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
const Moose::Kokkos::ReferenceWrapper< const KokkosParsedFunction > _normal_gradient_functor
The functor providing the outward normal gradient on the boundary.
static InputParameters validParams()
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