https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SurfaceSide.h
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#pragma once
11
12#include "MooseTypes.h"
13
14#include <ostream>
15
16namespace SurfaceGeometry
17{
18
20enum class SurfaceSide
21{
23 INSIDE,
25 OUTSIDE,
27 ON
28};
29
42SurfaceSide signedValueSideness(Real phi, Real tolerance, bool inside_is_negative);
43
49
53inline std::ostream &
54operator<<(std::ostream & os, const SurfaceSide & side)
55{
56 switch (side)
57 {
59 return os << "INSIDE";
61 return os << "OUTSIDE";
62 case SurfaceSide::ON:
63 return os << "ON";
64 }
65 return os;
66}
67
68} // namespace SurfaceGeometry
SurfaceSide unionSideness(SurfaceSide a, SurfaceSide b)
Combine two classifications for a union: INSIDE if either is INSIDE, otherwise ON if either is ON,...
Definition SurfaceSide.C:36
std::ostream & operator<<(std::ostream &os, const SurfaceSide &side)
Stream a human-readable name for a SurfaceSide value.
Definition SurfaceSide.h:54
SurfaceSide
The side of a closed surface where a query point is located.
Definition SurfaceSide.h:21
@ INSIDE
The point lies strictly in the interior of the closed surface.
@ ON
The point lies on the surface itself, within tolerance.
@ OUTSIDE
The point lies strictly in the exterior of the closed surface.
SurfaceSide signedValueSideness(Real phi, Real tolerance, bool inside_is_negative)
Classify a signed level-set value into a SurfaceSide.
Definition SurfaceSide.C:18