https://mooseframework.inl.gov
FaceArgInterface.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 
10 #include "FaceArgInterface.h"
11 
14  const Moose::FV::LimiterType limiter_type,
15  const bool elem_is_upwind,
16  const bool correct_skewness,
17  const Moose::StateArg * state_limiter) const
18 {
19  const bool defined_on_elem_side = hasFaceSide(fi, true);
20  const bool defined_on_neighbor_side = hasFaceSide(fi, false);
21  const Elem * const elem = defined_on_elem_side && defined_on_neighbor_side
22  ? nullptr
23  : (defined_on_elem_side ? &fi.elem() : fi.neighborPtr());
24 
25  if (!defined_on_elem_side && !defined_on_neighbor_side)
26  mooseError("No definition on either side");
27 
28  return {&fi, limiter_type, elem_is_upwind, correct_skewness, elem, state_limiter};
29 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const Elem & elem() const
Definition: FaceInfo.h:81
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:36
const Elem * neighborPtr() const
Definition: FaceInfo.h:84
A structure defining a "face" evaluation calling argument for Moose functors.
LimiterType
Definition: Limiter.h:26
State argument for evaluating functors.
virtual bool hasFaceSide(const FaceInfo &fi, const bool fi_elem_side) const =0
Moose::FaceArg makeFace(const FaceInfo &fi, const Moose::FV::LimiterType limiter_type, const bool elem_is_upwind, const bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
Create a functor face argument from provided component arguments.