https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FVUtils.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 "MooseVariableFV.h"
12#include "FVUtils.h"
13#include "SystemBase.h"
14
15namespace Moose
16{
17namespace FV
18{
19
20bool
21elemHasFaceInfo(const Elem & elem, const Elem * const neighbor)
22{
23 // The face info belongs to elem:
24 // * at all mesh boundaries (i.e. where there is no neighbor)
25 // * if the element faces a neighbor which is on a lower refinement level
26 // * if the element is active and it has a lower ID than its neighbor
27 if (!neighbor)
28 return true;
29 else if (elem.level() != neighbor->level())
30 return neighbor->level() < elem.level();
31 else if (!neighbor->active())
32 return false;
33 else
34 return elem.id() < neighbor->id();
35}
36}
37}
bool elemHasFaceInfo(const Elem &elem, const Elem *const neighbor)
This function infers based on elements if the faceinfo between them belongs to the element or not.
Definition FVUtils.C:21
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...