https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
30public:
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
50 virtual Real value(Real t, const Point & p) const;
51
53 RealVectorValue distanceVector(const Point & pt) const;
54
56 RealVectorValue trueNormal(const Point & pt) const;
57
60 RealVectorValue distanceVectorByIndex(unsigned int idx, const Point & pt) const;
61
64 RealVectorValue trueNormalByIndex(unsigned int idx, const Point & pt) const;
65
67 RealVectorValue distanceVectorByFunc(const Point & pt, Real t, const Function * func) const;
68
70 RealVectorValue trueNormalByFunc(const Point & pt, Real t, const Function * func) const;
71
72protected:
74 std::vector<const Function *> _distance_functions;
75
77};
const Real p
const InputParameters & parameters() const
User object that computes the shortest distance to one or more surfaces defined by function- and/or m...
static InputParameters validParams()
RealVectorValue trueNormalByFunc(const Point &pt, Real t, const Function *func) const
Compute true normal using a specific distance function.
RealVectorValue distanceVector(const Point &pt) const
Return the closest distance vector from point pt to the boundaries.
RealVectorValue trueNormal(const Point &pt) const
Return the true normal vector at the closest point on the boundaries.
void threadJoin(const UserObject &) override
RealVectorValue distanceVectorByFunc(const Point &pt, Real t, const Function *func) const
Compute distance vector using a specific distance function.
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 'surfaces' para...
std::vector< const Function * > _distance_functions
Optional signed-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...
const std::vector< const Function * > & getDistanceFuncs() const
Get the SBMSurfaceMeshBuilder user objects.