https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
16class KDTree;
18
25{
26public:
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
53protected:
56 const std::vector<std::unique_ptr<SBMBndElementBase>> * _boundary_elements;
57};
const Real p
virtual Real value(Real t, const Point &p) const
const InputParameters & parameters() const
Base class for SBM boundary elements.
Computes the unsigned distance to a surface mesh using KDTree nearest neighbor lookup from SBMSurface...
KDTree * _kd_tree
Cached pointers for speed.
RealVectorValue surfaceNormal(const Point &p) const
Return the true boundary surface normal evaluated at the closest point obtained by projecting the que...
const std::vector< std::unique_ptr< SBMBndElementBase > > * _boundary_elements
const SBMBndElementBase & closestBoundaryElem(const Point &p) const
find closest boundary element using KDTree
Real value(Real t, const Point &p) const override
Return unsigned distance value.
RealGradient gradient(Real t, const Point &p) const override
Return the spatial gradient of the unsigned distance function.
RealVectorValue distanceVectorToSurface(const Point &p) const
find closest boundary element and return its distance vector