https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NeighborInfo.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// Local includes
13#include "RayTracingCommon.h"
14
15// MOOSE includes
16#include "MooseTypes.h"
17
18// Forward declarations
19namespace libMesh
20{
21class Elem;
22}
23
28{
32 NeighborInfo(const Elem * const elem, const std::vector<unsigned short> & sides)
33 : _elem(elem),
35 _side_normals(sides.size(), RayTracingCommon::invalid_point),
36 _lower_bound(-1),
37 _upper_bound(-1),
38 _valid(true)
39 {
40 }
41
45 NeighborInfo(const Elem * const elem,
46 const std::vector<unsigned short> & sides,
47 const Real lower_bound,
48 const Real upper_bound)
49 : _elem(elem),
51 _side_normals(sides.size(), RayTracingCommon::invalid_point),
52 _lower_bound(lower_bound),
53 _upper_bound(upper_bound),
54 _valid(true)
55 {
56 }
57
59 const Elem * const _elem;
61 const std::vector<unsigned short> _sides;
63 std::vector<Point> _side_normals;
65 const Real _lower_bound;
67 const Real _upper_bound;
69 bool _valid;
70};
char ** sides
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
Struct for containing the necessary information about a cached neighbor for ray tracing.
NeighborInfo(const Elem *const elem, const std::vector< unsigned short > &sides, const Real lower_bound, const Real upper_bound)
Constructor with bounds (used for neighbors that span an edge)
const std::vector< unsigned short > _sides
The sides on the element that the neighboring portion is contained in.
const Real _upper_bound
The lower bound (used for neighbors that span an edge)
bool _valid
Whether or not this neighbor is valid (needed for neighbors that span an edge)
NeighborInfo(const Elem *const elem, const std::vector< unsigned short > &sides)
Constructor without bounds (used for neighbors that exist only at a point)
const Elem *const _elem
The element.
std::vector< Point > _side_normals
The normals of each side in _sides.
const Real _lower_bound
The lower bound (used for neighbors that span an edge)