https://mooseframework.inl.gov
ShortestDistanceToSurface.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 #pragma once
10 
12 
29 {
30 public:
33  void initialize() override {}
34  void execute() override {}
35  void finalize() override {}
36 
37  // This object answers queries on demand and stores no results, so there is
38  // nothing to combine across threads.
39  void threadJoin(const UserObject &) override {}
40 
42  const std::vector<const Function *> & getDistanceFuncs() const { return _distance_functions; }
43 
45  RealVectorValue distanceVector(const Point & pt) const;
46 
48  RealVectorValue trueNormal(const Point & pt) const;
49 
52  RealVectorValue distanceVectorByIndex(unsigned int idx, const Point & pt) const;
53 
56  RealVectorValue trueNormalByIndex(unsigned int idx, const Point & pt) const;
57 
59  RealVectorValue distanceVectorByFunc(const Point & pt, Real t, const Function * func) const;
60 
62  RealVectorValue trueNormalByFunc(const Point & pt, Real t, const Function * func) const;
63 
64 protected:
66  std::vector<const Function *> _distance_functions;
67 };
RealVectorValue trueNormalByFunc(const Point &pt, Real t, const Function *func) const
Compute true normal using a specific distance function.
const InputParameters & parameters() const
void threadJoin(const UserObject &) override
std::vector< const Function * > _distance_functions
Optional signed-distance function.
User object that computes the shortest distance to one or more surfaces defined by function- and/or m...
RealVectorValue distanceVectorByIndex(unsigned int idx, const Point &pt) const
A distance vector from a point pt to a specific surface specified by index idx in the &#39;surfaces&#39; para...
RealVectorValue trueNormal(const Point &pt) const
Return the true normal vector at the closest point on the boundaries.
RealVectorValue distanceVectorByFunc(const Point &pt, Real t, const Function *func) const
Compute distance vector using a specific distance function.
RealVectorValue trueNormalByIndex(unsigned int idx, const Point &pt) const
A true normal vector at the projected point of pt onto a specific surface specified by index idx in t...
ShortestDistanceToSurface(const InputParameters &parameters)
static InputParameters validParams()
RealVectorValue distanceVector(const Point &pt) const
Return the closest distance vector from point pt to the boundaries.
const std::vector< const Function * > & getDistanceFuncs() const
Get the SBMSurfaceMeshBuilder user objects.