https://mooseframework.inl.gov
UnsignedDistanceToSurfaceMesh.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 "Function.h"
13 
14 // Forward declarations
16 class KDTree;
17 class SBMBndElementBase;
18 
25 {
26 public:
27  using Function::value;
28 
30 
31  virtual void initialSetup() override;
32 
34 
36  const SBMBndElementBase & closestBoundaryElem(const Point & p) const;
37 
39  RealVectorValue distanceVectorToSurface(const Point & p) const;
40 
42  Real value(Real t, const Point & p) const override;
43 
47  RealGradient gradient(Real t, const Point & p) const override;
48 
51  RealVectorValue surfaceNormal(const Point & p) const;
52 
53 protected:
56  const std::vector<std::unique_ptr<SBMBndElementBase>> * _boundary_elements;
57 };
Computes the unsigned distance to a surface mesh using KDTree nearest neighbor lookup from SBMSurface...
const InputParameters & parameters() const
RealGradient gradient(Real t, const Point &p) const override
Return the spatial gradient of the unsigned distance function.
const std::vector< std::unique_ptr< SBMBndElementBase > > * _boundary_elements
Real value(Real t, const Point &p) const override
Return unsigned distance value.
Base class for SBM boundary elements.
KDTree * _kd_tree
Cached pointers for speed.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const SBMBndElementBase & closestBoundaryElem(const Point &p) const
find closest boundary element using KDTree
const Real p
UnsignedDistanceToSurfaceMesh(const InputParameters &parameters)
RealVectorValue distanceVectorToSurface(const Point &p) const
find closest boundary element and return its distance vector
virtual Real value(Real t, const Point &p) const
RealVectorValue surfaceNormal(const Point &p) const
Return the true boundary surface normal evaluated at the closest point obtained by projecting the que...