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;
17class SurfaceElement;
19
26{
27public:
28 using Function::value;
29
31
32 virtual void initialSetup() override;
33
35
37 const SurfaceElement & closestBoundaryElem(const Point & p) const;
38
40 RealVectorValue distanceVectorToSurface(const Point & p) const;
41
43 Real value(Real t, const Point & p) const override;
44
48 RealGradient gradient(Real t, const Point & p) const override;
49
52 RealVectorValue surfaceNormal(const Point & p) const;
53
54protected:
56 const SBMInterfaceManager * _manager = nullptr;
57 std::pair<SubdomainID, SubdomainID> _subdomain_pair;
58
60 KDTree * _kd_tree = nullptr;
61 const std::vector<std::unique_ptr<SurfaceElement>> * _boundary_elements = nullptr;
62};
const Real p
virtual Real value(Real t, const Point &p) const
const InputParameters & parameters() const
Detects shared interfaces between subdomains in a single surface mesh containing the complete boundar...
BoundaryMeshBuilder specialization that additionally builds a centroid k-d tree over the whole-mesh S...
Computes the unsigned distance to a surface mesh using geometry supplied by SBMSurfaceMeshBuilder or ...
KDTree * _kd_tree
Cached pointers for per-interface builder mode.
const std::vector< std::unique_ptr< SurfaceElement > > * _boundary_elements
RealVectorValue surfaceNormal(const Point &p) const
Return the true boundary surface normal evaluated at the closest point obtained by projecting the que...
std::pair< SubdomainID, SubdomainID > _subdomain_pair
const SBMInterfaceManager * _manager
Optional single-mesh manager used instead of a per-interface builder.
const SurfaceElement & closestBoundaryElem(const Point &p) const
find closest boundary element using k-d tree
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