https://mooseframework.inl.gov
PiecewiseConstantVariable.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
11 #include "NS.h"
12 #include "NSFVUtils.h"
13 
15 
18 {
20 }
21 
23  : INSFVVariable(params)
24 {
25 }
26 
27 bool
29  const Elem * const elem,
30  const Moose::StateArg & time) const
31 {
32  if (isDirichletBoundaryFace(fi, elem, time))
33  return false;
34  if (!isInternalFace(fi))
35  return true;
36 
37  return !MooseUtils::relativeFuzzyEqual((*this)(Moose::ElemArg{&fi.elem(), false}, time),
38  (*this)(Moose::ElemArg{fi.neighborPtr(), false}, time));
39 }
bool isExtrapolatedBoundaryFace(const FaceInfo &fi, const Elem *elem, const Moose::StateArg &time) const override
registerMooseObject("NavierStokesApp", PiecewiseConstantVariable)
const Elem & elem() const
static InputParameters validParams()
virtual bool isDirichletBoundaryFace(const FaceInfo &fi, const Elem *elem, const Moose::StateArg &state) const
bool isInternalFace(const FaceInfo &) const
const Elem * neighborPtr() const
A special variable class for porosity which flags faces at which porosity jumps occur as extrapolated...
static InputParameters validParams()
Definition: INSFVVariable.C:24
bool relativeFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
PiecewiseConstantVariable(const InputParameters &params)