https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SurfaceElement.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 "MooseMesh.h"
13
14class Ball;
15class LineSegment;
16
27{
28public:
34 SurfaceElement(const Elem * elem, const Point & normal);
35
37 virtual ~SurfaceElement() = default;
38
40 const Elem & elem() const { return *_elem; }
41
43 const Point & normal() const { return _normal; }
44
49 virtual bool intersect(const LineSegment & line_segment) const = 0;
50
54 unsigned int expectedEmbeddingMeshDim() const { return _elem->dim() + 1; }
55
60 virtual Ball computeBoundingBall() const = 0;
61
75 Real getProjectedBoundingBoxDiagonal(const Point & normal_dir) const;
76
77private:
80 const Elem * _elem;
82 const Point _normal;
83};
Ball primitive: a circle in 2D or a sphere in 3D.
Definition Ball.h:35
The LineSegment class is used by the LineMaterialSamplerBase class and for some ray tracing stuff.
Definition LineSegment.h:31
Base class for a single surface (boundary) element of a closed surface mesh.
const Point & normal() const
Getter for the normal vector.
Real getProjectedBoundingBoxDiagonal(const Point &normal_dir) const
Compute the length of the element bounding-box diagonal projected onto a plane orthogonal to a given ...
const Elem * _elem
Pointer to the libMesh element representing this surface face.
virtual bool intersect(const LineSegment &line_segment) const =0
Check if the given line segment intersects this surface element.
const Elem & elem() const
Getter for the underlying element.
const Point _normal
Unit normal vector of the surface element.
virtual Ball computeBoundingBall() const =0
Compute a bounding ball for this surface element.
virtual ~SurfaceElement()=default
Virtual destructor to ensure proper cleanup in derived classes.
unsigned int expectedEmbeddingMeshDim() const
Getter of expected embedding solving mesh dimension Because the surface element is a face of the embe...